I'm using Javascript ,Websocket to simulate webrepl to connect to micropython(esp8266) on my android phone. It works fine but after the android phone screen turns off or switches to another app(not close browser), when I come back , I get a Connection timed out error, if I try to connect again, I just get a Disconnected message.I have to reboot esp8266 to connect again.
Any solution for this?
Thanks,
Jerry
webrepl timeout issue
-
- Posts: 8
- Joined: Wed Jan 20, 2021 9:12 pm
Re: webrepl timeout issue
I found a solution. Adding a timer to check if webrepl is getting messages.
-
- Posts: 4
- Joined: Thu Dec 24, 2020 9:07 am
- Location: https://mini-militia.com/
Re: webrepl timeout issue
"Terminated due to timeout" means your code took too long to return a solution. This is because you're calculating max(ar) on every iteration herejerrycai73 wrote: ↑Thu Jan 21, 2021 8:54 pmI'm using Javascript ,Websocket to simulate webrepl to connect to micropython(esp8266) on my android phone. It works fine but after the android phone screen turns off or switches to another app(not close browser), when I come back , I get a Connection timed out error, if I try to connect again, I just get a Disconnected message.I have to reboot esp8266 to connect again.
Any solution for this?
Thanks,
Jerry
Code: Select all
if x == max(ar)
-
- Posts: 8
- Joined: Wed Jan 20, 2021 9:12 pm
Re: webrepl timeout issue
Thanks for your help, I will check it.