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

secure dfu buttonless flashing app via bluetooth

Hi i have problem i can flash  via st-link but when i want program nrf52832 via bluetooth(smartphone). i create zip with bootloader, softdevice and app and that zip send to smarphone. i connect smarphone and nrf52832 and start dfu and choose that zip but then nrf52832 change its bluetooth name and breaks connection.

  • Have you taken a look at this blog post? This link could also be helpful. It should be quite straightforward to get buttonless dfu to work. Have you tried just with the regular secure dfu bootloader first to see if that works before you do buttonless dfu. No point in making it more difficult than it should be if there is a problem with regular dfu before you move to buttonless dfu. In addition, what smartphone are you using?

  • we tried with several smartphones and result are always the same. I with openocd flash sucessfull softdevice s132 v 6.0.0 (nrf52832 is chip) and bootloader with settings. Nrf then shows on smartphone when scan bluetooth devices as nordles buttonless dfu and with smartphone i then flash application which i have made with nrfutil and only app is in .zip but when i want this app flash again on nrf52 (i have make new zip with nrfutil and version of app is higher) i connetct again on nrf52(shows as nordless dfu buttonless ) and on smartphone choose dfu and zip with newer version of app. Nrf52 disconnect and have new name as bluetooth device dfutarg and mac adress is different from when it is as nordless buttonless dfu.

  • Which smartphones have you tested with? Are you using nrf connect or nrf toolbox to test? Are you using Android or iOS?

    Which SDK are you using (seems like you are using sdk 15)? Are you using the regular bootloader or a custom bootloader? You should be able to test this example without worrying about the bootloader settings page (i.e. just use the regular secure dfu bootloader. Looking at the section "testing buttonless secure dfu without bonds" could also be helpful (see link). If you are testing without bonds, make sure to set NRF_DFU_BLE_REQUIRES_BONDS 0 in sdk_config.h.

    From what you explain, it seems starting the dfu process leads to the nrf52832 going into bootloader mode (which is why it is advertising as dfutarg). According to the testing, this should not occur (i.e. the smartphone app should automatically go to bootloader mode & start the dfu & stay connected. The device should only disconnect once the dfu is finished). Do you notice any progress indication for the dfu or does the device automatically disconnect once you press the start dfu button on the smartphone?

    If you can provide me with more information regarding to which bootloader you are using, which application you are updating, which app & which smartphone you are using, I can test this at the office tomorrow & help you figure this out.

  • I use LG G3 with nrf Connect app on it. Yes it is SDK 15.0.0. I'm using softdevise(/components/softdevice/s132/s132_nrf52_6.0.0_softdevice.hex), bootloader (/examples/dfu/secure_bootloader/pca10040_ble/armgcc/_build/nrf52832_xxaa_s132.hex) and app stred in /examples/ble_peripheral/ble_app_buttonles_dfu/pca10040/s132/armgcc/_build/nrf52832_xxaa.hex). I program softdevice and bootloader via openocd and stlink and make two images of app with nrfutil (the same app.hex is used in both images of app only is the version of app attribute in nrfutil changed when generating .zip) i can via smarphone and nrfconnect flash first image with app version 1 and when i want to second image of app with version of app 2  i can connect to nrf52 and when choose dfu the start bootloader then change bluetooth name and mac adress.

  • Can you tell me which exact command you are using to create the zip file in step C of the blog post? Are you using --sd-req 0x00a8 for the softdevice v6?

Related