espressif / esp-mesh-lite

A lite version Wi-Fi Mesh, each node can access the network over the IP layer.
126 stars 18 forks source link

IDF5.1+meshlite(Guru Meditation Error: Core 0 panic'ed (Double exception). ) (AEGHB-380) #27

Closed 287662354 closed 1 year ago

287662354 commented 1 year ago

最近更新到5.1IDF后一开meshlite就 崩溃重启 错误LOG如下 ` (00:10:06.119) bridge_common: esp-iot-bridge version: 0.7.1 I (00:10:06.135) pp: pp rom version: e7ae62f I (00:10:06.140) net80211: net80211 rom version: e7ae62f I (9256) wifi:wifi driver task: 3fcb2208, prio:23, stack:6144, core=0 I (9256) wifi:wifi firmware version: ce9244d I (9256) wifi:wifi certification version: v7.0 I (9256) wifi:config NVS flash: enabled I (9266) wifi:config nano formating: enabled I (9266) wifi:Init data frame dynamic rx buffer num: 32 I (9276) wifi:Init management frame dynamic rx buffer num: 32 I (9276) wifi:Init management short buffer num: 32 I (9286) wifi:Init static tx buffer num: 16 I (9286) wifi:Init tx cache buffer num: 32 I (9296) wifi:Init static tx FG buffer num: 2 I (9296) wifi:Init static rx buffer size: 1600 I (9296) wifi:Init static rx buffer num: 10 I (9306) wifi:Init dynamic rx buffer num: 32 I (00:10:06.207) wifi_init: rx ba win: 6 I (00:10:06.211) wifi_init: tcpip mbox: 32 I (00:10:06.216) wifi_init: udp mbox: 6 I (00:10:06.220) wifi_init: tcp mbox: 6 I (00:10:06.225) wifi_init: tcp tx win: 5744 I (00:10:06.230) wifi_init: tcp rx win: 5744 I (00:10:06.235) wifi_init: tcp mss: 1440 I (00:10:06.239) wifi_init: WiFi/LWIP prefer SPIRAM I (00:10:06.245) wifi_init: WiFi IRAM OP enabled I (00:10:06.250) wifi_init: WiFi RX IRAM OP enabled I (00:10:06.256) phy_init: phy_version 601,98f2a71,Jun 29 2023,09:58:12 I (9396) wifi:mode : null I (00:10:06.292) ip select: IP Address:192.168.4.1 I (00:10:06.293) ip select: GW Address:192.168.4.1 I (00:10:06.294) ip select: NM Address:255.255.255.0 I (00:10:06.300) bridge_wifi: IP Address:192.168.4.1 Add netif ap with 1a045ac(commit id) I (00:10:06.309) bridge_common: netif list add success I (9416) wifi:mode : softAP (34:85:18:46:c6:65) I (9426) wifi:Total power save buffer number: 8 I (9426) wifi:Init max length of beacon: 752/752 I (9426) wifi:Init max length of beacon: 752/752 I (9436) wifi:Disabled PMF config for SoftAP I (9436) wifi:Total power save buffer number: 8 Add netif sta with 1a045ac(commit id) I (00:10:06.342) esp_netif_lwip: DHCP server started on interface WIFI_AP_DEF with IP: 192.168.4.1 I (00:10:06.354) bridge_common: netif list add success I (9456) wifi:mode : sta (34:85:18:46:c6:64) + softAP (34:85:18:46:c6:65) I (9466) wifi:enable tsf I (00:10:06.368) bridge_wifi: Found ssid m8 I (00:10:06.372) bridge_wifi: Found password m1234567 I (9476) wifi:Disabled PMF config for STA I (00:10:06.382) bridge_wifi: sta ssid: m2 password: m1234567 I (10656) wifi:Total power save buffer number: 8 I (00:10:07.552) bridge_wifi: softap ssid: ESP_Bridge_46c665 password: 12345678 I (00:10:07.553) esp_netif_lwip: DHCP server started on interface WIFI_AP_DEF with IP: 192.168.4.1 I (00:10:07.563) mesh_lite_ay: cheak5 I (00:10:07.566) mesh_lite_ay: cheak6 I (00:10:07.571) mesh_lite_ay: cheak7 I (00:10:07.575) Mesh-Lite: esp-mesh-lite component version: 0.7.0 Mesh-Lite commit id: 34377a9 I (10686) vendor_ie: Mesh ID: 119 W (10686) vendor_ie: Error Get[4354] W (10696) vendor_ie: Error Get[4354] I (10696) ESP_Mesh_Lite_Comm: msg action add success I (10706) ESP_Mesh_Lite_Comm: Bind Socket 54, port 6364 I (10706) ESP_Mesh_Lite_Comm: Bind Socket 55, port 6363 I (10716) ESP_Mesh_Lite_Comm: Bind Socket 56, port 6366 I (10716) ESP_Mesh_Lite_Comm: msg action add success I (10726) ESP_Mesh_Lite_Comm: Bind Socket 57, port 6365 I (00:10:07.626) mesh_lite_ay: cheak8 I (00:10:07.637) Mesh-Lite: Mesh-Lite connecting I (13576) vendor_ie: Mesh-Lite Scan done Guru Meditation Error: Core 0 panic'ed (Double exception).

Core 0 register dump: PC : 0x40384fd2 PS : 0x00040b36 A0 : 0x820febae A1 : 0x3fcc04e0
0x40384fd2: _xt_context_save at /home/ai/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/xtensa_context.S:203

A2 : 0x3fca6178 A3 : 0x00000000 A4 : 0x00000000 A5 : 0x00cd8c2c
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x82060ce7 A9 : 0x3fcc04c0
A10 : 0x00000000 A11 : 0x0000000a A12 : 0x0000000c A13 : 0x00000008
A14 : 0x3fcd648e A15 : 0x00000008 SAR : 0x00000010 EXCCAUSE: 0x00000002
EXCVADDR: 0xfffffff8 LBEG : 0x40056f5c LEND : 0x40056f72 LCOUNT : 0xffffffff
0x40056f5c: memcpy in ROM

0x40056f72: memcpy in ROM

Backtrace: 0x40384fcf:0x3fcc04e0 0x420febab:0x403743c0 |<-CORRUPTED 0x40384fcf: _xt_context_save at /home/ai/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/xtensa_context.S:202

0x420febab: esp_event_loop_run at /home/ai/esp/esp-idf/components/esp_event/esp_event.c:601 (discriminator 3)

0x403743c0: _DoubleExceptionVector at /home/ai/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/xtensa_vectors.S:564

ELF file SHA256: 48eaad2943d36b32

Rebooting... ESP-ROM:esp32s3-20210327 Build:Mar 27 2021 rst:0x3 (RTC_SW_SYS_RST),boot:0x2b (SPI_FAST_FLASH_BOOT) Saved PC:0x40375c48 0x40375c48: esp_restart_noos_dig at /home/ai/esp/esp-idf/components/esp_system/port/esp_system_chip.c:57 (discriminator 1)

SPIWP:0xee mode:DIO, clock div:1 load:0x3fce3818,len:0x1884 load:0x403c9700,len:0x4 load:0x403c9704,len:0xda4 load:0x403cc700,len:0x3130 entry 0x403c9934 I (27) boot: ESP-IDF v5.1.1-233-gf0437b945f-dirty 2nd stage bootloader`

代码如下: `esp_bridge_create_all_netif(); wifi_init(); ESP_LOGI("mesh_lite_ay", "cheak5");

// = ESP_MESH_LITE_DEFAULT_INIT();

esp_mesh_lite_config_t mesh_lite_config = {
    .vendor_id[0] = 0x22,
    .vendor_id[1] = 0x33,

    .mesh_id = 0x77,
    .max_connect_number = CONFIG_BRIDGE_SOFTAP_MAX_CONNECT_NUMBER,
    .max_router_number = CONFIG_MESH_LITE_MAX_ROUTER_NUMBER,
    .max_level = CONFIG_MESH_LITE_MAXIMUM_LEVEL_ALLOWED,
    .join_mesh_ignore_router_status = JOIN_MESH_IGNORE_ROUTER_STATUS,
    .join_mesh_without_configured_wifi = JOIN_MESH_WITHOUT_CONFIGURED_WIFI_INFO,
    .leaf_node = LEAF_NODE,
    .ota_data_len = OTA_DATA_LEN,
    .ota_wnd = OTA_WND_DEFAULT,
    .softap_ssid = CONFIG_BRIDGE_SOFTAP_SSID,
    .softap_password = CONFIG_BRIDGE_SOFTAP_PASSWORD,
    .device_category = CONFIG_DEVICE_CATEGORY};

ESP_LOGI("mesh_lite_ay", "cheak6");

//  strcpy(mesh_lite_config.device_category, "mjk");
ESP_LOGI("mesh_lite_ay", "cheak7");

esp_mesh_lite_init(&mesh_lite_config);
ESP_LOGI("mesh_lite_ay", "cheak8");

esp_mesh_lite_start();

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(WIFI_EVENT, ESP_EVENT_ANY_ID, &sta_event_connect, NULL, NULL));

int m = 0;
while (1)
{

    // if (esp_mesh_lite_get_level() > ROOT)
    // {
    //     esp_mesh_lite_send_msg_to_parent("nima");
    // }

    //  printf("当前层级为:%d\r\n", esp_mesh_lite_get_level());

    m = m + 2;
    vTaskDelay(500);
    ESP_LOGI("mesh_lite_ay", "c7");
}

static esp_err_t wifi_init(void) {

wifi_config_t wifi_config = {
    .sta = {
        .ssid = "m2",
        .password = "m1234567",
    },
};

//    strcpy((char *)wifi_config.sta.ssid, DEVICEINFO.wifi_infometion.ssid);
//    strcpy((char *)wifi_config.sta.password, DEVICEINFO.wifi_infometion.password);

esp_bridge_wifi_set(WIFI_MODE_STA, (char *)wifi_config.sta.ssid, (char *)wifi_config.sta.password, NULL);

// // Softap
memset(&wifi_config, 0x0, sizeof(wifi_config_t));
// size_t softap_ssid_len = sizeof(wifi_config.ap.ssid);
// if (esp_mesh_lite_get_softap_ssid_from_nvs((char *)wifi_config.ap.ssid, &softap_ssid_len) != ESP_OK)
// {
snprintf((char *)wifi_config.ap.ssid, sizeof(wifi_config.ap.ssid), "%s", CONFIG_BRIDGE_SOFTAP_SSID);
// }
// size_t softap_psw_len = sizeof(wifi_config.ap.password);
// if (esp_mesh_lite_get_softap_psw_from_nvs((char *)wifi_config.ap.password, &softap_psw_len) != ESP_OK)
// {

strlcpy((char *)wifi_config.ap.password, CONFIG_BRIDGE_SOFTAP_PASSWORD, sizeof(wifi_config.ap.password));
// }
esp_bridge_wifi_set(WIFI_MODE_AP, (char *)wifi_config.ap.ssid, (char *)wifi_config.ap.password, NULL);

return ESP_OK;

}

`

tswen commented 1 year ago

https://github.com/tswen/esp-mesh-lite/tree/feature/support_idf_5_1