Skip to content

FYI: Connection to X1C (or others?) via FTP #150

@drdsgvo

Description

@drdsgvo

FTP on port 990 (implicit TLS/SSL) works!
username: bblp
password:

works with WinSCP, e.g., but any other capable FTP client (or script).
But aware, that python socket/ftp libs cause a lot of trouble. Use curl or other CLI instead.
This works for listing files on SD card (pasted from a python class, please adapt to standalone):

def get_sd_files_via_curl(self) -> List[str]:
    try:
        import subprocess
        
        cmd = [
            "curl", "-k", "--ftp-ssl-reqd", "--list-only",
            f"ftps://bblp:{self.access_code}@{self.ip}:990/"
        ]
        
        result = subprocess.run(cmd, capture_output=True, text=True, timeout=10)
        
        if result.returncode == 0:
            return [f.strip() for f in result.stdout.split('\n') if f.strip()]
        else:
            logger.error(f"curl error: {result.stderr}")
            return []
            
    except Exception as e:
        logger.error(f"curl not available: {e}")
        return [] 

This should help avoid issues with listing files from SD card in printer, uploading them to SD etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions