-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ble mesh: Require clarification regarding how to reply the message when server model response control set to ESP_BLE_MESH_SERVER_RSP_BY_APP (IDFGH-3317) #5300
Comments
@ankit-thealchemist Thanks for the detailed report and letting us know about this. We will look into. Thanks. |
Sorry for the late reply. This happens because when the status is replied by the application, the TTL is 0, which causes the status failed to be "relayed" to the App. Please have a try with this patch 0001-ble_mesh-fix-send_ttl-not-updated.patch.zip. Thanks. |
@ankit-thealchemist Thanks for reporting, would you please help share if any updates for this issue? Thanks. |
Ya I am testing it. will let you know by monday. |
Hi @Campou @Alvin1Zhang I applied the patch and found that it is working properly. Thanks for the resolution. Just a observation that ESP_BLE_MESH_SERVER_AUTO_RSP is slightly faster than the ESP_BLE_MESH_SERVER_RSP_BY_APP. |
Thanks for providing the feedback. |
Update send_ttl mainly for server models. When a server model receives a message, and the status is required to be replied by the application, we need to set send_ttl to the msg context. If send_ttl is not updated in btc, and the applcation does not set the TTL either, then the status will be replied with TTL=0, which may cause the client side (e.g. the phone App) failed to receive the status. Closes espressif/esp-idf#5300
Update send_ttl mainly for server models. When a server model receives a message, and the status is required to be replied by the application, we need to set send_ttl to the msg context. If send_ttl is not updated in btc, and the applcation does not set the TTL either, then the status will be replied with TTL=0, which may cause the client side (e.g. the phone App) failed to receive the status. Closes #5300
Update send_ttl mainly for server models. When a server model receives a message, and the status is required to be replied by the application, we need to set send_ttl to the msg context. If send_ttl is not updated in btc, and the applcation does not set the TTL either, then the status will be replied with TTL=0, which may cause the client side (e.g. the phone App) failed to receive the status. Closes #5300
Update send_ttl mainly for server models. When a server model receives a message, and the status is required to be replied by the application, we need to set send_ttl to the msg context. If send_ttl is not updated in btc, and the applcation does not set the TTL either, then the status will be replied with TTL=0, which may cause the client side (e.g. the phone App) failed to receive the status. Closes #5300
Environment
git describe --tags
to find it)://esp-idf 4.0
.
Problem Description
I was implementing the server demo from the example of ble mesh https://github.com/espressif/esp-idf/tree/master/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_server.
In the example I change the configuration server relay feature enable by setting value to ESP_BLE_MESH_RELAY_ENABLED also the gatt proxy value to ESP_BLE_MESH_GATT_PROXY_ENABLED.
It features 3 elements. now in the elements 1 , response control is set to ESP_BLE_MESH_SERVER_AUTO_RSP while other are set to the ESP_BLE_MESH_SERVER_RSP_BY_APP( both get and set).
Now I then uploaded the code to the two nodes say node A and node B. I provisioned the nodes, using the nrf mesh app v 2.1.0 and bind the app key to them.
Now suppose I connect to the node A using nrf mesh and try to control the elements of the node B. To my surprise, the elements which are set to the control response to ESP_BLE_MESH_SERVER_AUTO_RSP, works perfectly, while the elements which sets to ESP_BLE_MESH_SERVER_RSP_BY_APP, doesn't able to send the status message to the nrf mesh app.
I donot change anyting in the example. some how both the function esp_ble_mesh_server_model_send_msg() and esp_ble_mesh_model_publish() doesnt sent the message back to nrf mesh.
when I check the logs, same thing comfirms.
0x0001 is the unicast address of the nrf mesh app and 0x0002 is the unicast address of the element which has the response control set to ESP_BLE_MESH_SERVER_AUTO_RSP.
0x0003 is the unicast address of the model whose response control set to ESP_BLE_MESH_SERVER_RSP_BY_APP. there is no packet which relay back to the nrf mesh app (add 0x0001)
Is there is anything more has to be done to send the message back to the originator through mesh network, when the control response of the model set to ESP_BLE_MESH_SERVER_RSP_BY_APP.
Expected Behavior
should be able to get the status message in the nrf mesh.
Actual Behavior
when the control response is set to the ESP_BLE_MESH_SERVER_RSP_BY_APP, message are not received by the nrf mesh.
Steps to reproduce
step1 take more than 2 esp 32 devices and upload the above examples to all of them. provisioned them.
... Now connect to anyone of the device and try to read status of the 1st element of the other node. you can easily do that, that model has ESP_BLE_MESH_SERVER_AUTO_RSP. while other element struggle(getting error) because they are set to ESP_BLE_MESH_SERVER_RSP_BY_APP.
Code to reproduce this issue
The text was updated successfully, but these errors were encountered: