Chat freely about anything...

User avatar
By esp8266_abc
#84470 Hi All,

I am using the Non-OS SDK developing ESP8266 modules. I have two features to be implemented:

(1) Anytime, once the ESP8266 as STA connecting to an routers, somework such as a beep would happen at once.

(2) Anytinme, once the ESP8266 as AP conneccted by an STA, somework such as a beep would happen at once.

It is something like an event in OS enviroment, but this is an NON-OS.

Any hints or undocumented APIs from Non-OS SDK would do this?

User avatar
By davydnorris
#84486 Hey there,

There's an existing function that allows you to register a callback function that gets notified of most wifi events.

Check out the NonOS SDK reference manual and look for wifi_set_event_handler_cb

There is some example code there that shows only a subset of possible events - look inside user_interface.h for the full list of events and reasons. Both STA and AP mode events are reported. They are also documented in the SDK in section 6.2 Wifi Related structures, in particular 6.2.4