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

nRF Toolbox DFU error code DFU DEVICE DISCONNECTED (0)

Can anyone explain what that error code is meant to mean?

With the example sdk7.1 dfu bootloader, hrs_with_dfu app built unmodified and sd110 7.1, I get this error on attempting to load to an nRF51822 rev2. I get this with sdk8.1 and sd8.1 too.

code built with uV4

Parents
  • Problem sorted. Don't run the DFU application in the toolbox (Duh)

    Do this:

    Select the device in Master Control Panel. The device is advertising as "DfuTarg". Connect to the device and perform service discovery. Observe that the connected LED is lit and the advertising LED is off. Master Control Panel will recognize that the device supports Device Firmware Update, and the "DFU" button in the user interface will become available.

    Click "DFU" and select the zip file that contains the firmware image.
    Click "Program". Observe that the update procedure starts. When the progress bar reaches 100%, the update is complete.
    
Reply
  • Problem sorted. Don't run the DFU application in the toolbox (Duh)

    Do this:

    Select the device in Master Control Panel. The device is advertising as "DfuTarg". Connect to the device and perform service discovery. Observe that the connected LED is lit and the advertising LED is off. Master Control Panel will recognize that the device supports Device Firmware Update, and the "DFU" button in the user interface will become available.

    Click "DFU" and select the zip file that contains the firmware image.
    Click "Program". Observe that the update procedure starts. When the progress bar reaches 100%, the update is complete.
    
Children
  • @mike: I was testing here with nRFToolbox app, and I don't think I got any issue with that. Could you take a screenshot or a log file (with nRFLogger) when you do DFU with nRFToolbox ? Did you have the issue every time you tried or just occasionally ?

  • Hi Hung,

    I glad you ask, as my problem wasn't solved - that was a one-off success, not to be repeated.

    Below is the logger trace I see. If a wireshark trace would be more useful, I will create one and attach it. I am using Android 4.3.1, Cyanogenmod 10.2, on an HTC One-x.

    I see a similar failure to download issue on IOS with the latest nrf toolbox.

    Regards,

    Mike.

    No name (CE:E6:73:B3:D2:3B) V 11:38:01.525 Connecting to CE:E6:73:B3:D2:3B... D 11:38:01.545 gatt = device.connectGatt(autoConnect = false) D 11:38:01.587 [Callback] Connection state changed with status: 0 and new state: CONNECTED (2) I 11:38:01.609 Connected to CE:E6:73:B3:D2:3B V 11:38:02.732 Discovering Services... D 11:38:02.751 gatt.discoverServices() D 11:38:02.792 [Callback] Services discovered with status: 0 I 11:38:02.811 Services Discovered V 11:38:02.880 Generic Access (0x1800)

    • Device Name [R W] (0x2A00)
    • Appearance [R] (0x2A01)
    • Peripheral Preferred Connection Parameters [R] (0x2A04) Generic Attribute (0x1801) Device Firmware Update Service (00001530-1212-efde-1523-785feabcd123)
    • DFU Packet [WNR] (00001532-1212-efde-1523-785feabcd123)
    • DFU Control Point [N W] (00001531-1212-efde-1523-785feabcd123) Client Characteristic Configuration (0x2902)
    • DFU Version [R] (00001534-1212-efde-1523-785feabcd123) V 11:38:15.955 Disconnecting... D 11:38:15.978 gatt.disconnect() D 11:38:16.000 [Callback] Connection state changed with status: 0 and new state: DISCONNECTED (0) I 11:38:16.025 Disconnected D 11:38:16.065 gatt.refresh() D 11:38:16.096 gatt.close() V 11:38:17.018 [DFU] Starting DFU service V 11:38:17.041 [DFU] Opening file... I 11:38:17.058 [DFU] Image file opened (17220 bytes in total) V 11:38:17.074 [DFU] Connecting to DFU target... I 11:38:17.091 [DFU] Connected. Services discovered V 11:38:17.130 [DFU] Reading DFU version number... I 11:38:17.147 [DFU] Read Response received from 00001534-1212-efde-1523-785feabcd123, value (0x): 05-00 A 11:38:17.163 [DFU] Version number read: 0.5 V 11:38:17.180 [DFU] Enabling notifications for 00001531-1212-efde-1523-785feabcd123 D 11:38:17.203 [DFU] gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x01-00) A 11:38:17.220 [DFU] Notifications enabled V 11:38:17.236 [DFU] Writing to characteristic 00001531-1212-efde-1523-785feabcd123 D 11:38:17.253 [DFU] gatt.writeCharacteristic(00001531-1212-efde-1523-785feabcd123) I 11:38:17.268 [DFU] Data written to 00001531-1212-efde-1523-785feabcd123, value (0x): 01-04 A 11:38:17.286 [DFU] DFU Start sent (Op Code = 1, Upload Mode = 4) V 11:38:17.301 [DFU] Writing to characteristic 00001532-1212-efde-1523-785feabcd123 D 11:38:17.327 [DFU] gatt.writeCharacteristic(00001532-1212-efde-1523-785feabcd123) I 11:38:17.343 [DFU] Data written to 00001532-1212-efde-1523-785feabcd123, value (0x): 00-00-00-00-00-00-00-00-44-43-00-00 A 11:38:17.361 [DFU] Firmware image size sent (0b, 0b, 17220b) E 11:38:21.768 [DFU] Device has disconnected D 11:38:21.793 [DFU] gatt.close() V 11:38:21.817 Connecting to CE:E6:73:B3:D2:3B...
  • @mike: Could you send me the .hex file and .dat file you used ? Have you tried the examples hex file and dat file in your phone located at Nordic Semiconductor/Board/PCA10028 ?

    A sniffer trace would also tell more on what went wrong.

Related