Page 1 of 1
webrepl timeout issue
Posted: Thu Jan 21, 2021 8:54 pm
by jerrycai73
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
Re: webrepl timeout issue
Posted: Mon Feb 22, 2021 7:18 pm
by jerrycai73
I found a solution. Adding a timer to check if webrepl is getting messages.

Re: webrepl timeout issue
Posted: Wed Mar 10, 2021 8:59 am
by Richardson
jerrycai73 wrote: ↑Thu Jan 21, 2021 8:54 pm
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
"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 here
.
Re: webrepl timeout issue
Posted: Sat Mar 13, 2021 11:38 pm
by jerrycai73
Thanks for your help, I will check it.