-->
Page 1 of 1

on NON-OS SDK, How to capture event STA connecting to AP?

PostPosted: Fri Nov 08, 2019 4:00 am
by esp8266_abc
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?

Thanks!

Re: on NON-OS SDK, How to capture event STA connecting to AP

PostPosted: Fri Nov 08, 2019 7:05 pm
by davydnorris
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

Re: on NON-OS SDK, How to capture event STA connecting to AP

PostPosted: Wed Nov 13, 2019 9:09 am
by esp8266_abc
Thanks a lot !