Problems connecting to wifi ap #6050
Replies: 1 comment
-
Posted at 2018-09-19 by @allObjects I'd always put retry invocations to and/or within self into a setTimeout() in order to 'loose' context... and let resources go... yes, it may be in a callback, but still, code-connected things/references keep things a-life and resources blocked... Posted at 2018-09-19 by rmd6502 Thanks, I'll give that a try Posted at 2018-09-19 by Frida I had problems with one of my router so I did this feature:
Posted at 2018-09-19 by Wilberforce How are you loading code onto the board? You seem to adding modules at run time If you use the web ide that is not necessary- and if connect with wifi and Posted at 2018-09-19 by rmd6502 Yeah, I forgot that Javascript functions are closures, so even with the async callback it's still a recursive function :-/ @frida's setTimeout, but as a setInterval, to keep retrying until boola gets set instead of invoking lan from the connect callback (same problem IIUC, please explain if I don't!), and also letting the webide load MQTT for me (I originally was using telnet directly). Posted at 2018-09-20 by rmd6502 There must be something with my router that doesn't get along with the ESP. I even tried putting E.reboot() in the failure path and that didn't work either :-( Posted at 2018-09-21 by hungryforcodes Did you try with other routers, and or using a mobile phone in "Mobile Hotspot" mode? This way you could get a hint wether the problem was with the ESP module or the router. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2018-09-19 by rmd6502
I'm running the 1v99 release on an AI-Thinker ESP-12Q module (4MB flash), trying to connect to a Linksys EA7500 running firmware 2.0.6.190009.
My problem is the Wifi.connect fails with 'bad password' 90% of the time. When I do connect, I don't remember the magic combination of resets, reconnects, and reloads I had to do to make it work (and it may not matter anyway). On a 1-year old thread someone posted that continual retries worked for them, I found that it would fail 9 times then hang on connect()
Example program attached.
Thanks in advance!
Attachments:
Beta Was this translation helpful? Give feedback.
All reactions