espressif/esp-mesh-lite

Hidden mode AP not working! (AEGHB-891)

Closed this issue · 5 comments

Checklist

  • Checked the issue tracker for similar issues to ensure this is not a duplicate
  • Read the documentation to confirm the issue is not addressed there and your configuration is set correctly
  • Tested with the latest version to ensure the issue hasn't been fixed

How often does this bug occurs?

always

Expected behavior

I'm planning to develop a firmware for controlling devices in a mesh network (>100 units). I updated to the latest commit (necessary for OTA), and found this bug! I took the local_control example and slightly modified the code to reproduce the situation. Source code and logs are attached. Thanks in advance!

Actual behavior (suspected bug)

Hidden mode not working!

Source code:

/*

  • SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
  • SPDX-License-Identifier: Apache-2.0
    */

#include <inttypes.h>
#include "esp_log.h"
#include "esp_mac.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/timers.h"

#include "esp_wifi.h"
#include "nvs_flash.h"
#include <sys/socket.h>

#include "esp_bridge.h"
#include "esp_mesh_lite.h"

#define PAYLOAD_LEN (1456) /**< Max payload size(in bytes) */

static int g_sockfd = -1;
static const char *TAG = "local_control";

/**

  • @brief Create a tcp client
    */
    static int socket_tcp_client_create(const char *ip, uint16_t port)
    {
    ESP_LOGD(TAG, "Create a tcp client, ip: %s, port: %d", ip, port);

    esp_err_t ret = ESP_OK;
    int sockfd = -1;
    struct ifreq iface;
    memset(&iface, 0x0, sizeof(iface));
    struct sockaddr_in server_addr = {
    .sin_family = AF_INET,
    .sin_port = htons(port),
    .sin_addr.s_addr = inet_addr(ip),
    };

    sockfd = socket(AF_INET, SOCK_STREAM, 0);
    if (sockfd < 0) {
    ESP_LOGE(TAG, "socket create, sockfd: %d", sockfd);
    goto ERR_EXIT;
    }

    esp_netif_get_netif_impl_name(esp_netif_get_handle_from_ifkey("WIFI_STA_DEF"), iface.ifr_name);
    if (setsockopt(sockfd, SOL_SOCKET, SO_BINDTODEVICE, &iface, sizeof(struct ifreq)) != 0) {
    ESP_LOGE(TAG, "Bind [sock=%d] to interface %s fail", sockfd, iface.ifr_name);
    }

    ret = connect(sockfd, (struct sockaddr *)&server_addr, sizeof(struct sockaddr_in));
    if (ret < 0) {
    ESP_LOGD(TAG, "socket connect, ret: %d, ip: %s, port: %d",
    ret, ip, port);
    goto ERR_EXIT;
    }
    return sockfd;

ERR_EXIT:

if (sockfd != -1) {
    close(sockfd);
}

return -1;

}

void tcp_client_write_task(void *arg)
{
size_t size = 0;
int count = 0;
char *data = NULL;
esp_err_t ret = ESP_OK;
uint8_t sta_mac[6] = {0};

esp_wifi_get_mac(ESP_IF_WIFI_STA, sta_mac);

ESP_LOGI(TAG, "TCP client write task is running");

while (1) {
    if (g_sockfd == -1) {
        vTaskDelay(500 / portTICK_PERIOD_MS);
        g_sockfd = socket_tcp_client_create(CONFIG_SERVER_IP, CONFIG_SERVER_PORT);
        continue;
    }

    vTaskDelay(3000 / portTICK_PERIOD_MS);

    size = asprintf(&data, "{\"src_addr\": \"" MACSTR "\",\"data\": \"Hello TCP Server!\",\"level\": %d,\"count\": %d}\r\n",
                    MAC2STR(sta_mac), esp_mesh_lite_get_level(), count++);

    ESP_LOGD(TAG, "TCP write, size: %d, data: %s", size, data);
    ret = write(g_sockfd, data, size);
    free(data);

    if (ret <= 0) {
        ESP_LOGE(TAG, "<%s> TCP write", strerror(errno));
        close(g_sockfd);
        g_sockfd = -1;
        continue;
    }
}

ESP_LOGI(TAG, "TCP client write task is exit");

close(g_sockfd);
g_sockfd = -1;
if (data) {
    free(data);
}
vTaskDelete(NULL);

}

/**

  • @brief Timed printing system information
    */
    static void print_system_info_timercb(TimerHandle_t timer)
    {
    uint8_t primary = 0;
    uint8_t sta_mac[6] = {0};
    wifi_ap_record_t ap_info = {0};
    wifi_second_chan_t second = 0;
    wifi_sta_list_t wifi_sta_list = {0x0};

    esp_wifi_sta_get_ap_info(&ap_info);
    esp_wifi_get_mac(ESP_IF_WIFI_STA, sta_mac);
    esp_wifi_ap_get_sta_list(&wifi_sta_list);
    esp_wifi_get_channel(&primary, &second);

    ESP_LOGI(TAG, "System information, channel: %d, layer: %d, self mac: " MACSTR ", parent bssid: " MACSTR
    ", parent rssi: %d, free heap: %"PRIu32"", primary,
    esp_mesh_lite_get_level(), MAC2STR(sta_mac), MAC2STR(ap_info.bssid),
    (ap_info.rssi != 0 ? ap_info.rssi : -120), esp_get_free_heap_size());
    #if CONFIG_MESH_LITE_MAXIMUM_NODE_NUMBER
    ESP_LOGI(TAG, "child node number: %ld", esp_mesh_lite_get_child_node_number());
    #endif /* MESH_LITE_NODE_INFO_REPORT */
    for (int i = 0; i < wifi_sta_list.num; i++) {
    ESP_LOGI(TAG, "Child mac: " MACSTR, MAC2STR(wifi_sta_list.sta[i].mac));
    }
    }

