Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Telnet disconnect and need hard reset

    Scheduled Pinned Locked Moved Issues & Bugs
    7 Posts 3 Posters 3.1k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P Offline
      pchirouze
      last edited by

      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,

      D 1 Reply Last reply Reply Quote 0
      • D Offline
        daniel @pchirouze
        last edited by

        @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

        1 Reply Last reply Reply Quote 0
        • G Offline
          gbozzi
          last edited by

          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.

          =================================
          Gabriele Bozzi
          "At the mousetrap of life, the second mouse gets the cheese! And not the third. The secret of the fast follower is to be fast and selective"

          1 Reply Last reply Reply Quote 0
          • D Offline
            daniel
            last edited by

            Hi Gabrielle,

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

            Cheers,
            Daniel

            G 1 Reply Last reply Reply Quote 0
            • P Offline
              pchirouze
              last edited by

              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.

              1 Reply Last reply Reply Quote 0
              • G Offline
                gbozzi @daniel
                last edited by

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

                =================================
                Gabriele Bozzi
                "At the mousetrap of life, the second mouse gets the cheese! And not the third. The secret of the fast follower is to be fast and selective"

                1 Reply Last reply Reply Quote 0
                • D Offline
                  daniel
                  last edited by

                  Hi Gabriel,

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

                  Cheers,
                  Daniel

                  1 Reply Last reply Reply Quote 0

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  • 1 / 1
                  • First post
                    Last post

                  Pycom on Twitter

                  Pycom