1) I have 2 event handler functions; I need to get the mac of all STA connected to the AP and the mac of the AP the esp's STA is connected to. Then use this MAC mac to send packets to all other nodes except the node from which I receive the packet.
This is how I am assuming to implement it - I am using Arduino IDE; how can I get it done?
https://github.com/ThinkalVB/AirMesh
Code: Select all
WiFi.onEvent(handleNewSTA, WiFiEvent_t::SYSTEM_EVENT_AP_STACONNECTED);
WiFi.onEvent(handleLostSTA, WiFiEvent_t::SYSTEM_EVENT_AP_STADISCONNECTED);
void AirMesh::handleNewSTA(WiFiEvent_t event, WiFiEventInfo_t info)
{
#ifdef _AIRMESH_DEBUG_
Serial.printf("New STA connected");
#endif
}
void AirMesh::handleLostSTA(WiFiEvent_t event, WiFiEventInfo_t info)
{
#ifdef _AIRMESH_DEBUG_
Serial.printf("STA Lost");
#endif
}