FTPconnection not working if wlan mode is STA_AP

  • Hello, I hope this is the correct place to ask for help with my problem.

    I'm working with a SiPy and a Pytrack, firmware of both was updated today.

    os.uname() returns: (sysname='SiPy', nodename='SiPy', release='1.14.0.b1', version='v1.8.6-849-86da809 on 2018-01-17', machine='SiPy with ESP32', sigfox='1.0.1')

    After updating the firmware the FTPconnection was no longer possible with the code I was using before. I'm using FileZilla and the output I get looks like this:
    Status: Connecting to
    Status: Connection established, waiting for welcome message...
    Status: Server does not support non-ASCII characters.
    Status: Logged in
    Status: Retrieving directory listing...
    Command: PWD
    Response: 257 /
    Command: TYPE I
    Response: 200
    Command: PASV
    Response: 227 (0,0,0,0,7,232)
    Command: LIST
    Error: The data connection could not be established: WSAEADDRNOTAVAIL - Cannot assign requested address
    Response: 150

    After some research I was abled to find the source of my problem. I used the following code:

    from network import WLAN
    wlan = WLAN(mode=WLAN.STA_AP,ssid='sipy-pytrack', auth=(WLAN.WPA2,'XXXX'))

    wlan.mode() returns: 3

    Using the default WLAN (wlan.mode() returns: 2) I have no problem connecting via FTP. Changing the mode in my code to WLAN.AP (wlan.mode() returns: 2) I'm able to connect to the FTP server. But this "solution" doesn't solve my problem, because it leads to a new error. The new error is that the command wlan.scan() doesn't work.

    Does someone else have the same problem or am I doing something wrong?
    Do I have to change how I connect with FileZilla?

    I hope somebody can help me.

Log in to reply

Pycom on Twitter

Looks like your connection to Pycom Forum was lost, please wait while we try to reconnect.