@philbowles The test code complained about CSTR and say, so i modified it a bit and hope i got the idea.
The output on console is now:
PHY mode: N
Channel: 6
AP id: 0
Status: 1
Auto connect: 1
SSID (11): MYSSID
Passphrase (10): MYPASSWORD
BSSID set: 0
[WiFi-event] event: 0
WiFi Connected SSID=MYSSID
[WiFi-event] event: 3
Yay, i got an IP
IP address:
192.168.1.111
void WiFiEvent(WiFiEvent_t event) {
Serial.printf("[WiFi-event] event: %d\n", event);
switch(event) {
case WIFI_EVENT_STAMODE_GOT_IP:
Serial.println("Yay, i got an IP");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
break;
case WIFI_EVENT_STAMODE_DISCONNECTED:
Serial.println("WiFi lost connection");
break;
case WIFI_EVENT_STAMODE_CONNECTED:
Serial.print("WiFi Connected SSID=");
Serial.printf("%s");
Serial.println(ssid);
break;
case WIFI_EVENT_SOFTAPMODE_STADISCONNECTED:
Serial.println("WIFI_EVENT_SOFTAPMODE_STADISCONNECTED");
break;
case WIFI_EVENT_SOFTAPMODE_PROBEREQRECVED:
Serial.println("WIFI_EVENT_SOFTAPMODE_PROBEREQRECVED");
break;
}
}
P.S.: Trying to google the term "say" proved to be a fun but futile effort