static void ip_event_sta_got_ip_handler(void *arg, esp_event_base_t event_base,
int32_t event_id, void *event_data)
{
static bool tcp_task = false;

if (!tcp_task) {
    xTaskCreate(tcp_client_write_task, "tcp_client_write_task", 4 * 1024, NULL, 5, NULL);
    tcp_task = true;
}

}

static esp_err_t esp_storage_init(void)
{
esp_err_t ret = nvs_flash_init();

if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) {
    // NVS partition was truncated and needs to be erased
    // Retry nvs_flash_init
    ESP_ERROR_CHECK(nvs_flash_erase());
    ret = nvs_flash_init();
}

return ret;

}

static void wifi_init(void)
{
// Station
wifi_config_t wifi_config = {
.sta = {
.ssid = CONFIG_ROUTER_SSID,
.password = CONFIG_ROUTER_PASSWORD,
},
};
esp_bridge_wifi_set_config(WIFI_IF_STA, &wifi_config);

// Softap
snprintf((char *)wifi_config.ap.ssid, sizeof(wifi_config.ap.ssid), "%s", CONFIG_BRIDGE_SOFTAP_SSID);
strlcpy((char *)wifi_config.ap.password, CONFIG_BRIDGE_SOFTAP_PASSWORD, sizeof(wifi_config.ap.password));
esp_bridge_wifi_set_config(WIFI_IF_AP, &wifi_config);

}

void app_wifi_set_softap_info(void)
{
char softap_ssid[32];
char softap_psw[64];
uint8_t softap_mac[6];
size_t size = sizeof(softap_psw);
esp_wifi_get_mac(WIFI_IF_AP, softap_mac);
memset(softap_ssid, 0x0, sizeof(softap_ssid));

#ifdef CONFIG_BRIDGE_SOFTAP_SSID_END_WITH_THE_MAC
snprintf(softap_ssid, sizeof(softap_ssid), "%.25s_%02x%02x%02x", CONFIG_BRIDGE_SOFTAP_SSID, softap_mac[3], softap_mac[4], softap_mac[5]);
#else
snprintf(softap_ssid, sizeof(softap_ssid), "%.32s", CONFIG_BRIDGE_SOFTAP_SSID);
#endif
if (esp_mesh_lite_get_softap_ssid_from_nvs(softap_ssid, &size) != ESP_OK) {
esp_mesh_lite_set_softap_ssid_to_nvs(softap_ssid);
}
if (esp_mesh_lite_get_softap_psw_from_nvs(softap_psw, &size) != ESP_OK) {
esp_mesh_lite_set_softap_psw_to_nvs(CONFIG_BRIDGE_SOFTAP_PASSWORD);
}
esp_mesh_lite_set_softap_info(softap_ssid, CONFIG_BRIDGE_SOFTAP_PASSWORD);
}
static void mesh_lite_handler(void *arg, esp_event_base_t event_base, int32_t event_id, void *event_data)
{
esp_mesh_lite_node_info_t *mesh_lite_event = (esp_mesh_lite_node_info_t *) event_data;
struct esp_ip4_addr addr;
addr.addr = mesh_lite_event->ip_addr;
switch (event_id) {
case ESP_MESH_LITE_EVENT_NODE_JOIN:
{
ESP_LOGW(TAG,
"[Node Join] Level:[%d] Mac:[" MACSTR "] IP:[" IPSTR "]",
mesh_lite_event->level,
MAC2STR(mesh_lite_event->mac_addr),
IP2STR(&addr));
break;
}

case ESP_MESH_LITE_EVENT_NODE_LEAVE:
	{
		ESP_LOGW(TAG,
			"[Node  Leave] Level:[%d]  Mac:[" MACSTR "] IP:[" IPSTR "]", 
			mesh_lite_event->level,
			MAC2STR(mesh_lite_event->mac_addr),
			IP2STR(&addr));
		
		break;
	}
case ESP_MESH_LITE_EVENT_NODE_CHANGE:
	{
		ESP_LOGW(TAG,
			"[Node change] Level:[%d]  Mac:[" MACSTR "] IP:[" IPSTR "]", 
			mesh_lite_event->level,
			MAC2STR(mesh_lite_event->mac_addr),
			IP2STR(&addr));
		break;
	}
}

}
void app_main()
{
/**
* @brief Set the log level for serial port printing.
/
esp_log_level_set("
", ESP_LOG_INFO);

esp_storage_init();

ESP_ERROR_CHECK(esp_netif_init());
ESP_ERROR_CHECK(esp_event_loop_create_default());

esp_bridge_create_all_netif();

wifi_init();
//FIX this bug please!!!
{
	wifi_config_t wifi_config;
	esp_wifi_get_config(WIFI_IF_AP, &wifi_config);
	wifi_config.ap.ssid_hidden = true;// if enable it, leve 2 node not connect (not find) to AP
	esp_wifi_set_config(WIFI_IF_AP, &wifi_config);
}
esp_mesh_lite_config_t mesh_lite_config = ESP_MESH_LITE_DEFAULT_INIT();
esp_mesh_lite_init(&mesh_lite_config);

app_wifi_set_softap_info();

esp_mesh_lite_start();

/**
 * @breif Create handler
 */
ESP_ERROR_CHECK(esp_event_handler_instance_register(IP_EVENT, IP_EVENT_STA_GOT_IP, &ip_event_sta_got_ip_handler, NULL, NULL));
ESP_ERROR_CHECK(esp_event_handler_instance_register(ESP_MESH_LITE_EVENT, ESP_EVENT_ANY_ID, &mesh_lite_handler, NULL, NULL));

TimerHandle_t timer = xTimerCreate("print_system_info", 10000 / portTICK_PERIOD_MS,
                                   true, NULL, print_system_info_timercb);
xTimerStart(timer, 0);

}

Error logs or terminal output

DEVICE1:

