|
42 | 42 |
|
43 | 43 | #define MAC_ADDRESS_LENGTH 6
|
44 | 44 |
|
| 45 | +#include "components/log/include/esp_log.h" |
| 46 | + |
| 47 | +static const char* TAG = "wifi"; |
| 48 | + |
45 | 49 | static void start_station(wifi_radio_obj_t *self) {
|
46 | 50 | if (self->sta_mode) {
|
47 | 51 | return;
|
@@ -194,6 +198,19 @@ mp_obj_t common_hal_wifi_radio_get_ap_info(wifi_radio_obj_t *self) {
|
194 | 198 | if (esp_wifi_sta_get_ap_info(&self->ap_info.record) != ESP_OK){
|
195 | 199 | return mp_const_none;
|
196 | 200 | } 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); |
197 | 214 | memcpy(&ap_info->record, &self->ap_info.record, sizeof(wifi_ap_record_t));
|
198 | 215 | return MP_OBJ_FROM_PTR(ap_info);
|
199 | 216 | }
|
|
0 commit comments