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?

  • When debugging through Segger Studio, my application does not crash, and it keeps the advertising data (flags, name, and manufacturing data). The same happens when I program through Segger and then reset the device and disconnect the debugger. So, by itself, the app code appears to be running fine to the best of my knowledge. When I merge the app code with the DFU Bootlader and Soft Device and program it. The device start advertising correctly with all the data listed above, but after some time (usually 2 advertising intervals) the device continues to broadcast but with 0 length advert data. So, I able to see the device as it is still advertising the ESN and other required advertisement pieces, but the advertising data (flags, name, etc.) is now NULL with 0 length. The NRF app tells me it is empty when I look at the raw advertising data. I am going to try to get it debugging with the whole package and see what I see to help get you more details, but that is what I know at this point.

Reply
  • When debugging through Segger Studio, my application does not crash, and it keeps the advertising data (flags, name, and manufacturing data). The same happens when I program through Segger and then reset the device and disconnect the debugger. So, by itself, the app code appears to be running fine to the best of my knowledge. When I merge the app code with the DFU Bootlader and Soft Device and program it. The device start advertising correctly with all the data listed above, but after some time (usually 2 advertising intervals) the device continues to broadcast but with 0 length advert data. So, I able to see the device as it is still advertising the ESN and other required advertisement pieces, but the advertising data (flags, name, etc.) is now NULL with 0 length. The NRF app tells me it is empty when I look at the raw advertising data. I am going to try to get it debugging with the whole package and see what I see to help get you more details, but that is what I know at this point.

Children
No Data
Related