sending a advertisment packet immediately/ with low delay

Hi

in NRF connect SDK is it possible to do the following:

recive one byte from PC via USB to a dev board. Immediately or with a delay less than 200 micro second send a advertisment packet with Manufacturer Specific Data (BT_DATA_MANUFACTURER_DATA) with the byte received from PC?

Do I have control of when the ADV packet is transmitted?

According to bluetooth spec a random delay of 0-10 ms is introduced when sending a ADV packet. Is the random delay ist set only at startup or with every ADV packet sent?

thx

  • No. Advertisements are sent out at a regular interval with a random jitter to minimize collisions. Perhaps you can do some more fine grained control somehow but I doubt that you will find a solution that would make it possible to always (or at least with a high certainty) transmit something within 200 micro seconds.

    To minimize the delay you would probably need to setup a BLE connection between the devices and set the connection interval very low.

    But still. When communicating over radio I think you probably need to relax your requirements a factor of 10 or 100 (2 to 20 ms) to be more realistic about the expected time from when a byte has been received on the dev board until another radio device can take action on this information. If you want to base your solution on Bluetooth or some other radio standard at least.

    Note also that there is probably a delay in the magnitude of milliseconds also before this byte will reach your dev board.

  • Hi klaus1234,

    You don't have control of when the ADV packet are sent. You simply request the BLE controller to start advertising with these data and parameters; and it's then entirely up to the controller to do the job.

    Jakob also explained well why the 0-10ms random delay is also on every single packet, as well as overall limitation you should expect when working with BLE.

    Could you please share the overall goal you have with this? Then perhaps we can look at other alternatives.

    Hieu

  • thanks so much, then I start a new thread.

  • Alright. I will close this case then. Please feel free to reopen it if you have any question on the same topic.

Related