philbowles/h4plugins

How to Debug WiFi?

julianrendell opened this issue · 1 comments

Thanks, this looks to be an easy to use and robust system!

And my apologies if I've missed something obvious- there's a quite a lot to read, and it's not 100% clear to me where to start.

My goal is to create a simple "blinky + button " that has web and mqtt interfaces that both show/publish the button state and allow the light status to be changed.

I've flashed (including the spiffs data) the WiFi examples to a NodeMCU 1.0 and it boots. The h4/ command interface appears to be working via the serial port.

How do you find out what IP address has been assigned?

What other logging is there to turn on to try and figure out what's not working?

Thanks in advance!

Hi

You can hook a callback function onConnect to H4P_WiFi instance, And print WiFi.localIP() inside it.

H4P_WiFi h4wifi(ssid, pass, deviceName, onWiFiConnect, onWiFiDisconnect);

For logging : declare H4P_SerialLogger h4sl; just above other instances.