Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

BLE Bootloader Example not Advertising on BLE Nano

Hello,

i'm using the BLE Nano v2 with the nrf52832 on it and a DAPLink USB-Dongle. IDE is Eclipse with gcc and SDK v14.2. My current aim is to do an OTA DFU so I tried the bootloader_secure_ble example following these steps: devzone.nordicsemi.com/.../getting-started-with-nordics-secure-dfu-bootloader
I've customised the leds_init() & buttons_init() function to match my board, updated the dfu_public_key.c file and flashed it together with the s132 softdevice v4.0, my application and a settings page via drag and drop. My application runs fine and I also get into dfu mode by pressing the button -> LED lights up. But there's no advertising. Also, if in dfu mode, the bootloader doesn't jump back to my application after the time specified in the sdk_config.
I don't know what I'm doing wrong, but I think it must be something essential.. Hope you can give me some help.

Thanks in advance
Markus

  • Hi Markus, 

    Please try with the bootloader only first (softdevice + bootloader ) as instructed in the guide. 

    Why are you testing with S132v4.0 ? Note that SDK v14.2 is made for S132v5.0 

    I would suggest to test with the debug variant of the bootloader and step into the code (and check the log) and check why it doesn't advertise. Again, test with bootloader + softdevice first. 

  • Yes i tested Softdevice + Bootloader already before expanding to softdevice + bootloader + application + settings, even without success.

    Oh yes you're right, that was not intentional to use s132 v4. I've tested v5 in the meantime and it also doesn't work :(

    I'll enable the logging function, do more intensive debugging on the softdevice+bootloader version and then report.

  • Please follow the guide and let us know at which step you hit the error. 

  • I followed the guide step by step once again from zero with a fresh sdk. The problem is, that the device doesn't advertise when in dfu mode, so "Step D. Test DFU" after flashing softdevice and bootloader. There were no errors occuring while building the bootloader.

    I know, the example should work out of the box, anyway i decided to enable the logging functionality, here's the result:

    <info> app: Inside main
    <debug> app: In nrf_bootloader_init
    <debug> app: in weak nrf_dfu_init_user
    <debug> app: In real nrf_dfu_init
    <debug> nrf_dfu_settings: Running nrf_dfu_settings_init(sd_irq_initialized=false).
    <debug> nrf_dfu_flash: Calling nrf_dfu_flash_init(sd_irq_initialized=false)...
    <debug> nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
    <debug> app: Initializing the clock.
    <debug> app: Enter nrf_dfu_continue
    <error> app: Single: Invalid bank
    <debug> app: Enter nrf_dfu_app_is_valid
    <debug> app: Return false in valid app check

  • Hi, 

     

    The 32kHz crystal is not included inside the BLE Nano 2, do you have the crystal externally on your PCB ? 

    If you don't you need to change the configuration in sdk_config in the CLOCK setting (CLOCK_CONFIG_LF_SRC) to use RC, also change the softdevice SDH clock setting (NRF_SDH_CLOCK_LF_SRC) to use RC as well.

     

    If you already have the crystal or if you changed to RC and you still have the issue, you would need to debug the bootloader and see where it throws an error. 

Related