You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
I have searched the issue tracker for a similar issue and not found a similar issue.
General issue report
ESP-IDF: tested on v4.4.6 and v5.3.1
Expected behavior:
Delete number of addresses matching those provided by pointer, leaving other addresses intact.
Actual behavior:
Selected address is deleted, but resulting list of addresses after deletion is incorrect. Repeated address adding and deleting results in pandora situation.
Add following code to the end of main (after all init is done)
Flash to device and see log output
// XXX Debug test group addrintaddrCount=0;
mesh_addr_t*group_list=NULL;
esp_err_tret=ESP_FAIL;
// Initialize and set the list of 3 group addressesuint8_tgroup_ids[3][6] = {{0x01, 0x00, 0x5e, 0x00, 0x00, 0x01}, {0x01, 0x00, 0x5e, 0x00, 0x00, 0x02}, {0x01, 0x00, 0x5e, 0x00, 0x00, 0x03}};
esp_mesh_set_group_id((mesh_addr_t*)group_ids, 3);
// Check current listaddrCount=esp_mesh_get_group_num();
ESP_LOGI(MESH_TAG, "Group addresses count: %i", addrCount);
// Print addressesgroup_list=heap_caps_malloc(sizeof(mesh_addr_t) *addrCount, MALLOC_CAP_8BIT);
esp_mesh_get_group_list((mesh_addr_t*)group_list, addrCount);
for(inti=0; i<addrCount; i++) {
ESP_LOGI(MESH_TAG, "Group address %i: "MACSTR, i, MAC2STR((uint8_t*)&group_list[i]));
}
free(group_list);
// Delete last addressret=esp_mesh_delete_group_id((constmesh_addr_t*)group_ids[2], 1);
ESP_LOGI(MESH_TAG, "Delete last address: %s", esp_err_to_name(ret));
// Check current listaddrCount=esp_mesh_get_group_num();
ESP_LOGI(MESH_TAG, "Group addresses count: %i", addrCount);
// Print addressesgroup_list=heap_caps_malloc(sizeof(mesh_addr_t) *addrCount, MALLOC_CAP_8BIT);
esp_mesh_get_group_list((mesh_addr_t*)group_list, addrCount);
for(inti=0; i<addrCount; i++) {
ESP_LOGI(MESH_TAG, "Group address %i: "MACSTR, i, MAC2STR((uint8_t*)&group_list[i]));
}
free(group_list);
// Add third address againret=esp_mesh_set_group_id((mesh_addr_t*)group_ids[2], 1);
ESP_LOGI(MESH_TAG, "Add third address again: %s", esp_err_to_name(ret));
// Check current listaddrCount=esp_mesh_get_group_num();
ESP_LOGI(MESH_TAG, "Group addresses count: %i", addrCount);
// Print addressesgroup_list=heap_caps_malloc(sizeof(mesh_addr_t) *addrCount, MALLOC_CAP_8BIT);
esp_mesh_get_group_list((mesh_addr_t*)group_list, addrCount);
for(inti=0; i<addrCount; i++) {
ESP_LOGI(MESH_TAG, "Group address %i: "MACSTR, i, MAC2STR((uint8_t*)&group_list[i]));
}
free(group_list);
// Delete last address again to find pandoraret=esp_mesh_delete_group_id((constmesh_addr_t*)group_ids[2], 1);
ESP_LOGI(MESH_TAG, "Delete last address again: %s", esp_err_to_name(ret));
// Check current listaddrCount=esp_mesh_get_group_num();
ESP_LOGI(MESH_TAG, "Group addresses count: %i", addrCount);
// Print addressesgroup_list=heap_caps_malloc(sizeof(mesh_addr_t) *addrCount, MALLOC_CAP_8BIT);
esp_mesh_get_group_list((mesh_addr_t*)group_list, addrCount);
for(inti=0; i<addrCount; i++) {
ESP_LOGI(MESH_TAG, "Group address %i: "MACSTR, i, MAC2STR((uint8_t*)&group_list[i]));
}
free(group_list);
Expected Log output:
I (2564) mesh_main: Group addresses count: 3
I (2564) mesh_main: Group address 0: 01:00:5e:00:00:01
I (2564) mesh_main: Group address 1: 01:00:5e:00:00:02
I (2574) mesh_main: Group address 2: 01:00:5e:00:00:03
I (2574) mesh_main: Delete last address: ESP_OK
I (2584) mesh_main: Group addresses count: 2
I (2584) mesh_main: Group address 0: 01:00:5e:00:00:01
I (2594) mesh_main: Group address 1: 01:00:5e:00:00:02
I (2604) mesh_main: Add third address again: ESP_OK
I (2604) mesh_main: Group addresses count: 3
I (2614) mesh_main: Group address 0: 01:00:5e:00:00:01
I (2614) mesh_main: Group address 1: 01:00:5e:00:00:02
I (2624) mesh_main: Group address 2: 01:00:5e:00:00:03
I (2634) mesh_main: Delete last address again: ESP_OK
I (2634) mesh_main: Group addresses count: 2
I (2614) mesh_main: Group address 0: 01:00:5e:00:00:01
I (2614) mesh_main: Group address 1: 01:00:5e:00:00:02
Actual Log output:
I (2564) mesh_main: Group addresses count: 3
I (2564) mesh_main: Group address 0: 01:00:5e:00:00:01
I (2564) mesh_main: Group address 1: 01:00:5e:00:00:02
I (2574) mesh_main: Group address 2: 01:00:5e:00:00:03
I (2574) mesh_main: Delete last address: ESP_OK
I (2584) mesh_main: Group addresses count: 2
I (2584) mesh_main: Group address 0: 01:00:5e:00:00:02
I (2594) mesh_main: Group address 1: 00:00:00:00:00:00
I (2604) mesh_main: Add third address again: ESP_OK
I (2604) mesh_main: Group addresses count: 3
I (2614) mesh_main: Group address 0: 01:00:5e:00:00:02
I (2614) mesh_main: Group address 1: 00:00:00:00:00:00
I (2624) mesh_main: Group address 2: 01:00:5e:00:00:03
E (2624) mesh: [mesh.c,2685] pandora
I (2634) mesh_main: Delete last address again: ESP_OK
I (2634) mesh_main: Group addresses count: 2
I (2644) mesh_main: Group address 0: 01:00:5e:00:00:02
I (2644) mesh_main: Group address 1: 00:00:00:00:00:00
Edit: also added an example of adding the address back after deletion and how to find pandora.
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
[ESP-WIFI-MESH] esp_mesh_delete_group_id() not working as expected
[ESP-WIFI-MESH] esp_mesh_delete_group_id() not working as expected (IDFGH-13893)
Oct 16, 2024
mmrein
changed the title
[ESP-WIFI-MESH] esp_mesh_delete_group_id() not working as expected (IDFGH-13893)
[ESP-WIFI-MESH] esp_mesh_delete_group_id() not working correctly, with pandora condition (IDFGH-13893)
Oct 16, 2024
Answers checklist.
General issue report
ESP-IDF: tested on v4.4.6 and v5.3.1
Expected behavior:
Delete number of addresses matching those provided by pointer, leaving other addresses intact.
Actual behavior:
Selected address is deleted, but resulting list of addresses after deletion is incorrect. Repeated address adding and deleting results in
pandora
situation.Steps to reproduce:
Expected Log output:
Actual Log output:
Edit: also added an example of adding the address back after deletion and how to find pandora.
The text was updated successfully, but these errors were encountered: