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

Any chance to get support for multiple advertising messages?

Hello,

I really need the ability to switch between different advertising messages. Could you please (please!) add a callback after an advertising message has been sent or allow different advertising messages to be queued? I want e.g. two advertising messages A and B to be sent like this:

A B A B A B

The radio notification handler is called far too often and cannot distinguish between connections, advertising, etc,..... I could use a timer, but this will run completely asynchronous to the Softdevice scheduler. I want to have a clean solution for this problem.

Thanks, Marius

  • Thank you. Yes, it would be okayish, but it would be much nicer to have better control, so that all messages are sent the same amount. And for my use-case with a mesh, I really need better control over the advertising messages and for me, this is one part where the API is really lacking functionality and I cannot find a way around.

  • I see, if you don't care about connection establishment you can do advertising in a radio timeslot instead of using the softdevice's API, but I guess in your case you need the connection be handled by the softdevice.

  • Yes, it's not only advertising, but sometimes I want to establish connections and it would be quite a bit overhead to use the timeslot API.

  • Hi Marius,

    changing advertising (+ scan response) data through Radio Notification Event is pretty simple and works well. You can (as long as you are fine with some obvious limitations on selected timings) "multiplex" two or more broadcasts just by using standard advertisement in GAP Peripheral of Nordic's Soft Devices. And if you would like to pretend to be multiple of completely independent devices, you could probably very well also change Adv. Address (still you need to select right advertising interval so "virtual" devices appear with effectively double/triple/... interval to the observer). Need an example? I've already posted here on the forum source code which makes Nordic standard Beacon app from SDK changing broadcasts for each interval (adjusting it to your needs looks like trivial few minute job)

    Cheers Jan

  • I second this request. From the softdevice point of view this requires multiple buffers and a pointer that iterates over these. This seems like quite a trivial change and for the user it will not have any limitations on timings, etc.

    sd_ble_gap_adv_data_set(uint8_t const *const  	p_data,
    	uint8_t  	dlen,
    	uint8_t const *const  	p_sr_data,
    	uint8_t  	srdlen 
    ) 
    

    Would become something like:

    sd_ble_gap_adv_data_set(uint8_t const *const  	p_data,
    	uint8_t  	dlen,
    	uint8_t const *const  	p_sr_data,
    	uint8_t  	srdlen, 
    	uint8_t  	buf_id 
    ) 
    

    From a marketing point of view it's cool that you can tell that you inherently support multiplexing (the three formats of) Eddystone with iBeacon and AltBeacon.

Related