Page 1 of 1

BLE "just in time" advertisement

Posted: Sun Nov 25, 2018 10:34 pm
by derTobi
Hello
Is it possible to trigger single BLE advertisement beacons, for example throug a GPIO "signal"?
I don't want to connect to any device, it should only be a single beacon to all scanning devices.
The best case would be, if i could send a different Payload with those individual beacons.

If yes, how can this be done?

Thanks!

Re: BLE "just in time" advertisement

Posted: Sun Nov 25, 2018 11:58 pm
by chegewara
What do you mean by "single advertisement beacon"? BLE advertising is short transmission that is sent with, predefined by you in advertising data, interval. What you can do is set this interval to somehow high value, start advertising and after some time, shorter than interval stop advertising. In such case it will be only one advertising packet transmitted. So yes, you can trigger it with button and transmit only one advertising packet. And yes, you can send different payload each time.

The problem is that peer devices that scan and are trying to receive that particular advertising packet easy can miss it.

Re: BLE "just in time" advertisement

Posted: Mon Nov 26, 2018 3:08 pm
by derTobi
I meant, that i need the advertisement without the frequency but with a trigger instead.
Your suggestion might be a solution, even when it is quite "hacky".
Is there a way to get informed when the beacon has been sent (e.g the possibility to regsiter a callback)?
As much as i know are some ms randomly added to the given interval to reduce the
possibility that the beacon overlaps with an other transmiter.

Thank you for your support!

Re: BLE "just in time" advertisement

Posted: Wed Nov 28, 2018 1:04 pm
by Weijian-Espressif
Sorry, I am afraid there is no way to know that a single adv packet has been sent.