-
• #2
I'm afraid there aren't any events at the moment - where did you find out about them from? You could try this and see if it gives you what you need:
wifi.at.registerLine("WIFI CONNECTED", function() { wifi.emit("connected"); }); wifi.at.registerLine("WIFI DISCONNECT", function() { wifi.emit("disconnected"); });
I'm afraid I don't have time to test at the moment, but if it doesn't break anything else I can add it to the module. You might need to use
"WIFI GOT IP"
instead of"WIFI CONNECTED"
though - since I guess you care more about whether you have an IP address than if you're connected. -
• #3
Many thanks Gorden.
I was confused regarding the Wifi documentation here: -
• #4
I know - it is a bit confusing. Ideally that'd be changed - at some point I'll try and bring everything in line a bit more.
That
Wifi
library is ESP8266-only at the moment. I'm trying to get it and theEspruinoWiFi
library in sync in the hope that at some point I will properly merge the two. Unfortunately we're not quite there yet.
Hi There
I just received a few espruino.wifi boards. Nice work!
I try to detect the connected or disconnected event without success. I did not get any of this two events. No connected event on connect and no disconnect event when i switch off my wifi AP.
Code:
The console output is: