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

Attempts to revert nRF52840 dongle to production bootloader fail

I'm attempting to revert an nRF52840 dongle to the production bootloader. This dongle has a SWD connector soldered on for use with J-Link, and I have no difficulties flashing my own software onto it.

The problem is when trying to revert it to the production bootloader using the documentation at this link. I've downloaded the hex file, extracted graviton_bootloader_mbr_v1.0.1-[nRF5_SDK_15.0.1-1.alpha_f76d012].hex, and flashed it to the dongle. Once reset, the red LED pulses as expected.

However, when I connect the nRF Connect Programmer to it, I see the following error:

2021-09-22T23:30:07.590Z INFO Using USB SDFU protocol to communicate with target
2021-09-22T23:30:07.608Z ERROR Error when calling version command: Error: Error message for known response code from DFU target: The data object didn't match firmware/hardware, or missing crypto signature, or malformed protocol buffer, or command parse failed.
2021-09-22T23:30:07.608Z ERROR Error when fetching device versions: TypeError: Cannot read property 'part' of undefined


Does anyone have a suggestion as to what might be the issue here? I'm suspecting I might have to repackage that hex file, or that I'm missing some other steps besides simply flashing it.

Thanks!

Parents
  • Hi,

    I was not able to test today, but I thought that .hex should include the correct public key. In any case the hex file that is currently used in production is attached here: 3250.graviton_bootloader_mbr_v1.0.1.hex. Can you test with that? If that also fails then we need to look a bit in other directions.

  • It appears the core problem is actually my install of nRF Connect Desktop. I spun up a clean Windows VM, installed nRF Connect Desktop, and the Programmer showed the memory layout of the "problem" dongle without the errors seen on the VM's host PC.

    Previously this PC would successfully flash the nRF52840 dongle with nRF Connect Desktop's Programmer. It also does not have any other problems related to USB (that I'm aware of) and works with other devices successfully, including a J-Link. Various scans of the PC seem to show that all is well, such as sfc /scannow, so I'm working under the assumption that something is corrupted with nRF Connect Desktop.

    To try to troubleshoot this, I've been attempting to cleanly uninstall nRF Connect Desktop. This has proven to be easier said than done. The uninstaller seems to only delete the main program, which seems to be in %LocalAppData%\Programs\nrfconnect. It does not delete %UserProfile%\.nrfconnect-apps, which has the interesting side effect of making all the previously install apps immediately available when nRF Connect Desktop is reinstalled. Finally, it also does not delete %LocalAppData%\nrfconnect-updater nor %AppData%\nrfconnect. Deleting all of these directories, then reinstalling nRF Connect Desktop, does not solve the problem.

    Needless to say, given how much is left behind by the uninstaller, I'm not convinced that I can get a clean install of nRF Connect Desktop. 

    Any input on what might be wrong here would be appreciated. 

  • Hi,

    This is an odd issue. It looks like you have found and deleted everything here before re-installing. You have only tried the programmer app, right? What if you try the nRF Connect BLE app? That should automatically flash the latest connectivity firmware version via USB DFU if it is not currently present. It would be intersting to see if you get the same issue or not. And if you do, can you upload the logs from both here and when using the programmer app? (to get full logs, click on the "Open log file" icon in the upper right corner of the log window).

  • Hi Einar. (How can I link your name? I can't find it with the @<USER NAME>)

    I have tried it with the Connect BLE app. I had meant to include that in the original post, but I guess it got lost in editing. The error is essentially the same, although only one line in length:
    2021-09-24T14:42:14.181Z ERROR Failed to setup device: Error message for known response code from DFU target: The data object didn't match firmware/hardware, or missing crypto signature, or malformed protocol buffer, or command parse failed.

    Attached are the two log files. (I wish I'd looked into them when I was trying to uninstall everything, since they seem to contain all the needed paths. Slight smile) They are the error logs you asked for: "Host PC - Programmer connecting to dongle.txt" and "Host PC - BLE attempting to write.txt".

    Anyway, I do appreciate whatever help you can give here. Using a VM to use the Connect Programmer is obviously not a very good solution.

    2021-09-24T14:44:01.659Z INFO Application data folder: C:\Users\Chris\AppData\Roaming\nrfconnect\pc-nrfconnect-programmer
    2021-09-24T14:44:01.710Z DEBUG App pc-nrfconnect-programmer v1.4.11 official
    2021-09-24T14:44:01.710Z DEBUG App path: C:\Users\Chris\.nrfconnect-apps\node_modules\pc-nrfconnect-programmer
    2021-09-24T14:44:01.710Z DEBUG nRFConnect 3.7.1, required by the app is (^3.6.0)
    2021-09-24T14:44:01.710Z DEBUG nRFConnect path: C:\Users\Chris\AppData\Local\Programs\nrfconnect\resources\app.asar
    2021-09-24T14:44:01.710Z DEBUG HomeDir: C:\Users\Chris
    2021-09-24T14:44:01.710Z DEBUG TmpDir: C:\Users\Chris\AppData\Local\Temp
    2021-09-24T14:44:01.721Z INFO Using nrfjprog library 10.12.1, pc-nrfjprog-js 1.7.6
    2021-09-24T14:44:08.486Z INFO Using USB SDFU protocol to communicate with target
    2021-09-24T14:44:08.506Z ERROR Error when calling version command: Error: Error message for known response code from DFU target: The data object didn't match firmware/hardware, or missing crypto signature, or malformed protocol buffer, or command parse failed.
    2021-09-24T14:44:08.506Z ERROR Error when fetching device versions: TypeError: Cannot read property 'part' of undefined
    
    2021-09-24T14:41:42.314Z INFO Application data folder: C:\Users\Chris\AppData\Roaming\nrfconnect\pc-nrfconnect-ble
    2021-09-24T14:41:42.364Z DEBUG App pc-nrfconnect-ble v2.5.3 official
    2021-09-24T14:41:42.364Z DEBUG App path: C:\Users\Chris\.nrfconnect-apps\node_modules\pc-nrfconnect-ble
    2021-09-24T14:41:42.364Z DEBUG nRFConnect 3.7.1, required by the app is (^3.6.0)
    2021-09-24T14:41:42.364Z DEBUG nRFConnect path: C:\Users\Chris\AppData\Local\Programs\nrfconnect\resources\app.asar
    2021-09-24T14:41:42.364Z DEBUG HomeDir: C:\Users\Chris
    2021-09-24T14:41:42.364Z DEBUG TmpDir: C:\Users\Chris\AppData\Local\Temp
    2021-09-24T14:41:42.515Z INFO Updated list of uuids with data from https://github.com/NordicSemiconductor/bluetooth-numbers-database/tree/master/v1
    2021-09-24T14:42:14.181Z ERROR Failed to setup device: Error message for known response code from DFU target: The data object didn't match firmware/hardware, or missing crypto signature, or malformed protocol buffer, or command parse failed.
    

  • Hi,

    This seems quite strange. I checked with the lead developer and he was not able to explain this, nor had he ever seen this behavior before. I will let you know if we come up with a workaround, but I suspect that will not happen until the next major release of nRF Connect for Desktop (that should happen in the not too distant future).

Reply Children
  • Okay, thanks for your help, Einar! I am impressed that the engineers at Nordic take the time to try to solve problems. That's not often seen, unfortunately.

    One more thought about this problem: the only thing I can't delete and reinstall (easily, at least) are the drivers, so I'm left wondering about the DFU driver. Perhaps something has become corrupted there. Unfortunately the driver installer won't reinstall them, as it says "the best drivers for your device are already installed". 

    I wouldn't mind beta-testing that upcoming major release of nRF Connect for Desktop. If you could pass that on to the lead developer, I'd appreciate it. I seem to be rather skilled at stumbling into strange, never before seen bugs...  Slight smile

  • Hi,

    I cannot say if the drivers are relevant or not at this point, but I will forward it. Regarding testing here are usually no public beta testing but I will mention that as well. It could be interesting in this case.

Related