This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Dynamic update of ble advertising data without stop of advertising (SDK16)

Hi, 

I want to know that if it is possible to dynamically update ble advertisement data without stopping the advertisement. (@connectable-advertising)

I would appreciate it if you could tell me how to implement it. (Functions used or the order of calls, etc.)

Similar to the answer in the link below, I stopped the advertising, updated the data and started the ad again. As a result, we have confirmed that the connection does not work well when the adv interval is set to less than 500ms.

https://devzone.nordicsemi.com/f/nordic-q-a/50961/change-advertisement-from-connectable-to-non-connectable-and-changing-advdata-dynamically

thanks for reading my question.

Parents
  • Hello,

    As a result, we have confirmed that the connection does not work well when the adv interval is set to less than 500ms.

    So how do you do it at this point, and what data do you update when you update? 

    What do you mean by "connection does not work well"? Is it not possible to connect? Does it take longer time to connect? What are you trying to connect from? Is it a phone that you are using as a central, or another nRF Device?

    Best regards,

    Edvin

  • Advertising stop is called according to the advertising interval through timer interrupt.

    I am updating the major and minor numbers of ibeacon.

    "connection does not work well" means that when a smartphone using as central tries to connect to nrf52840, the connection fails. Also the shorter advertising interval, the greater the number of failures.

  • When you decide to connect to a device from a BLE central, the central will just look for the next advertising packet from that peripheral, so as long as you don't change the BLE address, it shouldn't matter that you update the advertising packet. 

    Could it be that you don't start the advertising packets right away? Or perhaps your timer interrupts are too short, meaning the advertisements don't actually start? Have you tried capturing a sniffer trace of the advertisements (using nRF Sniffer) to see that the device actually advertises?

    Best regards,

    Edvin

  • Thank you for your valuable comments.

    Regarding the advertising operation, it was confirmed that it operates well at a cycle of about 100ms through the nRF Sniffer that you informed us about.

    Also when looking at the current consumption of the Power Profiler, it is judged that the advertising operation is well.

    Inside the advertising_init() function, each advertisement data is continuously changed.

  • And what happens when you try to connect? Have you tried to capture a sniffer trace of that as well?

    BR,
    Edvin

Reply Children
No Data
Related