ESP-BLE-MESH OnOff Client sending but OnOff Server not receiving

bhcuong2008
Posts: 5
Joined: Sun Apr 06, 2025 4:16 am

ESP-BLE-MESH OnOff Client sending but OnOff Server not receiving

Postby bhcuong2008 » Sun Apr 06, 2025 4:41 am

Hi,

I follow the guide OnOff Client here:
https://github.com/espressif/esp-idf/bl ... through.md
and OnOff Server here:
https://github.com/espressif/esp-idf/bl ... through.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][onoff_client.cpp:288] BleMeshSendGenOnOffSet(): [ONOFF_CLIENT] Send GenOnOff Set Unack, tid: 211
D (2189637) BLE_MESH(lib): NID 0x6a net_idx 0x0000
[2191868][onoff_client.cpp:288] BleMeshSendGenOnOffSet(): [ONOFF_CLIENT] Send GenOnOff Set Unack, tid: 212
D (2192655) BLE_MESH(lib): NID 0x6a net_idx 0x0000
[2194887][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][onoff_server.cpp:220] BleMeshGenericServerCallback(): [ONOFF_SERVER] event 0x00, opcode 0x8203, src 0x001d, dst 0xffff
[1481832][onoff_server.cpp:225] BleMeshGenericServerCallback(): [ONOFF_SERVER] ESP_BLE_MESH_GENERIC_SERVER_STATE_CHANGE_EVT
[1481833][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.

Please help me.
Thanks

bhcuong2008
Posts: 5
Joined: Sun Apr 06, 2025 4:16 am

Re: ESP-BLE-MESH OnOff Client sending but OnOff Server not receiving

Postby bhcuong2008 » Mon Apr 07, 2025 3:43 pm

I've just solved it with option CONFIG_BT_LE_SCAN_DUPL_TYPE_DATA_DEVICE=y in my sdkconfig!

Who is online

Users browsing this forum: No registered users and 3 guests