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...

    Cheers,
    Daniel



  • @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:

    ftp 10.25.0.165
    Connected to 10.25.0.165.
    220 Micropython FTP Server
    Name (10.25.0.165:gabriele): 
    331 
    Password: 
    230 
    Remote system type is UNIX.
    Using binary mode to transfer files.
    ftp> cd flash/lib
    250 
    ftp> ls
    425 
    502 
    150 
    

    ... (timeout to occur)

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

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

    tcp4       0      0  10.25.0.150.63805      10.25.0.165.ftp        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,
    Patrice.



  • Hi Gabrielle,

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

    Cheers,
    Daniel



  • 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
    server.timeout(600)

    You can include the mod in a boot.py file
    https://micropython.org/resources/docs/en/latest/wipy/wipy/tutorial/reset.html

    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:

    https://docs.pycom.io/wipy/library/network.html?highlight=server#class-server

    Cheers,
    Daniel


Log in to reply
 

Pycom on Twitter