Skip to content

Commit 2e393ed

Browse files
committed
adding debug infos
1 parent 210c0ec commit 2e393ed

File tree

1 file changed

+17
-0
lines changed
  • ports/esp32s2/common-hal/wifi

1 file changed

+17
-0
lines changed

ports/esp32s2/common-hal/wifi/Radio.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@
4242

4343
#define MAC_ADDRESS_LENGTH 6
4444

45+
#include "components/log/include/esp_log.h"
46+
47+
static const char* TAG = "wifi";
48+
4549
static void start_station(wifi_radio_obj_t *self) {
4650
if (self->sta_mode) {
4751
return;
@@ -194,6 +198,19 @@ mp_obj_t common_hal_wifi_radio_get_ap_info(wifi_radio_obj_t *self) {
194198
if (esp_wifi_sta_get_ap_info(&self->ap_info.record) != ESP_OK){
195199
return mp_const_none;
196200
} else {
201+
ESP_EARLY_LOGW(TAG, "ssid: %s", self->ap_info.record.ssid);
202+
ESP_EARLY_LOGW(TAG, "channel: %d", self->ap_info.record.primary);
203+
ESP_EARLY_LOGW(TAG, "secondary: %d", self->ap_info.record.second);
204+
ESP_EARLY_LOGW(TAG, "rssi: %d", self->ap_info.record.rssi);
205+
ESP_EARLY_LOGW(TAG, "authmode: %d", self->ap_info.record.authmode);
206+
ESP_EARLY_LOGW(TAG, "pairwise_cipher: %d", self->ap_info.record.pairwise_cipher);
207+
ESP_EARLY_LOGW(TAG, "group_cipher: %d", self->ap_info.record.group_cipher);
208+
ESP_EARLY_LOGW(TAG, "11b: %d", self->ap_info.record.phy_11b);
209+
ESP_EARLY_LOGW(TAG, "11g: %d", self->ap_info.record.phy_11g);
210+
ESP_EARLY_LOGW(TAG, "11n: %d", self->ap_info.record.phy_11n);
211+
ESP_EARLY_LOGW(TAG, "phy_lr: %d", self->ap_info.record.phy_lr);
212+
ESP_EARLY_LOGW(TAG, "country: %s", self->ap_info.record.country);
213+
ESP_EARLY_LOGW(TAG, "countryCC: %s", self->ap_info.record.country.cc);
197214
memcpy(&ap_info->record, &self->ap_info.record, sizeof(wifi_ap_record_t));
198215
return MP_OBJ_FROM_PTR(ap_info);
199216
}

0 commit comments

Comments
 (0)