espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.67k stars 7.29k forks source link

Mesh v1.1 examples not working (IDFGH-11080) #12254

Open ruslanslobozhenuk opened 1 year ago

ruslanslobozhenuk commented 1 year ago

Answers checklist.

General issue report

I compiled the rpr_client example from the master branch and received an error message:

I (698) BLE_INIT: BT controller compile version [3a1003f] I (698) BLE_INIT: Bluetooth MAC: 34:b4:72:7f:f1:8e I (698) phy_init: phy_version 1110,9c20f0a,Jul 27 2023,10:42:54 Bluetooth Mesh v1.1 commit: [ccd76b06e2] E (758) BLE_MESH: Bluetooth Mesh v1.1 init failed I (758) EXAMPLE: ESP_BLE_MESH_PROVISIONER_SET_DEV_UUID_MATCH_COMP_EVT, err_code 0 E (758) BLE_MESH: No provisioning context provided E (768) BLE_MESH: Failed to create network I (768) EXAMPLE: ESP_BLE_MESH_PROVISIONER_PROV_ENABLE_COMP_EVT, err_code -22 E (778) BLE_MESH: Invalid NetKeyIndex 0x0000 I (788) EXAMPLE: ESP_BLE_MESH_PROVISIONER_ADD_LOCAL_APP_KEY_COMP_EVT, err_code -19 I (798) EXAMPLE: BLE Mesh Provisioner initialized I (798) main_task: Returned from app_main()

Since the mesh library is supplied without source code, it is unclear why it does not work.

forx157 commented 1 year ago

@ruslanslobozhenuk Thank you for your use. The issue has now been fixed, and we're trying to merge it into the Github branch as soon as possible. Please wait for the next update.

ruslanslobozhenuk commented 1 year ago

Thank you!

forx157 commented 1 year ago

@ruslanslobozhenuk hello, now the problem is solved, please use the latest version of the master branch.

ruslanslobozhenuk commented 1 year ago

After the last commit, the mesh initialization is successful. When trying to make provision using NRF Mesh, the following happens (example wifi_coexist):

