We can now connect to FTP on the P1 and A1 Series

sorry, only part read your message: you can use the router you have, the 4+ years old one you mentioned, as it only needs 2.4ghz, and you can use that in an “offline” sense (no internet) for the routing between your laptop and printer. pretty easy.

Just make sure your router has wifi enabled on it.

ok… I’m trying to connect to the FTP server via python … I can connect just fine using FileZilla and accepting the certificate. I’m trying to automate a cleanup that a schedule (copy timelapse videos off and then delete, clear out old models etc)… but I tried both with powershell and python to connect to the FTP server (telling it to connect on 990 and force implicit FTP over tls) but in both cases it just times out. I verify the port is open before even trying to connect. I have also said “auto accept any certificates from the server” but it doesn’t seem to be working … anyone want to help me figure this out? here is my code… I even added some error handles to see if I got anything back but it’s just a generic timeout.

import ftplib
import ssl
import socket

# Define FTP server details
ftp_server = '<p1s-ip>'
ftp_user = 'bblp'
ftp_password = '<p1s-accesscode>'

# Create an SSL context to accept any certificates
context = ssl.create_default_context()
context.check_hostname = False
context.verify_mode = ssl.CERT_NONE

try:
    # Check network connectivity
    print(f"Checking connectivity to {ftp_server}...")
    socket.create_connection((ftp_server, 990), timeout=10)
    print("Network connectivity check passed.")

    # Connect to the FTP server using implicit FTP over TLS with a timeout
    ftp = ftplib.FTP_TLS(context=context)
    print(f"Connecting to {ftp_server} on port 990...")
    ftp.connect(ftp_server, 990, timeout=20)  # Increase timeout to 20 seconds
    ftp.login(ftp_user, ftp_password)

    # Force the control connection to be encrypted
    ftp.prot_p()

    print("Connection established and secured with FTP over TLS")

    # Perform FTP operations here
    # Example: List directory contents
    ftp.retrlines('LIST')

    # Close the connection
    ftp.quit()

except ftplib.all_errors as e:
    print(f"FTP error: {e}")
except socket.timeout:
    print("Connection timed out")
except Exception as e:
    print(f"An error occurred: {e}")

Here is an example command line for linux or mac.

lftp -u bblp,4cfake2a -e ‘set ssl:verify-certificate no’ ftps://192.168.0.101:990

so that works… and I can get directory listings and parse them… so ok … doing it the clunky way … but all is good until I try downloading an avi file from the p1s … I use the following command to try and download and timelapse video:

lftp -d -u  bblp,35868996 -e "set ssl:verify-certificate no; cd timelapse; get video_2024-11-22_20-38-08.avi; exit" ftps://192.168.86.180:990

I know the file is there and I can download it with FileZilla no problem and it’s actually a very small file (print was only like 15 layers)

but I get this:

lftp -d -u  bblp,35868996 -e "set ssl:verify-certificate no; cd timelapse; get video_2024-11-22_20-38-08.avi ; exit" ftps://192.168.86.180:990
---- Resolving host address...
---- 1 address found: 192.168.86.180
---- Connecting to 192.168.86.180 (192.168.86.180) port 990
Certificate: CN=01P00A411900960       
 Issued by:        C=CN,O=BBL Technologies Co.\, Ltd,CN=BBL CA
 Checking against: C=CN,O=BBL Technologies Co.\, Ltd,CN=BBL CA
  Trusted
Certificate: C=CN,O=BBL Technologies Co.\, Ltd,CN=BBL CA
 Issued by: C=CN,O=BBL Technologies Co.\, Ltd,CN=BBL CA
