Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static esp_err_t event_handler(void *ctx, system_event_t *event)
- {
- /* For accessing reason codes in case of disconnection */
- system_event_info_t *info = &event->event_info;
- switch(event->event_id) {
- case SYSTEM_EVENT_WIFI_READY:
- ESP_LOGI(LOG_TAG, "Wifi is primed and ready!");
- break;
- case SYSTEM_EVENT_STA_START:
- ESP_LOGI(LOG_TAG, "Wifi station started");
- scan_for_ap();
- break;
- case SYSTEM_EVENT_SCAN_DONE:
- ESP_LOGI(LOG_TAG, "Scan Completed Successfully.");
- list_ap();
- break;
- default:
- ESP_LOGI(LOG_TAG, "Some other event %d", event->event_id);
- break;
- }
- return ESP_OK;
- }
Add Comment
Please, Sign In to add comment