-
-
Notifications
You must be signed in to change notification settings - Fork 213
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
In the example code there is this snipped which checks for new clients connecting to the AP:
// compare the previous status to the current status
if (status != WiFi.status()) {
// it has changed update the variable
status = WiFi.status();
if (status == WL_AP_CONNECTED) {
// a device has connected to the AP
Serial.println("Device connected to AP");
} else {
// a device has disconnected from the AP, and we are back in listening mode
Serial.println("Device disconnected from AP");
}
}
The status doesn't seem to change even when a client successfully connects. I couldn't find any references in the WiFi library where WL_AP_CONNECTED
is set. The example worked with an old version of the core as there was a hardcoded value being returned by the status function:
uint8_t arduino::WiFiClass::status() {
// @todo: fix
return WL_CONNECTED;
}
Probably we need to look into register_event_handler
function of the WhdSoftAPInterface
class. The documentation is quite limited and I couldn't find an example of how to implement it yet. https://os.mbed.com/docs/mbed-os/v6.3/feature-i2c-doxy/class_whd_soft_a_p_interface.html#a2ab8fabaa3c42aa60fc3d4438368d43f
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working