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

    WiPy go to sleep and don't wake up on ftp or telnet connexions

    Scheduled Pinned Locked Moved WiPy 2&3
    3 Posts 3 Posters 1.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.
    • B Offline
      Brunus
      last edited by

      Hi,

      I'm connecting my WiPy 1.0 on my home network.
      There is a NAT setting to join it remotly from a server outside the home network and it works...while WiPy is awake.
      But a few minutes (almost 20 min) after a hard reboot, the WiPy fall asleep (the heartbeat led stop blinking) and FTP and Telnet calls don't wake it up...it need a hard reboot.
      I can't figure out why...
      Here is my boot.py
      Thanks for any answers !

      import machine
      from network import WLAN
      from network import Server

      SSID = 'SFR_2740' # SSID of home network
      AUTH = (WLAN.WPA2, 'myWifiKey') # WPA secret as 2nd param
      IP = '192.168.1.68' # Fixed IP the device should get
      ROUTER = '192.168.1.1' # IP of router
      DNS = '8.8.8.8' # IP of DNS server
      NETMASK = '255.255.255.0' # Netmask to use
      LOGIN = 'myLogin'
      PASSWD = 'myPassword'

      wlan = WLAN()

      if machine.reset_cause() != machine.SOFT_RESET:
      wlan.init(WLAN.STA)
      wlan.ifconfig(config=(IP, NETMASK, ROUTER, DNS))

      if not wlan.isconnected():
      wlan.connect(ssid=SSID, auth=AUTH, timeout=5000)
      while not wlan.isconnected():
      machine.idle()
      server = Server()
      server.deinit()
      server.init( login=(LOGIN, PASSWD), timeout=3600 )

      robert-hhR 1 Reply Last reply Reply Quote 1
      • L Offline
        lebucur
        last edited by

        Hello,
        Did you solve this problem? I have it too.

        1 Reply Last reply Reply Quote 0
        • robert-hhR Offline
          robert-hh @Brunus
          last edited by

          @Brunus Did you try to set a long server timeout with
          server.timeout(86400)
          Which for instance will set the timeout to a full day.

          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