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

  • 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 = '' # Fixed IP the device should get
    ROUTER = '' # IP of router
    DNS = '' # IP of DNS server
    NETMASK = '' # Netmask to use
    LOGIN = 'myLogin'
    PASSWD = 'myPassword'

    wlan = WLAN()

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

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

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

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

Log in to reply

Pycom on Twitter