This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Change advertising data in Mesh proxy / dfu / provisioner

What is the best way to change advertising data for each advertising packet in Mesh SDK's each of proxy / dfu / provisioner?

Using Mesh SDK 4.1, it would be ideal to be able to:

1. Have a callback after transmit of advertising packet

2. Have easy access to the advertising data

Note: it is not a question of changing anything in the Mesh data going out as advertising packets, but the connectable advertising packets.

Reading through all Mesh layers source code and documentation, there is no access to the lower-layer advertising data. For example, any layer that calls `advertiser_instance_init()` can install a callback, and some layers do, but they do not expose that callback to higher layers, and the callbacks vanish in there. SDK does not seem to provide any events connected to advertising packets transmission.

Related question: is it possible to receive own advertising broadcasts (from both softdevice and Mesh's timeslot use) in receive callback?

Parents
  • Hi Ilya, 

    In our Mesh SDK the mesh stack doesn't handle the connectable advertising. It's handled by the softdevice. 

    Currently there is no way to receive an event for each advertising packet. You can setup a notification when the radio is active&inactive but if it's a mesh application it's more complex to monitor if it's the advertising activity or not. 


    The easiest solution if you don't have a very short advertising interval is to use a timer to change the advertising data periodically. 

  • Thanks, that confirms what I concluded looking at mesh layers code.

    So to send some dynamic data out (which should be outside of mesh), is it possible to use advertiser.c layer directly? Will it work if it is called before mesh_init() is called?

  • Hi,

    You can use mesh to send advertising packet but it would be non-connectable as the mesh stack can't handle a connection. It uses the softdevice for that. 

    Could you give some more information about your application requirements ? which data you want to change and does it need to be connectable advertising ? 

  • It needs to be non-connectable. The data is telemetry / debug nature. We want to be able to send small stream of data out in advertising/beaconing type packets as soon as possible as device powers on, and provide insight into what device firmware is doing. So each new advertising packet will have new chunk of data from a queue. It will be off in all devices by default, but the ones that have issues can be turned on at power-on. Advertising packets will be received and decoded by another device altogether, not by mesh. Our initial idea was to insert few bytes into active advertising packets (not the mesh payload ones), but it looks like needs redesigning the whole mesh layers stack to do it.

  • If you are planning to do non-connectable advertising you can use the mesh stack to send your advertising packet (in addition to mesh packet and connectable Proxy advertising packet).

    Please have a look at the beaconing example. In the example we send a beaconing advertising packet in addition to mesh packets. You can choose the number of repeats (can set to 1) and receive the call back (advertiser_tx_complete_cb_t)  when it's finished sending. 

Reply
  • If you are planning to do non-connectable advertising you can use the mesh stack to send your advertising packet (in addition to mesh packet and connectable Proxy advertising packet).

    Please have a look at the beaconing example. In the example we send a beaconing advertising packet in addition to mesh packets. You can choose the number of repeats (can set to 1) and receive the call back (advertiser_tx_complete_cb_t)  when it's finished sending. 

Children
No Data
Related