Telnet disconnect and need hard reset

  • Hello,
    When my Wipy is connected with Wifi in mode VPA, Wipy disconnect after a time maybe the timeout and in my Telnet session receive "Connection closed by foreign host". The only way to restart Telnet is a hard reset on Wipy. Can someone explain and help to resolve this trouble.
    Many thanks,

  • Hi Gabriel,

    Thanks for the extra info. I'll go through a debugging session tomorrow and see what's going on...


  • @daniel
    Adding some info, even with a higher timeout I experience some issues with Server.

    Reconnecting to an FTP session that has been closed or inactive from a while brings this:

    Connected to
    220 Micropython FTP Server
    Name ( 
    Remote system type is UNIX.
    Using binary mode to transfer files.
    ftp> cd flash/lib
    ftp> ls

    ... (timeout to occur)

    ftp: Poll timeout waiting before accept
    421 Service not available, remote server timed out. Connection closed.

    During the session, the server is connected, from the TCP PoV:

    tcp4       0      0        ESTABLISHED

    And Telnet works; however, a soft re-boot (CTRL-D) doesn't fix the FTP issue, I need to press the reset button.

  • Thanks for your quick reply. I seems better whith the version 1.8.2 now installed. Another remarks when the trouble happens the heartbit led comes and stay off. I have nothing read in the docs about heartbit state off. Is it a state without significant relation ?

    Best regards,

  • Hi Gabrielle,

    That's interesting. I'll look into it. Thanks!


  • Hi,
    It happens to me as well, new firmware installed.

    Practical experience tells me that changing timeout of telnet server makes the trick, even exceeding server timeout.

    import network
    server = network.Server()
    #Set timeout to 5 minutes

    You can include the mod in a file

    Now, this is a workaround, the issue might have to do on how wifi is managed at server level, further investigation would be needed.

  • @pchirouze The default timeout for Telnet and FTP (when there's no activity) is 120s. But you should be able to connect again without performing a hard reset. Check the Server class for details on how to change the timeout value:


Log in to reply

Pycom on Twitter