LoPy4, WLAN and FileZilla connection

  • Having trouble getting FileZilla to connect to a LoPy4. If I leave it in AP mode I can connect just fine. If I connect the LoPy to my WiFi then I can't connect to it with FileZilla or PyCharm. I get a connection but FZ says it's waiting on a welcome message. Any ideas on what might have changed in the WiFi?

  • Found the issue. It was actually caused by gc.collect() run time going from 6mS to 48mS. This was being run inside a timer tic ISR (I know, that's a no-no). The ISR was taking longer to run than the timer tic period. I assume the UART Int is a lower priority than the timer so it was never being processed.

    Is gc.collect() taking so long because of the extra memory or is this a bug?

  • @livius Correct, when it's in STA mode I connect to it's IP address. When it's in AP mode I connect to

    I'm narrowing it down. It appears to be a timing issue with multiple things running. If I slow down my timer tic from 100mS to 1S then I can access the device. The issue appears to be in the interrupt processing because I also cannot get LoRa packets through.

  • @ssmith
    I do not properly understand you.

    If I connect the LoPy to my WiFi

    then you have changed it to STA mode to connect it to wifi?
    If yes than, no surprise.
    try with WLAN.STA_AP mode

  • It is set to 1. The same code has been running on the LoPy for a year.

  • Have you limited the amount of connections in fileZilla to one?
    If the LoPy is in AP mode and is not running any scripts, it can deal with more than one connection. I think running a script will limit this amount to 1.

Log in to reply

Pycom on Twitter