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

Buttonless DFU: "Upload failed: DFU device disconnected"


Hello,

I tried to follow the instructions in this tutorial:
github.com/.../nRF52832-buttonless-dfu-development-tutorial

1) I flashed this file via nrfjprog:
examples\dfu\secure_dfu_test_images\ble\nrf52832\sd_s132_bootloader_buttonless_with_setting_page_dfu_secure_ble_debug_without_bonds.hex

2) As an additional check I used nRFgo Studio to verify the S132 Softdevice. This was also successful.

3) Since I only have one DK i tried to flash hrs_application_s132.zip using the nRF Toolbox on my Android smartphone:

3a) I selected the zip file and set the scope to "Application only".
3b) The DK was visible as "Nordic_Buttonless"; I selected it.
3c) I clicked "Upload".
3d) I get the error message "Upload failed: DFU device disconnected"

I am using both the bootloader and the hrs_application from the nRF5_SDK_15.2.0_9412b96.

Do you have any suggestions what to look for? Thanks!

Parents
  • Hi.

    I've tested your steps and I'm unsure on what's wrong, because i get a successful DFU update with your steps.

    I flashed the same .hex file as you did, and selected the same .zip file as you did:

    I started the update:

    And finished without any errors:

    Could you try to use the nRF Connect Application?

    Are you sure that you've selected the right files? That is flashed correct file and selected correct .zip file?

    Best regards.

    Andreas


  • Hello Andreas,

    thank you for your reply. I tried it with the nRF Connect Application on the PC, and it worked perfectly on the first attempt.

    So this was a step in the right direction. However I would still like to get it to work with a smartphone app.

    I reinstalled the nRF Toolbox on the Android smartphone and again tried it with the exact same files that have worked on the PC. I got the same error as last time.

    I then installed nRF Connect on the Android smartphone and tried to connect to the device. I immediately got a "disconnected" message every time I clicked on "connect".

    Then I tried to connect to the device via BLE Scanner, a third party Android app. The device was again detected correctly, but I also got a "disconnected" message every time I clicked on "connect".

    Best regards,
    Ewald

  • Hi.

    Since I only have one DK i tried to flash hrs_application_s132.zip using the nRF Toolbox on my Android smartphone:

    What did you connect to the nRF Connect Application on the PC? You need to have one board connected running the nRF Connect Application, and one board flashed with the Bootloader, I'm a bit confused as how you did this.

    Have you tried sniffing BLE packets to see what triggers the disconnection?

    - Andreas

Reply
  • Hi.

    Since I only have one DK i tried to flash hrs_application_s132.zip using the nRF Toolbox on my Android smartphone:

    What did you connect to the nRF Connect Application on the PC? You need to have one board connected running the nRF Connect Application, and one board flashed with the Bootloader, I'm a bit confused as how you did this.

    Have you tried sniffing BLE packets to see what triggers the disconnection?

    - Andreas

Children
  • Hello Andreas,

    sorry, I forgot to mention this:
    I found a second DK here, which I had forgotten about.

    You need to have one board connected running the nRF Connect Application, and one board flashed with the Bootloader

    Yes, that's the way I did this.

    Have you tried sniffing BLE packets to see what triggers the disconnection?

    Not yet. I'll try this and will report back.

  • Hi.

    That would be fine if you can do that, it's much easier to determine the reason for the disconnection with information from the BLE packets.

    - Andreas

  • Hello Andreas,

    my collegue tried it with his phone, and it worked.
    So maybe this is an Android version issue? My phone is the Sony Xperia Z3 compact.

    Ewald

  • Hi.

    Which "DFU Library version" is in the DFU page for your nRF Toolbox application?

    I tried with a Sony Xperia Z5 compact now, it did not work the first time, but it worked on the second attempt, the DFU library version on this phone is 1.3.0 (old)

    Do you have Segger RTT-Viewer? If not, can you download it here and do the following:

    1) Program your device with these two hex files:

    nRF5_SDK_15.2.0_9412b96\examples\dfu\secure_dfu_test_images\ble\nrf52832\bootloader_secure_ble_debug_without_bonds_s132.hex

    nRF5_SDK_15.2.0_9412b96\examples\dfu\secure_dfu_test_images\ble\nrf52832\softdevice_s132.hex

    2) Open RTT-Viewer

    3) Do the DFU again using hrs_application_s132.zip

    4) Paste all of the log output in your reply by using Insert --> Insert Code

    The disonnect after connect may be caused by:

    1. Some issue with Bluetooth stack on the phone. Recommended is restarting Bluetooth or the phone. This actually helps, a specially on older devices.

    2. Bond data kept by the remote device but removed on Android, or the other way round.

    3. Packet collision on Connect Req. The phone sent Connect Req on the adv channel, but it was missed by the device. Phone then sends Feature Req, but device ignores as it didn't get the Connect Req. After few sec phone gives 133 error. Recommended: try again. 3 attempts are usually enough.

    Best regards.

    Andreas

Related