Station status as events to be captured from a function.

kostbill
Posts: 7
Joined: Sat Feb 27, 2016 10:05 pm

Station status as events to be captured from a function.

Postby kostbill » Wed Dec 13, 2017 11:11 pm

Hello.

Is there a callback I can register somehow in order to accept the messages from the STATION_STATUS enum, as events?

typedef enum {
STATION_IDLE = 0, /**< ESP8266 station idle */
STATION_CONNECTING, /**< ESP8266 station is connecting to AP*/
STATION_WRONG_PASSWORD, /**< the password is wrong*/
STATION_NO_AP_FOUND, /**< ESP8266 station can not find the target AP*/
STATION_CONNECT_FAIL, /**< ESP8266 station fail to connect to AP*/
STATION_GOT_IP /**< ESP8266 station got IP address from AP*/
} STATION_STATUS;

Just like the SYSTEM EVENTS that can be captured from the callback set from the wifi_set_event_handler_cb function?

I am also posting this to the esp8266 forum.
Thanks a lot!
Vasileios.

Her Majesty
Posts: 314
Joined: Mon Oct 27, 2014 11:09 am

Re: Station status as events to be captured from a function.

Postby Her Majesty » Tue Dec 19, 2017 7:07 pm

You can set a timer to check wifi_station_get_connect_status, see the user_esp_platform_check_ip in example https://github.com/espressif/ESP8266_NONOS_SDK/blob/master/examples/IoT_Demo/user/user_esp_platform.c.

Who is online

Users browsing this forum: No registered users and 12 guests