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

BLE advertising data is populated when only app code is loaded, but is Empty when built together with BLE DFU Bootloader and Softdevice.

So, I am updating our advertisement data on a regular rate using a timer from freeRTOS on custom piece of software the is for the nRF52840. When only the app code is loaded (through Segger or using nrfjprog) the advertisement updates as it is supposed to. If a package is built that includes all the peices (BLE DFU Bootloader, SD, and App Code) the advertisement looks good at first, but then after 2 advertisements becomes empty. The device continues to broadcast, but the advert data just disappears. I am using the 2 buffer method to update advertising data that is found in many other posts. Why is the app code running differently by itself then it would when built into a package? Any help is apprecaited. Thanks.

Parents
  • Hello,

    What do you mean by: "after 2 advertisements becomes empty. The device continues to broadcast, but the advert data just disappears"?

    Have you tried to debug, to see if your application "crashes"? Maybe one of your APP_ERROR_CHECK(err_code) receives an err_code != 0, and your application reset? Could that explain the behavior that you see?

  • So, I found another interesting tidbit. I mistakenly was using softdevice version 6.0.0 in Segger Studio and 6.1.1 when building my Full package since I have upgraded to sdk ver 15.3. When I make the update to 6.1.1 in Segger Studio, the device is now clearing out the advert data the same way it is when I build the entire package. In other words, I get the same behavior for both methods of programming now. What would the difference be between s140 6.0.0 and s140 6.1.1 that would not let me dynamically update the advert data the same way?

  • Hello,

    The changes are listed in the s140_nrf52_6.1.1_release-notes.pdf:

    s140_nrf52_6.1.1_release-notes.pdf

    (which is included in the SDK).

    I suggest that you either study the changes here, and also follow the migration guide. 

    However, if your device doesn't advertise as expected, you should be able to find out why through debugging. Look at what your function calls return.

    I suspect that your application starts with an empty advertising set, and then you update the advertisements during runtime, is that correct?

    If so, then it sounds like you are hitting an error, and the application resets, causing the advertisements to go back to the default "empty" state. 

    Try to debug your application with the correct softdevice, and see if you can find out where it restarts.

Reply
  • Hello,

    The changes are listed in the s140_nrf52_6.1.1_release-notes.pdf:

    s140_nrf52_6.1.1_release-notes.pdf

    (which is included in the SDK).

    I suggest that you either study the changes here, and also follow the migration guide. 

    However, if your device doesn't advertise as expected, you should be able to find out why through debugging. Look at what your function calls return.

    I suspect that your application starts with an empty advertising set, and then you update the advertisements during runtime, is that correct?

    If so, then it sounds like you are hitting an error, and the application resets, causing the advertisements to go back to the default "empty" state. 

    Try to debug your application with the correct softdevice, and see if you can find out where it restarts.

Children
No Data
Related