webrepl timeout issue

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
jerrycai73
Posts: 8
Joined: Wed Jan 20, 2021 9:12 pm

webrepl timeout issue

Post by jerrycai73 » 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

jerrycai73
Posts: 8
Joined: Wed Jan 20, 2021 9:12 pm

Re: webrepl timeout issue

Post by jerrycai73 » Mon Feb 22, 2021 7:18 pm

I found a solution. Adding a timer to check if webrepl is getting messages. :D

Richardson
Posts: 4
Joined: Thu Dec 24, 2020 9:07 am
Location: https://mini-militia.com/

Re: webrepl timeout issue

Post by Richardson » Wed Mar 10, 2021 8:59 am

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

Code: Select all

if x == max(ar)
.

jerrycai73
Posts: 8
Joined: Wed Jan 20, 2021 9:12 pm

Re: webrepl timeout issue

Post by jerrycai73 » Sat Mar 13, 2021 11:38 pm

Thanks for your help, I will check it.

Post Reply