WARNING: Certificate verification: Not trusted (89:0B:58:86:BA:82:37:47:C4:44:D6:48:1F:C6:D2:21:A6:48:D6:26)
WARNING: Certificate verification: certificate common name doesn't match requested host name ‘192.168.86.180’ (CC:CA:97:D8:78:8A:14:11:F2:90:2D:8F:9D:FB:22:6C:AA:3A:6B:0D)
<--- 220 BBL-P003 FTP Server
---> FEAT
<--- 502 no-features
---> USER bblp
<--- 331 
---> PASS 35868996
<--- 230 
---> PWD
<--- 257 /                            
---> PBSZ 0
<--- 200 
---- CWD path to be sent is `~/timelapse'
---> CWD timelapse
<--- 250 
cd ok, cwd=~/timelapse
---> PROT C
<--- 200 
---> TYPE I
<--- 200 
---> SIZE video_2024-11-22_20-38-08.avi
<--- 213 297448                                                 
---> MDTM video_2024-11-22_20-38-08.avi
<--- 213 20241122210854                                              
---> PASV
<--- 227 (192,168,86,180,7,232)
---- Connecting data socket to (192.168.86.180) port 2024
---- Data connection established
---> RETR video_2024-11-22_20-38-08.avi
<--- 150                                                             
---- Got EOF on data connection                             
---- Closing data socket
**** Peer closed connection
---- Closing control socket
---- Connecting to 192.168.86.180 (192.168.86.180) port 990                
Certificate: CN=01P00A411900960                                  
 Issued by:        C=CN,O=BBL Technologies Co.\, Ltd,CN=BBL CA
 Checking against: C=CN,O=BBL Technologies Co.\, Ltd,CN=BBL CA
  Trusted
Certificate: C=CN,O=BBL Technologies Co.\, Ltd,CN=BBL CA
 Issued by: C=CN,O=BBL Technologies Co.\, Ltd,CN=BBL CA
WARNING: Certificate verification: Not trusted (89:0B:58:86:BA:82:37:47:C4:44:D6:48:1F:C6:D2:21:A6:48:D6:26)
WARNING: Certificate verification: certificate common name doesn't match requested host name ‘192.168.86.180’ (CC:CA:97:D8:78:8A:14:11:F2:90:2D:8F:9D:FB:22:6C:AA:3A:6B:0D)
<--- 220 BBL-P003 FTP Server
---> FEAT
<--- 502 no-features
---> USER bblp
<--- 331 
---> PASS 35868996
<--- 230 
---> PWD
<--- 257 /
---> PBSZ 0
<--- 200 
---- CWD path to be sent is `~/timelapse'
---> CWD timelapse
<--- 250                                                                  
---> PROT C
<--- 200 
---> TYPE I
<--- 200 
---> PASV
<--- 227 (192,168,86,180,7,232)
---- Connecting data socket to (192.168.86.180) port 2024
---- Data connection established
---> RETR video_2024-11-22_20-38-08.avi
<--- 150 
Interrupt                                                     
---> ABOR
---- Closing aborted data socket
---- Closing control socket

over and over again … it tries to start the download … it doesn’t create the file locally and times out about about 10 seconds and reconnects… I’m scratching my head now.

I figured out how to do it with python directly … look at this post for sample script.

my reply has the working script

Trying to connect to x1c:

(image of my settings: ibb . co / 7yNzCwS)

Server asks for authentication with a client certificate.
SSL3 alert write: fatal: protocol version
The server is using unsupported protocol. Your WinSCP session is configured to use TLSv1.0 through TLSv1.3. It can be configured to use TLSv1.0 through TLSv1.3. Though, avoid using old insecure protocols, whenever possible.
record layer failure
An established connection was aborted by the software in your host machine.

Disconnected from server
Connection failed.

This may be a dumb question, but I can’t seem to find the passcode under the wifi section of my a1 mini? Any ideas?

Read a little more in a few more topics to reach Basic trust level so you can post screenshots.

I did figure out your link: image hosted at ImgBB — ImgBB
image
What I can see here looks OK, assuming the password is the LAN access code.

Go to Edit and then Advanced. The Connection options should look like this:
image

I do get one warning the first time it attempts to connect:


Press Yes to continue connecting and it should work.

1 Like

This post might help you. It’s under Settings and then LAN Only Mode on that model. Doesn’t sound like you actually need to enable LAN Only Mode - just need to go there to find the code.

1 Like

Thanks for the images. Filezilla didn’t work for me, so your instructions were helpful. My connection still failed in WinSCP until I changed this setting.

image

1 Like

In case this is still useful here are my Total Commander settings that worked.I did struggle with it for a bit until I put in the port number in the Host Name.

Session: [Any name]
Host name[:port]: ftps://[Your printer’s IP address]:990
SSL/TLS: Checked
Username: bblp
Password: Access Code found through your printer’s control panel