Hello all! I finished some experiments with Manual mode on the Core, and decided to post my (somewhat interesting) findings. For what it’s worth.
- You can call
WiFi.onwill result in a hard fault. (Interestingly, reading
WiFi.SSID()simply returns an empty string.)
WiFi.connecting()will return 1 (TRUE) even if it is NOT connecting. As in:
(WiFi.connecting = 1). The value goes to FALSE after it is connected.
- If WiFi is not connected,
WiFi.hasCredentials()returns 0 (FALSE), even if credentials are stored! As soon as
WiFi.connect()is called, it returns 1 (TRUE). It remains TRUE when connecting goes to FALSE (I.E. connected)
WiFi.RSSI()will return -127 if not connected to WiFi. This is due to the low-level
wlan_ioctl_get_scan_resultscall, which does not return any SSIDs until the
WiFi.connect()call has been made.
WiFi.connect() only blocks for about a second; user code continues to run while the connection is negotiated.
WiFi.listen() is 100% blocking. Call it, and you might as well have instructions on your product box, “Press Reset if this mode was entered by accident.” In wlan.h, there are definitions for
extern INT32 wlan_smart_config_start(UINT32 algoEncryptedFlag); and
extern INT32 wlan_smart_config_stop(void);. Ah yes, I know…the Core is deprecated anyway, so never mind ;-).