rigado / firmware

Contains source for BMDware and RigDFU
Other
8 stars 7 forks source link

Update of BL and Softdevice OTA #2

Closed chatdeschroedinger closed 1 year ago

chatdeschroedinger commented 1 year ago

Hi,

I have several devices with the RIGADO BMDWare on them but whose hardware is inaccessible. I want to initialize these nRF52832 chips with out nRF Bootloader, Softdevice and Application.

I have loaded the nRF Bootloader and Application as a RIGADO update package (generated with RIGADO genimage tools):

python genimage.py --hexfile bootloader.hex softdevice701.hex --output output.bin --bootloader --softdevice -f config/nrf52832-sd132v3.x.0.cfg

Then I upload the application (generated with command below) with nRF DFU which is working fine.

    nrfutil pkg generate --hw-version 52 --app-boot-validation VALIDATE_GENERATED_CRC --sd-req 0xCB --application-version $(APP_FW_VER_HEX) --application app.hex --key-file priv.pem app.zip

The problem arises when I try to update the Bootloader (generated with below command) over the NRF DFU or over UART. In this case the Bootloader does not start at all bricking the device.

nrfutil pkg generate --hw-version 52  --sd-req 0xCB --bootloader-version $(BL_FW_VER_HEX) --bootloader bootloader.hex --sd-id 0xCB --key-file priv.pem Bootloader.zip

My questions are:

GregKell commented 1 year ago

Thank you for reaching out! In 2019 we sold the Bluetooth Low Energy Module portion of our business to u-bloxhttps://www.u-blox.com/en as we transition focus to our Enterprise IoT solutionhttps://www.rigado.com/cascade-edge-as-a-service/ - read the press release herehttps://www.rigado.com/press_releases/u-blox-acquired-rigados-bluetooth-modules-business/.

If you are having technical issues or have a question, please visit the u-blox Support Communityhttps://portal.u-blox.com/s/ and submit a ticket.

I have copied the u-blox team on this email and someone should be in touch shortly to answer your questions.

Ken Magee . Enterprise IoT Solutions . Rigado E: @.**@.> M: 503.341.3300 @.***

From: chatdeschroedinger @.> Sent: Monday, November 7, 2022 1:49 AM To: rigado/firmware @.> Cc: Subscribed @.***> Subject: [EXTERNAL] [rigado/firmware] Update of BL and Softdevice OTA (Issue #2)

Hi,

I have several devices with the RIGADO BMDWare on them but whose hardware is inaccessible. I want to initialize these nRF52832 chips with out nRF Bootloader, Softdevice and Application.

I have loaded the nRF Bootloader and Application as a RIGADO update package (generated with RIGADO genimage tools):

python genimage.py --hexfile bootloader.hex softdevice701.hex --output output.bin --bootloader --softdevice -f config/nrf52832-sd132v3.x.0.cfg

Then I upload the application (generated with command below) with nRF DFU which is working fine.

    nrfutil pkg generate --hw-version 52 --app-boot-validation VALIDATE_GENERATED_CRC --sd-req 0xCB --application-version $(APP_FW_VER_HEX) --application app.hex --key-file priv.pem app.zip

The problem arises when I try to update the Bootloader (generated with below command) over the NRF DFU or over UART. In this case the Bootloader does not start at all bricking the device.

nrfutil pkg generate --hw-version 52 --sd-req 0xCB --bootloader-version $(BL_FW_VER_HEX) --bootloader bootloader.hex --sd-id 0xCB --key-file priv.pem Bootloader.zip

My questions are:

— Reply to this email directly, view it on GitHubhttps://github.com/rigado/firmware/issues/2, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AELLV2K2ECFPHS6IINBBQX3WHDGAJANCNFSM6AAAAAARY75CNE. You are receiving this because you are subscribed to this thread.Message ID: @.***>

ghost commented 1 year ago

BMDware and RigDFU were sunsetted in 2017 by Rigado with no further plans for support or updates. Use of BMDware and RigDFU are not recommended.

As noted above, u-blox purchased the modules business from Rigado in 2019. This repository has been duplicated at u-blox's GitHub site: https://github.com/u-blox/legacy-bmd-firmware

Note that the Nordic bootloader and RigDFU are not compatible. You will need to perform a chip erase before programming Nordic's bootloader or new application code onto the BMD-300. nrfjprog --recover

chatdeschroedinger commented 1 year ago

Thank you for the immediate response.

I have no access to the hardware so no erasing is possible. Is there any option or sequence of programming firmwares for the nRF bootloader to work? Maybe the RIGADO Bootloader could be adapted to allow the installation on an nRF bootloader?

Am 07.11.2022 um 19:56 schrieb Bob Recny @.***>:

 BMDware and RigDFU were sunsetted in 2017 by Rigado with no further plans for support or updates. Use of BMDware and RigDFU are not recommended.

As noted above, u-blox purchased the modules business from Rigado in 2019. This repository has been duplicated at u-blox's GitHub site: https://github.com/u-blox/legacy-bmd-firmware

Note that the Nordic bootloader and RigDFU are not compatible. You will need to perform a chip erase before programming Nordic's bootloader or new application code onto the BMD-300. nrfjprog --recover

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

ghost commented 1 year ago

I'm afraid the Nordic DFU and RigDFU are not compatible. It is not possible to update from RigDFU to Nordic's DFU without using SWD.

Source code for RigDFU is available in this repository; however, we are not able to provide support.

torfinnberset commented 1 year ago

It is theoretically possible to switch from the RigDFU to the NordicDFU, in fact I successfully did it to migrate all our devices from RigDFU/SoftDevice v3 to NordicDFU/SoftDevice v7.

However, it's a complicated and delicate process that risks bricking your device and I don't recommend it unless you have no other choice. It took me about a week of reverse engineering both the RigDFU and the nRFDFU to see how things could line up. It involves a multi stage bootloading process that erases and re-configures the UICR.

Note that I switched to a UART only version of NordicDFU, I don't know if it's possible with BLE DFU support.