I (2632) main_task: Returned from app_main() esp> I (9434) EXAMPLE: ESP_BLE_MESH_NODE_PROV_LINK_OPEN_EVT, bearer: PB-GATT W (10516) BLE_MESH: No Health Server context provided I (13539) BLE_MESH: Algorithm: 0x00 I (13540) BLE_MESH: Public Key: 0x00 I (13540) BLE_MESH: Auth Method: 0x00 I (13551) BLE_MESH: Auth Action: 0x00 I (13552) BLE_MESH: Auth Size: 0x00 I (13831) BLE_MESH: Remote Random: 9ff1a399b091a00367a50b368a925d66 W (13931) BLE_MESH: No Health Server context provided I (13933) BLE_MESH: Primary Element: 0x0127 I (13933) BLE_MESH: net_idx 0x0000 flags 0x00 iv_index 0x0000 I (13944) BLE_MESH: DevKey 4483f849ef5421a9c89fdd69e16abc37 I (13946) BLE_MESH: NetKey 46fdd2644e2da313c6c8f9d0706db28c E (13957) BLE_MESH: Not connected I (13961) BLE_MESH: Primary address 0x0127, element count 1 I (13965) BLE_MESH: Scan is already started I (13973) EXAMPLE: ESP_BLE_MESH_NODE_PROV_COMPLETE_EVT I (13974) EXAMPLE: net_idx: 0x0000, unicast_addr: 0x0127 I (13985) EXAMPLE: flags: 0x00, iv_index: 0x00000000 W (14998) BT_APPL: gattc_conn_cb: if=4 st=0 id=4 rsn=0x13 W (15002) BT_HCI: hcif disc complete: hdl 0x2, rsn 0x13 I (47080) BLE_MESH: recv, app_idx 0xfffe src 0x0100 dst 0x0127 I (47081) BLE_MESH: recv, len 3: 8008ff I (47082) BLE_MESH: send, app_idx 0xfffe src 0x0127 dst 0x0100 I (47093) BLE_MESH: send, len 30: 0200e502000000003c000300000003020000010000100000000001000000 I (47105) BLE_MESH: Seg, send_tag 0x03, send_szmic 0, aszmic 0 I (47107) BLE_MESH: Use security credentials 0x00, proxy 0 I (47119) BLE_MESH: Network PDU, count 0, interval 20 I (47122) BLE_MESH: Use security credentials 0x00, proxy 0 I (47128) BLE_MESH: Network PDU, count 0, interval 20 I (47130) BLE_MESH: Use security credentials 0x00, proxy 0 I (47142) BLE_MESH: Network PDU, count 0, interval 20 I (47976) BLE_MESH: Attempts: 3 I (47977) BLE_MESH: Resending 0/2, cred 0x00 I (47983) BLE_MESH: Resending 1/2, cred 0x00 I (47986) BLE_MESH: Resending 2/2, cred 0x00 I (48831) BLE_MESH: Attempts: 2 I (48832) BLE_MESH: Resending 0/2, cred 0x00 I (48838) BLE_MESH: Resending 1/2, cred 0x00 I (48840) BLE_MESH: Resending 2/2, cred 0x00 I (49686) BLE_MESH: Attempts: 1 I (49687) BLE_MESH: Resending 0/2, cred 0x00 I (49693) BLE_MESH: Resending 1/2, cred 0x00 I (49696) BLE_MESH: Resending 2/2, cred 0x00 I (50541) BLE_MESH: Attempts: 0 I (50542) BLE_MESH: Resending 0/2, cred 0x00 I (50548) BLE_MESH: Resending 1/2, cred 0x00 I (50551) BLE_MESH: Resending 2/2, cred 0x00 W (51396) BLE_MESH: Ran out of retransmit attempts I (63021) BLE_MESH: Seg 0/1 received I (63070) BLE_MESH: Seg 1/1 received I (63072) BLE_MESH: Use security credentials 0x00, proxy 0 I (63073) BLE_MESH: Network PDU, count 2, interval 20 I (63086) BLE_MESH: recv, app_idx 0xfffe src 0x0100 dst 0x0127 I (63088) BLE_MESH: recv, len 20: 00000000781e233999807f7e6517033787a876c2 I (63093) BLE_MESH: send, app_idx 0xfffe src 0x0127 dst 0x0100 I (63106) BLE_MESH: send, len 6: 800300000000 I (63107) BLE_MESH: Unseg, send_tag 0x02, send_szmic 0, aszmic 0 I (63109) BLE_MESH: Use security credentials 0x00, proxy 0 I (63122) BLE_MESH: Network PDU, count 2, interval 20 I (63125) EXAMPLE: example_ble_mesh_config_server_cb, event = 0x00, opcode = 0x0000, addr: 0x0100 I (63137) EXAMPLE: Config Server get Config AppKey Add

At the same time, I can add an App key and I see from the logs that the board receives it, but there is no ACK for confirmation. It's also not possible to get Device composition data ((( Board ESP32S3 Dev Kit

ruslanslobozhenuk commented 1 year ago

After commit 'revert/ble_mesh_example_changes' provision new ble_mesh node not working! (((

forx157 commented 11 months ago

@ruslanslobozhenuk I apologize for the delayed response. I am currently using the master branch, iOS NRF Mesh v4.0.1, and have not encountered this issue. Could you please provide information about your testing environment?

ruslanslobozhenuk commented 11 months ago

I am using Android NRF Mesh 3.3.2 from Google Play Market

chegewara commented 8 months ago

Hi, I am having the same issue with master branch (v5.3.x) and I am not sure it is problem with nrf mesh app. There is another app in the store called nrf mesh sniffer. This app can catch all adv beacons and with provided keys to decode them. With old esp ble mesh v1.0 app mesh sniffer can see secure network beacons as authenticated, which means its decoded with provided key. With esp ble mesh v1.1 app its not working, because no packets captured.

Thanks

ps. i found workaround to provisiong issue with mesh v1.1 devices

ps4. i finaly find this