-
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 ServerSSID = '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 ) -
Hello,
Did you solve this problem? I have it too. -
@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.
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