Explorar o código

Post station's auth mode event after it is connected to AP.

xiaxiaotian %!s(int64=9) %!d(string=hai) anos
pai
achega
035a48f102

+ 2 - 2
components/esp32/event.c

@@ -190,9 +190,9 @@ static esp_err_t esp_system_event_debug(system_event_t *event)
         {
             system_event_sta_connected_t *connected; 
             connected = &event->event_info.connected;
-            WIFI_DEBUG("SYSTEM_EVENT_STA_CONNECTED\nssid:%s, ssid_len:%d, bssid:%02x:%02x:%02x:%02x:%02x:%02x, channel:%d\n", \
+            WIFI_DEBUG("SYSTEM_EVENT_STA_CONNECTED\nssid:%s, ssid_len:%d, bssid:%02x:%02x:%02x:%02x:%02x:%02x, channel:%d, authmode:%d\n", \
                 connected->ssid, connected->ssid_len, connected->bssid[0], connected->bssid[0], connected->bssid[1], \
-                connected->bssid[3], connected->bssid[4], connected->bssid[5], connected->channel);
+                connected->bssid[3], connected->bssid[4], connected->bssid[5], connected->channel, connected->authmode);
             break;
         }
         case SYSTEM_EVENT_STA_DISCONNECTED:

+ 1 - 0
components/esp32/include/esp_event.h

@@ -56,6 +56,7 @@ typedef struct {
     uint8_t ssid_len;         /**< SSID length of connected AP */
     uint8_t bssid[6];         /**< BSSID of connected AP*/
     uint8_t channel;          /**< channel of connected AP*/
+    uint8_t authmode;
 } system_event_sta_connected_t;
 
 typedef struct {

+ 0 - 1
components/esp32/include/esp_wifi.h

@@ -214,7 +214,6 @@ typedef struct {
     char password[64];     /**< password of target AP*/
     bool bssid_set;        /**< whether set MAC address of target AP or not. Generally, station_config.bssid_set needs to be 0; and it needs to be 1 only when users need to check the MAC address of the AP.*/
     uint8_t bssid[6];     /**< MAC address of target AP*/
-    uint8_t authmode;
 } wifi_sta_config_t;
 
 typedef union {