BUG - v3..3 beta : esp_mesh_set_router doesn't seem to work
Posted: Sun Feb 03, 2019 3:14 pm
Hi All,
Related to my post about Mesh and Smart Config. As part of my debugging I removed all the smart config calls and tried manually setting the router info using esp_mesh_set_router once the mesh has triggered the "no parent" event (as I deliberately started the mesh with incorrect SSID). The code is as follows (I have obviously changed the actual SSID and Password )
The log shows the following
The last 4 lines then repeat as it retries until it eventually triggers a "No parent" event and the whole process starts again.
Looking at the log, it would appear that it is looking on channel 0 instead of channel 1 shown in the "cfg" section. The mesh was originally started using channel 1 and the parameter to esp_mesh_set_router doesn't take channel as an option.
Anyone have any ideas? Does this look like a bug?
thanks
Lee.
Related to my post about Mesh and Smart Config. As part of my debugging I removed all the smart config calls and tried manually setting the router info using esp_mesh_set_router once the mesh has triggered the "no parent" event (as I deliberately started the mesh with incorrect SSID). The code is as follows (I have obviously changed the actual SSID and Password )
Code: Select all
mesh_router_t newinfo;
strcpy((char*)newinfo.ssid, "MySSID");
strcpy((char*)newinfo.password,"password" );
newinfo.ssid_len = strlen((char*) newinfo.ssid);
newinfo.allow_router_switch = true;
ESP_LOGI(HOMEIOT_TAG, "About to call set router org ssid[%s] password[%s] len[%d]", newinfo.ssid, newinfo.password, newinfo.ssid_len);
ESP_ERROR_CHECK( esp_mesh_set_router(&newinfo));
Code: Select all
I (16591) mesh_node: MeshNodeEvent: <MESH_EVENT_NO_PARENT_FOUND>scan times:60
I (16601) HomeIoT: About to call set router org ssid[MySSID] password[password] len[6]
I (16611) mesh: <MESH_NWK_LOOK_FOR_NETWORK>router<cfg:0d:fd:3f:0c:00:00> is allowed to switch, find routers with SSID:MySSID
I (16941) mesh: [FIND][ch:1]AP:1, otherID:0, MAP:0, idle:0, candidate:0, root:0[00:00:00:00:00:00]
I (16941) wifi_node: WIFINodeEvent: Unknown event [1]
I (16941) mesh: [FIND:61]fail to find a network, channel:0, cfg<channel:1, router:MySSID, 0d:fd:3f:0c:00:00>
I (16951) mesh: <MESH_NWK_LOOK_FOR_NETWORK>need_scan:0x3, need_scan_router:0x1, look_for_nwk_count:62
I (17081) mesh: [FIND][ch:1]AP:1, otherID:0, MAP:0, idle:0, candidate:0, root:0[00:00:00:00:00:00]<scan router>
I (17081) wifi_node: WIFINodeEvent: Unknown event [1]
I (17081) mesh: [FIND:62]fail to find a network, channel:0, cfg<channel:1, router:MySSID, 0d:fd:3f:0c:00:00>
Looking at the log, it would appear that it is looking on channel 0 instead of channel 1 shown in the "cfg" section. The mesh was originally started using channel 1 and the parameter to esp_mesh_set_router doesn't take channel as an option.
Anyone have any ideas? Does this look like a bug?
thanks
Lee.