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

manual advertising

Hi,

I'm using the SDK 12.2 with the sd 132 3.1.0, and actually I'm trying to send two separate advertisements wich I'm swapping every "radio notification event", but I noticed that after changing it and starting the transmission with "ble_advertising_start" the message is transmitted instantly. So I was wondering if it's possible to send the advertisement only when I want, completely manual. This way I can control the exact number of advertisements sent easily.

Thank you!

Parents
  • Hi,

    When you use radio notification events with SD S13x it gives you first interrupt after first ADV_xxx packet is sent. So you need to start counting from there. Also remember that SDK library will call your radio notification handler twice per each interval (once before and once after) - you can detect that with bool parameter of the handler - and also note that depending on adv. channel map soft device sends 1, 2 or 3 packets during every interval. Does this solves your counting? If not could you paste your code to see where is the problem?

    To your question: sure you can do advertisement "manually". Either by running custom applicative timer and using adv. start and stop or by not using Soft Device at all. Just bare in mind that a) advertisement interval should have jitter (mandated by BT SIG to prevent collisions) and b) that start/stop of advertising activity through Soft Device API isn't guaranteed to start immediately so there can be pretty random inaccuracy (on top of your timer) which can go up to +-10ms (at least this is what I've measured with S13x V2 but it might be caused by other things then Soft Device processing).

    Cheers Jan

  • If you need to know the exact number of advertisement sent, sure. If you don't I would just call sd_ble_gap_adv_data_set on each radio notificaiton inactive events.

Reply Children
No Data
Related