Duplicate messages when using bt_mesh_model_publish() and groups
I am running samples\boards\nrf52\mesh\onoff-app on two NRF52 DKs.
What I notice is that mesh messages are duplicated, i.e. when pressing
a button on the server node (that is publishing to group 0xC00A), one
message is sent ("publish to ..."). But on the client node, (which is
subscribing to 0XC00A), the callback for incoming mesh messages
gen_onoff_set is called twice (2x "gen_onoff_set" output).
I would really like to reduce the messages sent to a minimum so am
wondering why this is happening and how to solve this.. It seems to me
as if messages sent via bt_mesh_model_send only appear once. Could
someone help me?
How is the provisioning done? Probably via the meshctl tool.
On the client node, only one element bound to a Generic OnOff Server model is subscribed to the group address?
Because I'm also running this Mesh onoff applic on 4 nRF52 DKs: 1 board for publishing, 2 boards for subscribing and 1 acting as relay node (for extending BLE coverage).
Further I modified the applic code a little bit so that it no longer waits for 1 second to publish when a button is pressed (no need in my use case to reuse the same button for switching on and off).
Honestly I didn't noticed a double receive in the logging. As I noticed an intial delay of 1 second I first focussed on getting rid off the logging, but the 1 second delay was caused by how the button press was implemented for supporting switching on/off by a single button.
If finding some time I will have a look at my logging when enabled again.
toggle quoted messageShow quoted text
Client could re-transmit message to make sure that it will get receive
by Server. All re-transmitted message has same TID. Using it at App level
we could ignore previously received duplicate message.
This concept is explored in samples/boards/nrf52/mesh/onoff_level_lighting_vnd_app.
For details refer device_composition.c in it.
If you are using #nRFMesh Android App, then in Publication Setting (in your case
it would be Generic OnOff client -> SET PUBLICATION ) set Intervals Steps to 0.
Actually there is bug in App's nomenclature....but as of now
set Interval Steps = 0.
After this client will only send one message to Server & there will be no re-transmission
of same message from client side.
On Tue, Dec 4, 2018 at 9:20 PM Martin <ma@...> wrote:
Hi,toggle quoted messageShow quoted text
thanks guys for your help. I have been using the nRF Mesh app for
provisioning. Setting Interval Steps = 0 indeed solves the issue. As I
do not need message transmissions, this solution is perfectly fine. I
guess I should have cross-checked with meshctl :-(
Am Di., 4. Dez. 2018 um 17:35 Uhr schrieb Vikrant More <email@example.com>: