551 lines
19 KiB
C
551 lines
19 KiB
C
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <inttypes.h>
|
|
|
|
#include "freertos/FreeRTOS.h"
|
|
#include "freertos/task.h"
|
|
#include "freertos/event_groups.h"
|
|
|
|
#include "esp_system.h"
|
|
#include "esp_event.h"
|
|
#include "esp_log.h"
|
|
#include "esp_wifi.h"
|
|
|
|
#include "nvs_flash.h"
|
|
#include "esp_netif.h"
|
|
#include "lwip/inet.h"
|
|
|
|
#include "led_strip.h"
|
|
|
|
#include "iperf.h"
|
|
#include "wifi_cfg.h"
|
|
#include "csi_log.h"
|
|
#include "wifi_monitor.h"
|
|
|
|
|
|
static const char *TAG = "main";
|
|
|
|
#if CONFIG_IDF_TARGET_ESP32S3
|
|
#define RGB_LED_GPIO 48
|
|
#elif CONFIG_IDF_TARGET_ESP32C5
|
|
#define RGB_LED_GPIO 27
|
|
#elif CONFIG_IDF_TARGET_ESP32C6
|
|
#define RGB_LED_GPIO 8
|
|
#elif CONFIG_IDF_TARGET_ESP32C3
|
|
#define RGB_LED_GPIO 8
|
|
#elif CONFIG_IDF_TARGET_ESP32S2
|
|
#define RGB_LED_GPIO 18
|
|
#elif CONFIG_IDF_TARGET_ESP32
|
|
#define RGB_LED_GPIO 2
|
|
#else
|
|
#error "Unsupported target - define RGB_LED_GPIO for your board"
|
|
#endif
|
|
|
|
static led_strip_handle_t led_strip;
|
|
static bool wifi_connected = false;
|
|
static bool has_config = false;
|
|
|
|
typedef enum {
|
|
LED_STATE_NO_CONFIG,
|
|
LED_STATE_WAITING,
|
|
LED_STATE_CONNECTED,
|
|
LED_STATE_FAILED,
|
|
LED_STATE_MONITORING
|
|
} led_state_t;
|
|
|
|
static led_state_t current_led_state = LED_STATE_NO_CONFIG;
|
|
|
|
static void rgb_led_init(void)
|
|
{
|
|
led_strip_config_t strip_config = {
|
|
.strip_gpio_num = RGB_LED_GPIO,
|
|
.max_leds = 1,
|
|
};
|
|
|
|
led_strip_rmt_config_t rmt_config = {
|
|
.resolution_hz = 10 * 1000 * 1000,
|
|
};
|
|
|
|
ESP_ERROR_CHECK(led_strip_new_rmt_device(&strip_config, &rmt_config, &led_strip));
|
|
led_strip_clear(led_strip);
|
|
|
|
ESP_LOGI(TAG, "WS2812 RGB LED initialized on GPIO %d", RGB_LED_GPIO);
|
|
}
|
|
|
|
static void set_led_color(uint8_t r, uint8_t g, uint8_t b)
|
|
{
|
|
led_strip_set_pixel(led_strip, 0, r, g, b);
|
|
led_strip_refresh(led_strip);
|
|
}
|
|
|
|
static void led_task(void *arg)
|
|
{
|
|
int blink_state = 0;
|
|
|
|
while(1) {
|
|
switch(current_led_state) {
|
|
case LED_STATE_NO_CONFIG:
|
|
set_led_color(255, 255, 0);
|
|
vTaskDelay(pdMS_TO_TICKS(1000));
|
|
break;
|
|
|
|
case LED_STATE_WAITING:
|
|
if (blink_state) {
|
|
set_led_color(0, 0, 255);
|
|
} else {
|
|
set_led_color(0, 0, 0);
|
|
}
|
|
blink_state = !blink_state;
|
|
vTaskDelay(pdMS_TO_TICKS(1000));
|
|
break;
|
|
|
|
case LED_STATE_CONNECTED:
|
|
set_led_color(0, 255, 0);
|
|
vTaskDelay(pdMS_TO_TICKS(1000));
|
|
break;
|
|
|
|
case LED_STATE_MONITORING:
|
|
set_led_color(0, 0, 255); // Solid BLUE
|
|
vTaskDelay(pdMS_TO_TICKS(1000));
|
|
break;
|
|
|
|
case LED_STATE_FAILED:
|
|
if (blink_state) {
|
|
set_led_color(255, 0, 0);
|
|
} else {
|
|
set_led_color(0, 0, 0);
|
|
}
|
|
blink_state = !blink_state;
|
|
vTaskDelay(pdMS_TO_TICKS(200));
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
// --- CSI support ---------------------------------------------------
|
|
static bool s_csi_enabled = false;
|
|
static uint32_t s_csi_packet_count = 0;
|
|
|
|
static void csi_dump_task(void *arg) {
|
|
vTaskDelay(pdMS_TO_TICKS(20000));
|
|
csi_log_dump_over_uart();
|
|
vTaskDelete(NULL);
|
|
}
|
|
|
|
static void csi_cb(void *ctx, wifi_csi_info_t *info)
|
|
{
|
|
csi_log_append_record(info);
|
|
s_csi_packet_count++;
|
|
|
|
if ((s_csi_packet_count % 100) == 0) {
|
|
ESP_LOGI("CSI", "Captured %lu CSI packets", (unsigned long)s_csi_packet_count);
|
|
}
|
|
}
|
|
|
|
static void wifi_enable_csi_once(void) {
|
|
if (s_csi_enabled) {
|
|
return;
|
|
}
|
|
|
|
esp_err_t err;
|
|
|
|
vTaskDelay(pdMS_TO_TICKS(2000));
|
|
|
|
wifi_csi_config_t csi_cfg;
|
|
|
|
#if CONFIG_IDF_TARGET_ESP32C5
|
|
memset(&csi_cfg, 0, sizeof(csi_cfg));
|
|
csi_cfg.enable = true;
|
|
|
|
#elif CONFIG_IDF_TARGET_ESP32S3
|
|
memset(&csi_cfg, 0, sizeof(csi_cfg));
|
|
csi_cfg.lltf_en = true;
|
|
csi_cfg.htltf_en = true;
|
|
csi_cfg.stbc_htltf2_en = false;
|
|
csi_cfg.ltf_merge_en = false;
|
|
csi_cfg.channel_filter_en = false;
|
|
csi_cfg.manu_scale = false;
|
|
csi_cfg.shift = 0;
|
|
|
|
#else
|
|
#warning "CSI not supported for this target"
|
|
return;
|
|
#endif
|
|
|
|
ESP_LOGI("CSI", "Configuring CSI...");
|
|
|
|
err = esp_wifi_set_csi_config(&csi_cfg);
|
|
if (err != ESP_OK) {
|
|
ESP_LOGE("CSI", "esp_wifi_set_csi_config failed: %s (0x%x)", esp_err_to_name(err), err);
|
|
return;
|
|
}
|
|
ESP_LOGI("CSI", "CSI config OK");
|
|
|
|
err = esp_wifi_set_csi_rx_cb(csi_cb, NULL);
|
|
if (err != ESP_OK) {
|
|
ESP_LOGE("CSI", "esp_wifi_set_csi_rx_cb failed: %s", esp_err_to_name(err));
|
|
return;
|
|
}
|
|
ESP_LOGI("CSI", "CSI callback OK");
|
|
|
|
err = esp_wifi_set_csi(true);
|
|
if (err != ESP_OK) {
|
|
ESP_LOGE("CSI", "esp_wifi_set_csi(true) failed: %s", esp_err_to_name(err));
|
|
return;
|
|
}
|
|
ESP_LOGI("CSI", "CSI enabled!");
|
|
|
|
s_csi_enabled = true;
|
|
}
|
|
|
|
static void csi_init_task(void *arg) {
|
|
wifi_enable_csi_once();
|
|
vTaskDelete(NULL);
|
|
}
|
|
|
|
// --- WiFi Monitor Mode support ---------------------------------------------------
|
|
static bool s_monitor_enabled = false;
|
|
static uint32_t s_monitor_frame_count = 0;
|
|
|
|
static void monitor_frame_callback(const wifi_frame_info_t *frame,
|
|
const uint8_t *payload,
|
|
uint16_t len) {
|
|
s_monitor_frame_count++;
|
|
|
|
// Log first 10 frames in detail
|
|
if (s_monitor_frame_count <= 10) {
|
|
const char *type_str = wifi_frame_type_str(frame->type, frame->subtype);
|
|
ESP_LOGI("MONITOR", "Frame #%lu: %s, NAV: %u us, RSSI: %d dBm, Retry: %d",
|
|
s_monitor_frame_count, type_str, frame->duration_id,
|
|
frame->rssi, frame->retry);
|
|
}
|
|
|
|
// Warn on collision indicators
|
|
if (frame->retry && frame->duration_id > 5000) {
|
|
ESP_LOGW("MONITOR", "⚠ COLLISION: Retry frame with high NAV (%u us)", frame->duration_id);
|
|
}
|
|
|
|
if (frame->duration_id > 30000) {
|
|
ESP_LOGW("MONITOR", "⚠ VERY HIGH NAV: %u us - possible collapse!", frame->duration_id);
|
|
}
|
|
}
|
|
|
|
static void monitor_stats_task(void *arg) {
|
|
while (1) {
|
|
vTaskDelay(pdMS_TO_TICKS(10000)); // Every 10 seconds
|
|
|
|
wifi_collapse_stats_t stats;
|
|
if (wifi_monitor_get_stats(&stats) == ESP_OK) {
|
|
ESP_LOGI("MONITOR", "========================================");
|
|
ESP_LOGI("MONITOR", "WiFi Monitor Statistics:");
|
|
ESP_LOGI("MONITOR", " Total frames: %lu", stats.total_frames);
|
|
ESP_LOGI("MONITOR", " Retry frames: %lu (%.2f%%)",
|
|
stats.retry_frames, stats.retry_rate);
|
|
ESP_LOGI("MONITOR", " High NAV frames: %lu", stats.high_nav_frames);
|
|
ESP_LOGI("MONITOR", " Average NAV: %u us", stats.avg_nav);
|
|
ESP_LOGI("MONITOR", " Max NAV: %u us", stats.max_nav);
|
|
ESP_LOGI("MONITOR", " Collision events: %lu", stats.collision_events);
|
|
|
|
// Check for collapse
|
|
if (wifi_monitor_is_collapsed()) {
|
|
ESP_LOGW("MONITOR", "⚠⚠⚠ WiFi COLLAPSE DETECTED! ⚠⚠⚠");
|
|
ESP_LOGW("MONITOR", " High retry rate: %.2f%%", stats.retry_rate);
|
|
ESP_LOGW("MONITOR", " High avg NAV: %u us", stats.avg_nav);
|
|
} else {
|
|
ESP_LOGI("MONITOR", "✓ WiFi operating normally");
|
|
}
|
|
ESP_LOGI("MONITOR", "========================================");
|
|
}
|
|
}
|
|
}
|
|
|
|
static void wifi_enable_monitor_mode(uint8_t channel) {
|
|
if (s_monitor_enabled) {
|
|
return;
|
|
}
|
|
|
|
ESP_LOGI("MONITOR", "Starting WiFi monitor mode on channel %d", channel);
|
|
|
|
esp_err_t err = wifi_monitor_init(channel, monitor_frame_callback);
|
|
if (err != ESP_OK) {
|
|
ESP_LOGE("MONITOR", "WiFi monitor init failed: %s", esp_err_to_name(err));
|
|
return;
|
|
}
|
|
|
|
err = wifi_monitor_start();
|
|
if (err != ESP_OK) {
|
|
ESP_LOGE("MONITOR", "WiFi monitor start failed: %s", esp_err_to_name(err));
|
|
return;
|
|
}
|
|
|
|
s_monitor_enabled = true;
|
|
current_led_state = LED_STATE_MONITORING;
|
|
|
|
ESP_LOGI("MONITOR", "WiFi monitor started - BLUE LED solid");
|
|
ESP_LOGI("MONITOR", "Capturing 802.11 frames for collapse detection");
|
|
|
|
// Start statistics task
|
|
xTaskCreate(monitor_stats_task, "monitor_stats", 4096, NULL, 5, NULL);
|
|
}
|
|
|
|
static void monitor_init_task(void *arg) {
|
|
// Get the channel from the connected AP
|
|
wifi_ap_record_t ap_info;
|
|
if (esp_wifi_sta_get_ap_info(&ap_info) == ESP_OK) {
|
|
wifi_enable_monitor_mode(ap_info.primary);
|
|
} else {
|
|
// Default to channel 6 if we can't get AP info
|
|
wifi_enable_monitor_mode(6);
|
|
}
|
|
vTaskDelete(NULL);
|
|
}
|
|
|
|
static void event_handler(void* arg, esp_event_base_t event_base,
|
|
int32_t event_id, void* event_data)
|
|
{
|
|
if (event_base == WIFI_EVENT) {
|
|
switch (event_id) {
|
|
case WIFI_EVENT_STA_START:
|
|
ESP_LOGI(TAG, "WiFi started, attempting connection...");
|
|
if (has_config) {
|
|
current_led_state = LED_STATE_WAITING;
|
|
}
|
|
break;
|
|
|
|
case WIFI_EVENT_STA_DISCONNECTED:
|
|
wifi_event_sta_disconnected_t* event = (wifi_event_sta_disconnected_t*) event_data;
|
|
|
|
// Get SSID for better error messages
|
|
wifi_config_t wifi_cfg;
|
|
const char *ssid = "unknown";
|
|
if (esp_wifi_get_config(WIFI_IF_STA, &wifi_cfg) == ESP_OK) {
|
|
ssid = (const char*)wifi_cfg.sta.ssid;
|
|
}
|
|
|
|
// Log disconnect with reason-specific messages
|
|
switch (event->reason) {
|
|
case 201: // WIFI_REASON_NO_AP_FOUND
|
|
ESP_LOGE(TAG, "WiFi disconnected (reason 201): NO AP FOUND");
|
|
ESP_LOGE(TAG, " SSID attempted: '%s'", ssid);
|
|
ESP_LOGE(TAG, " Verify AP is broadcasting and in range");
|
|
break;
|
|
case 202: // WIFI_REASON_AUTH_FAIL
|
|
ESP_LOGE(TAG, "WiFi disconnected (reason 202): AUTH FAILED");
|
|
ESP_LOGE(TAG, " SSID: '%s'", ssid);
|
|
ESP_LOGE(TAG, " Check password is correct");
|
|
break;
|
|
case 15: // WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT
|
|
ESP_LOGE(TAG, "WiFi disconnected (reason 15): 4-WAY HANDSHAKE TIMEOUT");
|
|
ESP_LOGE(TAG, " SSID: '%s'", ssid);
|
|
ESP_LOGE(TAG, " Password may be incorrect");
|
|
break;
|
|
case 2: // WIFI_REASON_AUTH_EXPIRE
|
|
ESP_LOGW(TAG, "WiFi disconnected (reason 2): AUTH EXPIRED");
|
|
ESP_LOGW(TAG, " SSID: '%s' - will retry", ssid);
|
|
break;
|
|
case 8: // WIFI_REASON_ASSOC_LEAVE
|
|
ESP_LOGW(TAG, "WiFi disconnected (reason 8): STATION LEFT");
|
|
ESP_LOGW(TAG, " SSID: '%s' - normal disconnect", ssid);
|
|
break;
|
|
default:
|
|
ESP_LOGW(TAG, "WiFi disconnected from '%s', reason: %d", ssid, event->reason);
|
|
break;
|
|
}
|
|
|
|
if (!wifi_connected && has_config) {
|
|
current_led_state = LED_STATE_FAILED;
|
|
ESP_LOGE(TAG, "WiFi connection FAILED - RED LED blinking");
|
|
}
|
|
break;
|
|
}
|
|
|
|
} else if (event_base == IP_EVENT && event_id == IP_EVENT_STA_GOT_IP) {
|
|
ip_event_got_ip_t* event = (ip_event_got_ip_t*) event_data;
|
|
ESP_LOGI(TAG, "got ip:" IPSTR " gw:" IPSTR " netmask:" IPSTR,
|
|
IP2STR(&event->ip_info.ip),
|
|
IP2STR(&event->ip_info.gw),
|
|
IP2STR(&event->ip_info.netmask));
|
|
|
|
wifi_connected = true;
|
|
current_led_state = LED_STATE_CONNECTED;
|
|
|
|
// Log connection details: SSID, band, channel, bandwidth, RSSI
|
|
wifi_config_t wifi_cfg;
|
|
wifi_ap_record_t ap_info;
|
|
if (esp_wifi_get_config(WIFI_IF_STA, &wifi_cfg) == ESP_OK &&
|
|
esp_wifi_sta_get_ap_info(&ap_info) == ESP_OK) {
|
|
|
|
// Determine band from channel
|
|
const char *band_str = "Unknown";
|
|
if (ap_info.primary >= 1 && ap_info.primary <= 14) {
|
|
band_str = "2.4GHz";
|
|
} else if (ap_info.primary >= 36) {
|
|
band_str = "5GHz";
|
|
}
|
|
|
|
// Get bandwidth - try dual-band API first, fallback to single-band
|
|
wifi_bandwidth_t bw = WIFI_BW_HT20; // Default to 20MHz
|
|
const char *bw_str = "Unknown";
|
|
bool bw_detected = false;
|
|
|
|
// Try esp_wifi_get_bandwidths() first (works on dual-band chips in auto mode)
|
|
wifi_bandwidths_t bandwidths = {0};
|
|
esp_err_t err = esp_wifi_get_bandwidths(WIFI_IF_STA, &bandwidths);
|
|
|
|
if (err == ESP_OK) {
|
|
// Dual-band API succeeded - select bandwidth based on current band
|
|
if (ap_info.primary >= 1 && ap_info.primary <= 14) {
|
|
// 2.4GHz band
|
|
bw = (wifi_bandwidth_t)bandwidths.ghz_2g;
|
|
bw_detected = true;
|
|
} else if (ap_info.primary >= 36) {
|
|
// 5GHz band
|
|
bw = (wifi_bandwidth_t)bandwidths.ghz_5g;
|
|
bw_detected = true;
|
|
}
|
|
} else {
|
|
// Dual-band API failed - try single-band API (ESP32-S3, older IDF)
|
|
err = esp_wifi_get_bandwidth(WIFI_IF_STA, &bw);
|
|
if (err == ESP_OK) {
|
|
bw_detected = true;
|
|
}
|
|
}
|
|
|
|
// Convert bandwidth enum to string
|
|
if (bw_detected) {
|
|
switch (bw) {
|
|
case WIFI_BW_HT20:
|
|
bw_str = "20MHz (HT20)";
|
|
break;
|
|
case WIFI_BW_HT40:
|
|
bw_str = "40MHz (HT40)";
|
|
break;
|
|
case WIFI_BW80:
|
|
bw_str = "80MHz (VHT80)";
|
|
break;
|
|
default:
|
|
bw_str = "Unknown";
|
|
break;
|
|
}
|
|
}
|
|
|
|
ESP_LOGI(TAG, "========================================");
|
|
ESP_LOGI(TAG, "WiFi CONNECTED - BLUE LED solid");
|
|
ESP_LOGI(TAG, " SSID: '%s'", wifi_cfg.sta.ssid);
|
|
ESP_LOGI(TAG, " Band: %s", band_str);
|
|
|
|
// Get configured bandwidth from NVS
|
|
char configured_bw[16] = {0};
|
|
wifi_cfg_get_bandwidth(configured_bw, sizeof(configured_bw));
|
|
|
|
// Show both configured and requested bandwidth, look for wifi_connect in logs to get negotiated
|
|
if (bw_detected) {
|
|
ESP_LOGI(TAG, " Bandwidth: %s (requested) - NVS configured: %s", bw_str, configured_bw);
|
|
|
|
// Warn if mismatch
|
|
bool mismatch = false;
|
|
if (strcmp(configured_bw, "VHT80") == 0 && bw != WIFI_BW80) {
|
|
mismatch = true;
|
|
} else if (strcmp(configured_bw, "HT40") == 0 && bw != WIFI_BW_HT40) {
|
|
mismatch = true;
|
|
} else if (strcmp(configured_bw, "HT20") == 0 && bw != WIFI_BW_HT20) {
|
|
mismatch = true;
|
|
}
|
|
|
|
if (mismatch) {
|
|
ESP_LOGW(TAG, " ⚠ Bandwidth mismatch! Configured %s but negotiated %s", configured_bw, bw_str);
|
|
ESP_LOGW(TAG, " Check: router channel width setting, channel selection, RF interference");
|
|
}
|
|
} else {
|
|
ESP_LOGI(TAG, " Bandwidth: Unknown (configured: %s)", configured_bw);
|
|
}
|
|
|
|
ESP_LOGI(TAG, " Channel: %d", ap_info.primary);
|
|
ESP_LOGI(TAG, " RSSI: %d dBm", ap_info.rssi);
|
|
|
|
// Get and display power save mode
|
|
wifi_ps_type_t ps_mode = wifi_cfg_get_power_save_mode();
|
|
const char *ps_str = "Unknown";
|
|
switch (ps_mode) {
|
|
case WIFI_PS_NONE:
|
|
ps_str = "None (best for CSI)";
|
|
break;
|
|
case WIFI_PS_MIN_MODEM:
|
|
ps_str = "Minimum Modem";
|
|
break;
|
|
case WIFI_PS_MAX_MODEM:
|
|
ps_str = "Maximum Modem";
|
|
break;
|
|
default:
|
|
ps_str = "Unknown";
|
|
break;
|
|
}
|
|
ESP_LOGI(TAG, " PowerSave: %s", ps_str);
|
|
|
|
ESP_LOGI(TAG, " BSSID: %02x:%02x:%02x:%02x:%02x:%02x",
|
|
ap_info.bssid[0], ap_info.bssid[1], ap_info.bssid[2],
|
|
ap_info.bssid[3], ap_info.bssid[4], ap_info.bssid[5]);
|
|
ESP_LOGI(TAG, "========================================");
|
|
} else {
|
|
ESP_LOGI(TAG, "WiFi CONNECTED - BLUE LED solid");
|
|
}
|
|
|
|
// Try CSI first (might fail on ESP32-C5)
|
|
xTaskCreate(csi_init_task, "csi_init", 4096, NULL, 5, NULL);
|
|
|
|
// Start WiFi monitor mode (works reliably)
|
|
vTaskDelay(pdMS_TO_TICKS(2000));
|
|
xTaskCreate(monitor_init_task, "monitor_init", 4096, NULL, 5, NULL);
|
|
|
|
vTaskDelay(pdMS_TO_TICKS(1000));
|
|
|
|
iperf_cfg_t cfg;
|
|
memset(&cfg, 0, sizeof(cfg));
|
|
cfg.flag = IPERF_FLAG_SERVER | IPERF_FLAG_TCP;
|
|
cfg.sport = 5001;
|
|
|
|
iperf_start(&cfg);
|
|
ESP_LOGI(TAG, "iperf TCP server started on port 5001");
|
|
|
|
xTaskCreate(csi_dump_task, "csi_dump_task", 4096, NULL, 5, NULL);
|
|
}
|
|
}
|
|
|
|
void app_main(void) {
|
|
ESP_ERROR_CHECK(nvs_flash_init());
|
|
ESP_ERROR_CHECK(esp_netif_init());
|
|
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
|
ESP_ERROR_CHECK(csi_log_init());
|
|
rgb_led_init();
|
|
|
|
xTaskCreate(led_task, "led_task", 4096, NULL, 5, NULL);
|
|
|
|
ESP_ERROR_CHECK(esp_event_handler_instance_register(
|
|
WIFI_EVENT, ESP_EVENT_ANY_ID, &event_handler, NULL, NULL));
|
|
ESP_ERROR_CHECK(esp_event_handler_instance_register(
|
|
IP_EVENT, IP_EVENT_STA_GOT_IP, &event_handler, NULL, NULL));
|
|
|
|
wifi_cfg_init();
|
|
|
|
if (wifi_cfg_apply_from_nvs()) {
|
|
has_config = true;
|
|
current_led_state = LED_STATE_WAITING;
|
|
ESP_LOGI(TAG, "WiFi config loaded from NVS");
|
|
} else {
|
|
has_config = false;
|
|
current_led_state = LED_STATE_NO_CONFIG;
|
|
ESP_LOGI(TAG, "No WiFi config - YELLOW LED");
|
|
}
|
|
|
|
ESP_LOGI(TAG, "LED Status:");
|
|
ESP_LOGI(TAG, " YELLOW solid = NO CONFIG (send CFG/END)");
|
|
ESP_LOGI(TAG, " BLUE slow blink = Connecting");
|
|
ESP_LOGI(TAG, " GREEN solid = Connected ✓");
|
|
ESP_LOGI(TAG, " BLUE solid = Monitor Mode (capturing 802.11 frames)");
|
|
ESP_LOGI(TAG, " RED fast blink = Failed ✗");
|
|
|
|
while(1) {
|
|
vTaskDelay(pdMS_TO_TICKS(1000));
|
|
}
|
|
}
|