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

Infinite Advertisement in ble_app_buttonless_dfu example project?

Hi All,

To enable infinite advertisement in ble_app_buttonless_dfu example, I di following change

#define APP_ADV_DURATION                0            //18000  

But after this change, the device stopped advertising and every time stuck at NRF_BREAKPOINT_COND.

after analyzing and putting a breakpoint in app_error_handler_bare function, I am getting error code 4 and that is NRF_ERROR_NO_MEM.

So how can i resolve this error? 

Regards,

Pradeep

  • NB: We are really short staffed due to Summer Holidays in Norway. You must expect some extra delay in technical questions these days, I am afraid. I am sorry for the inconvenience.

    Hello Pradeep,

    To see what function that triggered the error, please add "DEBUG" to your preprocessor definitions, and the log should print what function that caused the issue.

    What the issue means depends on what function that returned the value.

    When you want to set the advertising duration to 0 (infinite), you must also set the flag

    BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE
    instead of 
    BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE in your main.c file.

    Try this, and see if it helps.

    Another possible issue in that example is that this example requires a bootloader in order to work properly? Is it intentional that you use this example specifically? If not, perhaps you should try another one, such as the ble_app_uart example.

    If you intend to use this example, make sure you compile and flash a bootloader before you flash this example. You also need to generate bootloader settings, program them, and program your ble_app_buttonless project using the generated .hex file, and not the IDE itself. If you want to debug, you must select "attach debugger", instead of "build and debug".

    Best regards,

    Edvin

  • Hi Edvin,

    So this example is working fine if I set an advert duration 18000 or some other value except 0. So this is not working when I modify  APP_ADV_DURATION value with 0. I have already set flag BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE. 

     

  • So did you try to define DEBUG in your preprocessor defines? What does the log say then? What SDK version do you use by the way? Is it one of the later SDKs where the log prints the source of the APP_ERROR_CHECK() when you have DEBUG in your preprocessor defines?

    NB: We are really short staffed due to Summer Holidays in Norway. You must expect some extra delay in technical questions these days, I am afraid. I am sorry for the inconvenience.

  • Hi Edvin,

    Thanks for the update.

    I am using 

    nrf SDK  16.0.0

    development kit: - nrf52832

    Embedded Platform: - Segger embedded studio

    So while debugging I was getting NRF_ERROR_NO_MEM error. 

    I'll try to define DEBUG in  preprocessor defines and get back you.

    Regards

    Pradeep

Related