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

Buttonless DFU on nRF52832

I'm using nRF52832 + SDK17.0.0 + s132_7.0.1. I am testing buttonless DFU on the PCA10040 board based on this blog, The initial DFU (when there is no app) is successful:

  1. Build the secure_bootloader example with a private key.
  2. Build the ble_app_buttonless_dfu example.
  3. Create the DFU zip packet: "nrfutil pkg generate --hw-version 52 --application-version 0 --application nrf52832_xxaa.hex --sd-req 0xCB --key-file private.key app_dfu_package.zip"
  4. Upload the secure_booloader and softdevice using nRFgo Studio.
  5. Connect to DFUTARG with Android nRFConnect and DFU app_dfu_package.zip
  6. I see NORDIC_BUTTONLESS advertise and can connect to it fine

When I try to DFU from NORDIC_BUTTONLESS, nRFConnect disconnects from it and connects to DFUTARG which opens automatically in a new tab and just idles. The NORDIC_BUTTONLESS tab says "connecting", but never connects. If I go back to the DFUTARG tab and click DFU, it just idles in the Initializing state. The issue seems similar to this, but I do not see a "known issue" issue in Bjorn's link. Please advise on how to get the DFU to work once an app is already uploaded.

Parents Reply Children
  • I'm testing without bonds. The issue occurs with Asus ZenPad 8 (Android 5) using nRFConnect 4.22. I updated to 4.24 and now when I attempt DFU from NORDIC_BUTTONLESS, it just stays connected to NORDIC_BUTTONLESS and DFUTARG never starts. The same thing occurs on a Nexus 7 (Android 6) using nRFConnect 4.24.

    However, DFU works fine with a Huawei P20 Pro (Android 8) with nRFConnect 4.24. DFU also works fine with nRFConnect on a Windows PC (using PCA10056 as the central). Is there a minimum Android version for secure DFU using nRFConnect? The Asus ZenPad 8 (Android 5) works fine with SDK11 non-secure DFU.

  • Hi,

    Tosa said:
    it just stays connected to NORDIC_BUTTONLESS and DFUTARG never starts.

    This indicates that the buttonless DFU characteristic was never written to, as a write to it would be enough to make the device enter DFU mode.

    Tosa said:
    Is there a minimum Android version for secure DFU using nRFConnect? The Asus ZenPad 8 (Android 5) works fine with SDK11 non-secure DFU.

    The minimum Android version is 4.3, and that should be sufficient for DFU as well, both secure and non-secure.

    Do you consistently see this difference between Android versions? Is there any difference in the test setup? Always bonded or unbonded? Have you made changes to the buttonless DFU service implementation (in <SDK>\components\ble\ble_services\ble_dfu)?

    Do you get it to work if you write to the Buttonless DFU characteristic manually from nRF Connect? In that case, the device should reset into DFU mode. If not, what happens?

  • I'm always using un-bonded. The issue keeps reoccurring on the Zenpad and Nexus. I've not made changes to the DFU service, nor the ble_app_buttonless_dfu example, and only added my public key to the secure_bootloader build. 

    It seems that I can manually write to the Buttonless DFU characteristic. The Zenpad disconnects from NORDIC_BUTTONLESS, but does not automatically connect to DFUTARG. If I go to the scan tab, I can see DFUTARG and connect to it. However, if I attempt to DFU, nothing seems to happen. Please advise.

  • Could you post here logs from nRF Connect on the DFUTARG tab?

    The new tab that opens when you do dfu can be closed. nRF Connect just discovers new device connected and opens this tab automatically, but you should be using only the original tab if don't want to sniff dfu process.

  • Which logs from nRF Connect are you referring to? nRF Connect isn't opening a new tab; it's just disconnecting from NORDIC_BUTTONLESS. I manually go to the scan tab to see and connect to DFUTARG.

Related