-
Notifications
You must be signed in to change notification settings - Fork 7.7k
ESP-BLE-MESH OnOff Client sending but OnOff Server not receiving #11220
-
Hi,
I follow the guide OnOff Client here:
https://github.com/espressif/esp-idf/blob/v5.4.1/examples/bluetooth/esp_ble_mesh/onoff_models/onoff_client/tutorial/BLE_Mesh_Node_OnOff_Client_Example_Walkthrough.md
and OnOff Server here:
https://github.com/espressif/esp-idf/blob/v5.4.1/examples/bluetooth/esp_ble_mesh/onoff_models/onoff_server/tutorial/BLE_Mesh_Node_OnOff_Server_Example_Walkthrough.md
I have one device with OnOff Client firmware, and 2 devices with OnOff Server firmware. My firmware is based on esp32-arduino, esp-idf 5.4.1, but keep the code aligned with the above examples.
I provision BLE Mesh network using app nRF Mesh Android. Everything is fined. From the app, I can control on/off OnOff server models on 2 server devices. In client device, I also setup the same app key for OnOff client model.
At client device, it could send message ESP_BLE_MESH_MODEL_OP_GEN_ONOFF_SET_UNACK with address 0xFFFF every 3s.
[2188850][I][onoff_client.cpp:288] BleMeshSendGenOnOffSet(): [ONOFF_CLIENT] Send GenOnOff Set Unack, tid: 211
D (2189637) BLE_MESH(lib): NID 0x6a net_idx 0x0000
[2191868][I][onoff_client.cpp:288] BleMeshSendGenOnOffSet(): [ONOFF_CLIENT] Send GenOnOff Set Unack, tid: 212
D (2192655) BLE_MESH(lib): NID 0x6a net_idx 0x0000
[2194887][I][onoff_client.cpp:288] BleMeshSendGenOnOffSet(): [ONOFF_CLIENT] Send GenOnOff Set Unack, tid: 213
D (2195674) BLE_MESH(lib): NID 0x6a net_idx 0x0000
At server devices, it occasionally receive a message as below, but most of the time, it does not receive any messages (no output logs):
D (1482667) BLE_MESH(lib): NID 0x6a net_idx 0x0000
[1481832][I][onoff_server.cpp:220] BleMeshGenericServerCallback(): [ONOFF_SERVER] event 0x00, opcode 0x8203, src 0x001d, dst 0xffff
[1481832][I][onoff_server.cpp:225] BleMeshGenericServerCallback(): [ONOFF_SERVER] ESP_BLE_MESH_GENERIC_SERVER_STATE_CHANGE_EVT
[1481833][I][onoff_server.cpp:228] BleMeshGenericServerCallback(): [ONOFF_SERVER] onoff 0x01
I built BLE and BLE Mesh using NimBLE host stack with debug log enabled on ESP32-C6 chip. I also dont find any sequence number (tid) issues. I really dont know why.
Here are 3 my devices in the same BLE mesh network. One board with blue led is OnOff Client node. The other 2 boards are OnOff Server node.
488161429_9663033010384394_4772114802101083465_n
Please help me.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment
-
I've just solved it with option CONFIG_BT_LE_SCAN_DUPL_TYPE_DATA_DEVICE=y in my sdkconfig!
Beta Was this translation helpful? Give feedback.