=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2024.11.25 09:41:20 =~=~=~=~=~=~=~=~=~=~=~=
aI (1177) wifi:Total power save buffer number: 16
�[0;32mI (1179) esp_netif_lwip: DHCP server started on interface WIFI_AP_DEF with IP: 192.168.5.1�[0m
�[0;32mI (1180) bridge_wifi: SoftAP config changed, deauth all station�[0m
I (1190) wifi:Total power save buffer number: 16
�[0;32mI (1191) esp_netif_lwip: DHCP server started on interface WIFI_AP_DEF with IP: 192.168.5.1�[0m
�[0;32mI (1199) Mesh-Lite: esp-mesh-lite component version: 1.0.0�[0m
I (1205) ESPNOW: espnow [version: 1.0] init
�[0;32mI (1209) [vendor_ie]: Mesh-Lite commit id: 7e45e27
 �[0m
�[0;32mI (1215) [vendor_ie]: Mesh ID: 77 �[0m
W (1220) wifi:Haven't to connect to a suitable AP now!
�[0;32mI (1225) [ESP_Mesh_Lite_Comm]: msg action add success �[0m
�[0;32mI (1231) [ESP_Mesh_Lite_Comm]: Bind Socket 54, port 6364 �[0m
�[0;32mI (1236) [ESP_Mesh_Lite_Comm]: Bind Socket 55, port 6363 �[0m
�[0;32mI (1242) [ESP_Mesh_Lite_Comm]: Bind Socket 56, port 6366 �[0m
�[0;32mI (1248) [ESP_Mesh_Lite_Comm]: Bind Socket 57, port 6365 �[0m
�[0;32mI (1255) [mesh-lite-espnow]: Start espnow task �[0m
�[0;32mI (1259) [ESP_Mesh_Lite_Comm]: msg action add success �[0m
�[0;32mI (1266) Mesh-Lite: Mesh-Lite connecting�[0m
�[0;32mI (1271) [vendor_ie]: esp_mesh_lite_wifi_scan_start return ESP_OK �[0m
�[0;32mI (1277) main_task: Returned from app_main()�[0m
�[0;32mI (2805) [vendor_ie]: Mesh-Lite Scan done �[0m
W (2806) wifi:Haven't to connect to a suitable AP now!
�[0;32mI (2806) [vendor_ie]: now parent node   : bssid:74:65:5f:77:69:66, rssi:-110, level:-1 �[0m
�[0;32mI (2812) [vendor_ie]: update parent node: bssid:40:4c:ca:57:f0:3d, rssi:-81, level:1 �[0m
�[0;32mI (3121) [vendor_ie]: RTC store: temp_mesh_id:255; ssid:; bssid:00:00:00:00:00:00; crc:591270722 �[0m
W (11277) wifi:Haven't to connect to a suitable AP now!
�[0;32mI (11277) local_control: System information, channel: 1, layer: 0, self mac: 54:32:04:0c:21:00, parent bssid: 00:00:00:00:00:00, parent rssi: -120, free heap: 286184�[0m
�[0;32mI (11286) local_control: child node number: 0�[0m
�[0;32mI (16224) [vendor_ie]: esp_mesh_lite_wifi_scan_start return ESP_OK �[0m
�[0;32mI (18360) [vendor_ie]: Mesh-Lite Scan done �[0m
�[0;32mI (18361) [vendor_ie]: RTC store: temp_mesh_id:255; ssid:SOLO_MESH; bssid:00:00:00:00:00:00; crc:2887904440 �[0m
�[0;32mI (18365) [vendor_ie]: wifi_cfg SOLO_MESH router_config SOLO_MESH �[0m
W (18371) wifi:(itwt)itwt_stop_process!
�[0;32mI (18375) [vendor_ie]: esp_mesh_lite_wifi_connect return ESP_OK �[0m
I (20517) wifi:ap channel adjust o:1,1 n:13,2
I (20517) wifi:new:<13,0>, old:<1,1>, ap:<13,2>, sta:<13,0>, prof:1, snd_ch_cfg:0x0
I (20518) wifi:(connect)dot11_authmode:0x6, pairwise_cipher:0x3, group_cipher:0x3
I (20525) wifi:state: init -> auth (0xb0)
I (20642) wifi:state: auth -> assoc (0x0)
I (20650) wifi:Association refused temporarily time 1000, comeback time 1100 (TUs)
�[0;32mI (21277) local_control: System information, channel: 13, layer: 1, self mac: 54:32:04:0c:21:00, parent bssid: 1c:1b:b5:d2:d1:42, parent rssi: -33, free heap: 285708�[0m
�[0;32mI (21281) local_control: child node number: 0�[0m
I (21777) wifi:state: assoc -> auth (0xb0)
I (21893) wifi:state: auth -> assoc (0x0)
I (21913) wifi:(assoc)RESP, Extended Capabilities length:8, operating_mode_notification:0
I (21914) wifi:(assoc)RESP, Extended Capabilities, MBSSID:0, TWT Responder:0, OBSS Narrow Bandwidth RU In OFDMA Tolerance:0
I (21921) wifi:Extended Capabilities length:8, operating_mode_notification:1
I (21928) wifi:state: assoc -> run (0x10)
I (21932) wifi:(trc)phytype:CBW20-SGI, snr:65, maxRate:144, highestRateIdx:0
W (21938) wifi:(trc)band:2G, phymode:3, highestRateIdx:0, lowestRateIdx:11, dataSchedTableSize:14
I (21947) wifi:(trc)band:2G, rate(S-MCS7, rateIdx:0), ampdu(rate:S-MCS7, schedIdx(0, stop:8)), snr:65, ampduState:wait operational
I (21958) wifi:ifidx:0, rssi:-33, nf:-98, phytype(0x3, CBW20-SGI), phymode(0x3, 11bgn), max_rate:144, he:0, vht:0, ht:1
I (21969) wifi:(ht)max.RxAMPDULenExponent:3(65535 bytes), MMSS:5(4 us)
I (21987) wifi:connected with SOLO_MESH, aid = 1, channel 13, BW20, bssid = 1c:1b:b5:d2:d1:42
I (21987) wifi:cipher(pairwise:0x3, group:0x3), pmf:1, security:WPA3-SAE, phy:11bgn, rssi:-33
I (21993) wifi:pm start, type: 1, twt_start:0

I (21997) wifi:pm start, type:1, aid:0x1, trans-BSSID:1c:1b:b5:d2:d1:42, BSSID[5]:0x42, mbssid(max-indicator:0, index:0), he:0
I (22008) wifi:dp: 1, bi: 102400, li: 3, scale listen interval from 307200 us to 307200 us
I (22016) wifi:set rx beacon pti, rx_bcn_pti: 10, bcn_timeout: 25000, mt_pti: 10, mt_time: 10000
�[0;32mI (22038) bridge_common: [WIFI_AP_DEF ]Name Server1: 192.168.240.1�[0m
I (22051) wifi:dp: 2, bi: 102400, li: 4, scale listen interval from 307200 us to 409600 us
I (22051) wifi:AP's beacon interval = 102400 us, DTIM period = 2
�[0;32mI (23026) esp_netif_handlers: sta ip: 192.168.240.191, mask: 255.255.255.0, gw: 192.168.240.1�[0m
�[0;32mI (23026) bridge_wifi: Connected with IP Address:192.168.240.191�[0m
�[0;32mI (23031) [vendor_ie]: RTC store: temp_mesh_id:191; ssid:SOLO_MESH; bssid:00:00:00:00:00:00; crc:4148663483 �[0m
�[0;33mW (23044) local_control: [Node  Join]  Level:[1]  Mac:[54:32:04:0c:21:00] IP:[192.168.240.191]�[0m
�[0;32mI (23051) local_control: TCP client write task is running�[0m
�[0;32mI (31277) local_control: System information, channel: 13, layer: 1, self mac: 54:32:04:0c:21:00, parent bssid: 1c:1b:b5:d2:d1:42, parent rssi: -35, free heap: 280036�[0m
�[0;32mI (31281) local_control: child node number: 1�[0m
�[0;32mI (41277) local_control: System information, channel: 13, layer: 1, self mac: 54:32:04:0c:21:00, parent bssid: 1c:1b:b5:d2:d1:42, parent rssi: -37, free heap: 279308�[0m
�[0;32mI (41281) local_control: child node number: 1�[0m
�[0;32mI (51277) local_control: System information, channel: 13, layer: 1, self mac: 54:32:04:0c:21:00, parent bssid: 1c:1b:b5:d2:d1:42, parent rssi: -36, free heap: 280128�[0m
�[0;32mI (51281) local_control: child node number: 1�[0m
�[0;32mI (61277) local_control: System information, channel: 13, layer: 1, self mac: 54:32:04:0c:21:00, parent bssid: 1c:1b:b5:d2:d1:42, parent rssi: -36, free heap: 280056�[0m
�[0;32mI (61281) local_control: child node number: 1�[0m
�[0;32mI (71277) local_control: System information, channel: 13, layer: 1, self mac: 54:32:04:0c:21:00, parent bssid: 1c:1b:b5:d2:d1:42, parent rssi: -34, free heap: 279740�[0m
�[0;32mI (71281) local_control: child node number: 1�[0m
�[0;32mI (81277) local_control: System information, channel: 13, layer: 1, self mac: 54:32:04:0c:21:00, parent bssid: 1c:1b:b5:d2:d1:42, parent rssi: -34, free heap: 279964�[0m
�[0;32mI (81281) local_control: child node number: 1�[0m
�[0;32mI (91277) local_control: System information, channel: 13, layer: 1, self mac: 54:32:04:0c:21:00, parent bssid: 1c:1b:b5:d2:d1:42, parent rssi: -36, free heap: 279892�[0m
�[0;32mI (91281) local_control: child node number: 1�[0m
�[0;32mI (101277) local_control: System information, channel: 13, layer: 1, self mac: 54:32:04:0c:21:00, parent bssid: 1c:1b:b5:d2:d1:42, parent rssi: -36, free heap: 279984�[0m
�[0;32mI (101281) local_control: child node number: 1�[0m
�[0;32mI (111277) local_control: System information, channel: 13, layer: 1, self mac: 54:32:04:0c:21:00, parent bssid: 1c:1b:b5:d2:d1:42, parent rssi: -35, free heap: 279984�[0m
�[0;32mI (111281) local_control: child node number: 1�[0m
�[0;32mI (121277) local_control: System information, channel: 13, layer: 1, self mac: 54:32:04:0c:21:00, parent bssid: 1c:1b:b5:d2:d1:42, parent rssi: -35, free heap: 279636�[0m
�[0;32mI (121282) local_control: child node number: 1�[0m
�[0;32mI (131277) local_control: System information, channel: 13, layer: 1, self mac: 54:32:04:0c:21:00, parent bssid: 1c:1b:b5:d2:d1:42, parent rssi: -36, free heap: 279944�[0m
�[0;32mI (131281) local_control: child node number: 1�[0m
�[0;32mI (141277) local_control: System information, channel: 13, layer: 1, self mac: 54:32:04:0c:21:00, parent bssid: 1c:1b:b5:d2:d1:42, parent rssi: -35, free heap: 279944�[0m
�[0;32mI (141281) local_control: child node number: 1�[0m

Device 2:

=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2024.11.25 09:41:49 =~=~=~=~=~=~=~=~=~=~=~=
�[0;32mI (2866) [vendor_ie]: Mesh-Lite Scan done �[0m
W (2867) wifi:Haven't to connect to a suitable AP now!
�[0;32mI (2867) [vendor_ie]: now parent node   : bssid:74:65:5f:77:69:66, rssi:-110, level:-1 �[0m
�[0;32mI (2874) [vendor_ie]: update parent node: bssid:54:32:04:0c:21:01, rssi:-39, level:1 �[0m
�[0;32mI (3183) [vendor_ie]: RTC store: temp_mesh_id:255; ssid:; bssid:00:00:00:00:00:00; crc:591270722 �[0m
W (11338) wifi:Haven't to connect to a suitable AP now!
�[0;32mI (11338) local_control: System information, channel: 1, layer: 0, self mac: 40:4c:ca:57:f0:3c, parent bssid: 00:00:00:00:00:00, parent rssi: -120, free heap: 285892�[0m
�[0;32mI (11347) local_control: child node number: 0�[0m
�[0;32mI (16287) [vendor_ie]: esp_mesh_lite_wifi_scan_start return ESP_OK �[0m
�[0;32mI (18121) [vendor_ie]: Mesh-Lite Scan done �[0m
W (18122) wifi:Haven't to connect to a suitable AP now!
�[0;32mI (18122) [vendor_ie]: now parent node   : bssid:74:65:5f:77:69:66, rssi:-108, level:-1 �[0m
�[0;32mI (18129) [vendor_ie]: update parent node: bssid:54:32:04:0c:21:01, rssi:-39, level:1 �[0m
�[0;32mI (18438) [vendor_ie]: RTC store: temp_mesh_id:255; ssid:; bssid:00:00:00:00:00:00; crc:591270722 �[0m
W (21338) wifi:Haven't to connect to a suitable AP now!
�[0;32mI (21338) local_control: System information, channel: 1, layer: 0, self mac: 40:4c:ca:57:f0:3c, parent bssid: 00:00:00:00:00:00, parent rssi: -120, free heap: 285892�[0m
�[0;32mI (21347) local_control: child node number: 0�[0m
�[0;32mI (26287) [vendor_ie]: esp_mesh_lite_wifi_scan_start return ESP_OK �[0m
�[0;32mI (27279) [vendor_ie]: Mesh-Lite Scan done �[0m
W (27280) wifi:Haven't to connect to a suitable AP now!
�[0;32mI (27280) [vendor_ie]: now parent node   : bssid:74:65:5f:77:69:66, rssi:-108, level:-1 �[0m
�[0;32mI (27287) [vendor_ie]: update parent node: bssid:54:32:04:0c:21:01, rssi:-39, level:1 �[0m
�[0;32mI (27596) [vendor_ie]: RTC store: temp_mesh_id:255; ssid:; bssid:00:00:00:00:00:00; crc:591270722 �[0m
W (31338) wifi:Haven't to connect to a suitable AP now!
�[0;32mI (31338) local_control: System information, channel: 1, layer: 0, self mac: 40:4c:ca:57:f0:3c, parent bssid: 00:00:00:00:00:00, parent rssi: -120, free heap: 285884�[0m
�[0;32mI (31347) local_control: child node number: 0�[0m
�[0;32mI (36287) [vendor_ie]: esp_mesh_lite_wifi_scan_start return ESP_OK �[0m
�[0;32mI (37340) [vendor_ie]: Mesh-Lite Scan done �[0m
�[0;32mI (37341) [vendor_ie]: RTC store: temp_mesh_id:255; ssid:SOLO_MESH; bssid:00:00:00:00:00:00; crc:2887904440 �[0m
�[0;32mI (37345) [vendor_ie]: wifi_cfg SOLO_MESH router_config SOLO_MESH �[0m
W (37352) wifi:(itwt)itwt_stop_process!
�[0;32mI (37356) [vendor_ie]: esp_mesh_lite_wifi_connect return ESP_OK �[0m
I (39501) wifi:ap channel adjust o:1,1 n:13,2
I (39501) wifi:new:<13,0>, old:<1,1>, ap:<13,2>, sta:<13,0>, prof:1, snd_ch_cfg:0x0
I (39502) wifi:(connect)dot11_authmode:0x6, pairwise_cipher:0x3, group_cipher:0x3
I (39509) wifi:state: init -> auth (0xb0)
I (39623) wifi:state: auth -> assoc (0x0)
I (39628) wifi:Association refused temporarily time 1000, comeback time 1100 (TUs)
I (40754) wifi:state: assoc -> auth (0xb0)
I (40865) wifi:state: auth -> assoc (0x0)
I (40893) wifi:(assoc)RESP, Extended Capabilities length:8, operating_mode_notification:0
I (40893) wifi:(assoc)RESP, Extended Capabilities, MBSSID:0, TWT Responder:0, OBSS Narrow Bandwidth RU In OFDMA Tolerance:0
I (40901) wifi:Extended Capabilities length:8, operating_mode_notification:1
I (40908) wifi:state: assoc -> run (0x10)
I (40911) wifi:(trc)phytype:CBW20-SGI, snr:45, maxRate:144, highestRateIdx:0
W (40918) wifi:(trc)band:2G, phymode:3, highestRateIdx:0, lowestRateIdx:11, dataSchedTableSize:14
I (40927) wifi:(trc)band:2G, rate(S-MCS7, rateIdx:0), ampdu(rate:S-MCS7, schedIdx(0, stop:8)), snr:45, ampduState:wait operational
I (40938) wifi:ifidx:0, rssi:-52, nf:-97, phytype(0x3, CBW20-SGI), phymode(0x3, 11bgn), max_rate:144, he:0, vht:0, ht:1
I (40949) wifi:(ht)max.RxAMPDULenExponent:3(65535 bytes), MMSS:5(4 us)
I (40965) wifi:connected with SOLO_MESH, aid = 3, channel 13, BW20, bssid = 1c:1b:b5:d2:d1:42
I (40965) wifi:cipher(pairwise:0x3, group:0x3), pmf:1, security:WPA3-SAE, phy:11bgn, rssi:-52
I (40972) wifi:pm start, type: 1, twt_start:0

I (40975) wifi:pm start, type:1, aid:0x3, trans-BSSID:1c:1b:b5:d2:d1:42, BSSID[5]:0x42, mbssid(max-indicator:0, index:0), he:0
I (40987) wifi:dp: 1, bi: 102400, li: 3, scale listen interval from 307200 us to 307200 us
I (40995) wifi:set rx beacon pti, rx_bcn_pti: 10, bcn_timeout: 25000, mt_pti: 10, mt_time: 10000
�[0;32mI (41022) bridge_common: [WIFI_AP_DEF ]Name Server1: 192.168.240.1�[0m
I (41035) wifi:dp: 2, bi: 102400, li: 4, scale listen interval from 307200 us to 409600 us
I (41035) wifi:AP's beacon interval = 102400 us, DTIM period = 2
�[0;32mI (41286) [vendor_ie]: esp_mesh_lite_wifi_scan_start return ESP_OK �[0m
�[0;32mI (41338) local_control: System information, channel: 13, layer: 1, self mac: 40:4c:ca:57:f0:3c, parent bssid: 1c:1b:b5:d2:d1:42, parent rssi: -52, free heap: 284668�[0m
�[0;32mI (41343) local_control: child node number: 0�[0m
�[0;32mI (41647) [ESP_Mesh_Lite_Comm]: Mesh-Lite Comm Scan done �[0m
�[0;32mI (41647) [ESP_Mesh_Lite_Comm]: approved: 1 �[0m
�[0;32mI (42005) esp_netif_handlers: sta ip: 192.168.240.244, mask: 255.255.255.0, gw: 192.168.240.1�[0m
�[0;32mI (42006) bridge_wifi: Connected with IP Address:192.168.240.244�[0m
�[0;32mI (42011) [vendor_ie]: RTC store: temp_mesh_id:244; ssid:SOLO_MESH; bssid:00:00:00:00:00:00; crc:4086512829 �[0m
�[0;33mW (42024) local_control: [Node  Join]  Level:[1]  Mac:[40:4c:ca:57:f0:3c] IP:[192.168.240.244]�[0m
�[0;32mI (42030) local_control: TCP client write task is running�[0m
�[0;32mI (42372) [vendor_ie]: esp_mesh_lite_wifi_scan_start return ESP_OK �[0m
�[0;32mI (42733) [ESP_Mesh_Lite_Comm]: Mesh-Lite Comm Scan done �[0m
�[0;32mI (42734) [ESP_Mesh_Lite_Comm]: approved: 1 �[0m
�[0;32mI (51338) local_control: System information, channel: 13, layer: 1, self mac: 40:4c:ca:57:f0:3c, parent bssid: 1c:1b:b5:d2:d1:42, parent rssi: -49, free heap: 279600�[0m
�[0;32mI (51342) local_control: child node number: 1�[0m
�[0;32mI (53373) [vendor_ie]: esp_mesh_lite_wifi_scan_start return ESP_OK �[0m
�[0;32mI (54427) [vendor_ie]: Mesh-Lite Scan done �[0m
�[0;32mI (54428) [vendor_ie]: now parent node   : bssid:1c:1b:b5:d2:d1:42, rssi:-51, level:0 �[0m
�[0;32mI (54430) [vendor_ie]: update parent node: bssid:54:32:04:0c:21:01, rssi:-39, level:1 �[0m
�[0;32mI (54443) [vendor_ie]: Got ESP_Bridge_0c2101 �[0m
�[0;32mI (54443) [vendor_ie]: bssid: 54:32:04:0c:21:01, level: 2 �[0m
�[0;32mI (54450) [vendor_ie]: RTC store: temp_mesh_id:244; ssid:ESP_Bridge_0c2101; bssid:54:32:04:0c:21:01; crc:1975427558 �[0m
W (54461) wifi:Password length matches WPA2 standards, authmode threshold changes from OPEN to WPA2
�[0;32mI (54470) [vendor_ie]: wifi_cfg ESP_Bridge_0c2101 router_config SOLO_MESH �[0m
I (54477) wifi:state: run -> init (0x0)
I (54481) wifi:pm stop, total sleep time: 0 us / 13494224 us

I (54486) wifi:new:<13,0>, old:<13,0>, ap:<13,2>, sta:<13,0>, prof:1, snd_ch_cfg:0x0
�[0;32mI (54495) [vendor_ie]: esp_mesh_lite_wifi_connect return ESP_OK �[0m
�[0;31mE (54502) [ESP_Mesh_Lite_Comm]: Disconnect reason : 8 �[0m
�[0;31mE (57323) [ESP_Mesh_Lite_Comm]: Disconnect reason : 201 �[0m
W (59286) wifi:(itwt)itwt_stop_process!
�[0;32mI (59287) [vendor_ie]: esp_mesh_lite_wifi_connect return ESP_OK �[0m
�[0;32mI (59287) [ESP_Mesh_Lite_Comm]: Retry to connect to the AP �[0m
W (61338) wifi:Haven't to connect to a suitable AP now!
�[0;32mI (61338) local_control: System information, channel: 13, layer: 0, self mac: 40:4c:ca:57:f0:3c, parent bssid: 00:00:00:00:00:00, parent rssi: -120, free heap: 279184�[0m
�[0;32mI (61347) local_control: child node number: 1�[0m
�[0;31mE (62115) [ESP_Mesh_Lite_Comm]: Disconnect reason : 201 �[0m
W (64286) wifi:(itwt)itwt_stop_process!
�[0;32mI (64287) [vendor_ie]: esp_mesh_lite_wifi_connect return ESP_OK �[0m
�[0;32mI (64287) [ESP_Mesh_Lite_Comm]: Retry to connect to the AP �[0m
�[0;31mE (67115) [ESP_Mesh_Lite_Comm]: Disconnect reason : 201 �[0m
W (71338) wifi:Haven't to connect to a suitable AP now!
�[0;32mI (71338) local_control: System information, channel: 13, layer: 0, self mac: 40:4c:ca:57:f0:3c, parent bssid: 00:00:00:00:00:00, parent rssi: -120, free heap: 279224�[0m
�[0;32mI (71347) local_control: child node number: 1�[0m
�[0;32mI (74287) [vendor_ie]: esp_mesh_lite_wifi_scan_start return ESP_OK �[0m
�[0;32mI (74978) [vendor_ie]: Mesh-Lite Scan done �[0m
W (74979) wifi:Haven't to connect to a suitable AP now!
�[0;32mI (74979) [vendor_ie]: now parent node   : bssid:01:00:00:00:00:d0, rssi:-108, level:-1 �[0m
�[0;32mI (74986) [vendor_ie]: update parent node: bssid:54:32:04:0c:21:01, rssi:-41, level:1 �[0m
�[0;32mI (74998) [vendor_ie]: Got ESP_Bridge_0c2101 �[0m
�[0;32mI (74999) [vendor_ie]: bssid: 54:32:04:0c:21:01, level: 2 �[0m
�[0;32mI (75006) [vendor_ie]: RTC store: temp_mesh_id:244; ssid:ESP_Bridge_0c2101; bssid:54:32:04:0c:21:01; crc:1975427558 �[0m
W (75017) wifi:Password length matches WPA2 standards, authmode threshold changes from OPEN to WPA2
�[0;32mI (75026) [vendor_ie]: wifi_cfg ESP_Bridge_0c2101 router_config SOLO_MESH �[0m
W (75033) wifi:(itwt)itwt_stop_process!
�[0;32mI (75038) [vendor_ie]: esp_mesh_lite_wifi_connect return ESP_OK �[0m
�[0;31mE (77866) [ESP_Mesh_Lite_Comm]: Disconnect reason : 201 �[0m
W (81338) wifi:Haven't to connect to a suitable AP now!
�[0;32mI (81338) local_control: System information, channel: 13, layer: 0, self mac: 40:4c:ca:57:f0:3c, parent bssid: 00:00:00:00:00:00, parent rssi: -120, free heap: 279220�[0m
�[0;32mI (81347) local_control: child node number: 1�[0m
�[0;32mI (84287) [vendor_ie]: esp_mesh_lite_wifi_scan_start return ESP_OK �[0m
�[0;32mI (85190) [vendor_ie]: Mesh-Lite Scan done �[0m
�[0;32mI (85191) [vendor_ie]: RTC store: temp_mesh_id:244; ssid:SOLO_MESH; bssid:00:00:00:00:00:00; crc:4086512829 �[0m
�[0;32mI (85195) [vendor_ie]: wifi_cfg SOLO_MESH router_config SOLO_MESH �[0m
W (85202) wifi:(itwt)itwt_stop_process!
�[0;32mI (85205) [vendor_ie]: esp_mesh_lite_wifi_connect return ESP_OK �[0m
I (85274) wifi:new:<13,2>, old:<13,0>, ap:<13,2>, sta:<13,0>, prof:1, snd_ch_cfg:0x0
I (85275) wifi:(connect)dot11_authmode:0x6, pairwise_cipher:0x3, group_cipher:0x3
I (85278) wifi:state: init -> auth (0xb0)
I (85326) wifi:state: auth -> assoc (0x0)
�[0;33mW (85327) local_control: [Node  Leave] Level:[1]  Mac:[40:4c:ca:57:f0:3c] IP:[192.168.240.244]�[0m
I (85332) wifi:(assoc)RESP, Extended Capabilities length:8, operating_mode_notification:0
I (85336) wifi:(assoc)RESP, Extended Capabilities, MBSSID:0, TWT Responder:0, OBSS Narrow Bandwidth RU In OFDMA Tolerance:0
I (85346) wifi:Extended Capabilities length:8, operating_mode_notification:1
I (85353) wifi:state: assoc -> run (0x10)
I (85357) wifi:(trc)phytype:CBW20-SGI, snr:43, maxRate:144, highestRateIdx:0
W (85364) wifi:(trc)band:2G, phymode:3, highestRateIdx:0, lowestRateIdx:11, dataSchedTableSize:14
I (85372) wifi:(trc)band:2G, rate(S-MCS7, rateIdx:0), ampdu(rate:S-MCS7, schedIdx(0, stop:8)), snr:43, ampduState:wait operational
I (85384) wifi:ifidx:0, rssi:-54, nf:-97, phytype(0x3, CBW20-SGI), phymode(0x3, 11bgn), max_rate:144, he:0, vht:0, ht:1
I (85394) wifi:(ht)max.RxAMPDULenExponent:3(65535 bytes), MMSS:5(4 us)
I (85410) wifi:connected with SOLO_MESH, aid = 3, channel 13, BW20, bssid = 1c:1b:b5:d2:d1:42
I (85411) wifi:cipher(pairwise:0x3, group:0x3), pmf:1, security:WPA3-SAE, phy:11bgn, rssi:-54
I (85417) wifi:pm start, type: 1, twt_start:0

I (85421) wifi:pm start, type:1, aid:0x3, trans-BSSID:1c:1b:b5:d2:d1:42, BSSID[5]:0x42, mbssid(max-indicator:0, index:0), he:0
I (85432) wifi:dp: 1, bi: 102400, li: 3, scale listen interval from 307200 us to 307200 us
I (85440) wifi:set rx beacon pti, rx_bcn_pti: 10, bcn_timeout: 25000, mt_pti: 10, mt_time: 10000
I (85477) wifi:dp: 2, bi: 102400, li: 4, scale listen interval from 307200 us to 409600 us
I (85477) wifi:AP's beacon interval = 102400 us, DTIM period = 2
�[0;32mI (86450) esp_netif_handlers: sta ip: 192.168.240.244, mask: 255.255.255.0, gw: 192.168.240.1�[0m
�[0;32mI (86450) bridge_wifi: Connected with IP Address:192.168.240.244�[0m
�[0;32mI (86456) [vendor_ie]: RTC store: temp_mesh_id:244; ssid:SOLO_MESH; bssid:00:00:00:00:00:00; crc:4086512829 �[0m
�[0;33mW (86469) local_control: [Node  Join]  Level:[1]  Mac:[40:4c:ca:57:f0:3c] IP:[192.168.240.244]�[0m
�[0;32mI (86814) [vendor_ie]: esp_mesh_lite_wifi_scan_start return ESP_OK �[0m
�[0;32mI (87175) [ESP_Mesh_Lite_Comm]: Mesh-Lite Comm Scan done �[0m
�[0;32mI (87175) [ESP_Mesh_Lite_Comm]: approved: 1 �[0m
�[0;32mI (91338) local_control: System information, channel: 13, layer: 1, self mac: 40:4c:ca:57:f0:3c, parent bssid: 1c:1b:b5:d2:d1:42, parent rssi: -53, free heap: 279128�[0m
�[0;32mI (91342) local_control: child node number: 1�[0m
�[0;32mI (98597) [vendor_ie]: esp_mesh_lite_wifi_scan_start return ESP_OK �[0m
�[0;32mI (100733) [vendor_ie]: Mesh-Lite Scan done �[0m
�[0;32mI (100734) [vendor_ie]: now parent node   : bssid:1c:1b:b5:d2:d1:42, rssi:-50, level:0 �[0m
�[0;32mI (100736) [vendor_ie]: update parent node: bssid:54:32:04:0c:21:01, rssi:-42, level:1 �[0m
�[0;32mI (100748) [vendor_ie]: Got ESP_Bridge_0c2101 �[0m
�[0;32mI (100749) [vendor_ie]: bssid: 54:32:04:0c:21:01, level: 2 �[0m
�[0;32mI (100756) [vendor_ie]: RTC store: temp_mesh_id:244; ssid:ESP_Bridge_0c2101; bssid:54:32:04:0c:21:01; crc:1975427558 �[0m
W (100767) wifi:Password length matches WPA2 standards, authmode threshold changes from OPEN to WPA2
�[0;32mI (100776) [vendor_ie]: wifi_cfg ESP_Bridge_0c2101 router_config SOLO_MESH �[0m
I (100784) wifi:state: run -> init (0x0)
I (100788) wifi:pm stop, total sleep time: 0 us / 15355127 us

I (100793) wifi:new:<13,0>, old:<13,2>, ap:<13,2>, sta:<13,0>, prof:1, snd_ch_cfg:0x0
�[0;32mI (100802) [vendor_ie]: esp_mesh_lite_wifi_connect return ESP_OK �[0m
�[0;31mE (100810) [ESP_Mesh_Lite_Comm]: Disconnect reason : 8 �[0m
W (101338) wifi:Haven't to connect to a suitable AP now!
�[0;32mI (101338) local_control: System information, channel: 4, layer: 0, self mac: 40:4c:ca:57:f0:3c, parent bssid: 00:00:00:00:00:00, parent rssi: -120, free heap: 279204�[0m
�[0;32mI (101347) local_control: child node number: 1�[0m
�[0;31mE (103630) [ESP_Mesh_Lite_Comm]: Disconnect reason : 201 �[0m
W (105286) wifi:(itwt)itwt_stop_process!
�[0;32mI (105287) [vendor_ie]: esp_mesh_lite_wifi_connect return ESP_OK �[0m
�[0;32mI (105287) [ESP_Mesh_Lite_Comm]: Retry to connect to the AP �[0m
�[0;31mE (108115) [ESP_Mesh_Lite_Comm]: Disconnect reason : 201 �[0m
W (110286) wifi:(itwt)itwt_stop_process!
�[0;32mI (110287) [vendor_ie]: esp_mesh_lite_wifi_connect return ESP_OK �[0m
�[0;32mI (110287) [ESP_Mesh_Lite_Comm]: Retry to connect to the AP �[0m
W (111338) wifi:Haven't to connect to a suitable AP now!
�[0;32mI (111338) local_control: System information, channel: 13, layer: 0, self mac: 40:4c:ca:57:f0:3c, parent bssid: 00:00:00:00:00:00, parent rssi: -120, free heap: 279224�[0m
�[0;32mI (111347) local_control: child node number: 1�[0m
�[0;31mE (113115) [ESP_Mesh_Lite_Comm]: Disconnect reason : 201 �[0m

Steps to reproduce the behavior

Nothing

Project release version

master

System architecture

Intel/AMD 64-bit (modern PC, older Mac)

Operating system

Windows

Operating system version

Windows 11

Shell

other (details in Additional context)

Additional context

VisualGDB

tswen commented

This is very strange. I used the mesh local control example to test the hidden SSID scene connection and there was no problem. Did you change anything else? Looking at the log, the device has obtained the SSID of its parent node, but it did not find the corresponding AP when connecting to Wi-Fi.

Maybe there are still settings for the mesh on the flash?
I did a lot of experiments and changed various parameters.
Also, I want to move many settings from the preprocessor to the flash? Is there some function that I can call to clear the flash that mesh_lite uses?

I tried to use esp-bootloader-plus and got some problems. Is there any plan to support esp-bootloader-plus with mesh-lite?

tswen commented

I tried to use esp-bootloader-plus and got some problems. Is there any plan to support esp-bootloader-plus with mesh-lite?

These two are different solutions and do not conflict. What problem do you encounter?

Problem solved! If anyone is interested, then while experimenting, at some point I executed the following code:
...
wifi_country_t country = {
.cc = "JP",
.schan = 1,
.nchan = 14,
.policy = WIFI_COUNTRY_POLICY_AUTO,
};
esp_wifi_set_country(&country);
...
and after that I didn't return it back! Clearing the flash didn't lead to anything! Remembering this, I returned everything to default, and everything worked!