I am attempting to update firmware on hardware already in the field. The firmware in the field is based of sdk v11 and has the legacy bootloader for OTA DFU. After some digging I found this post:
I am attempting to update firmware on hardware already in the field. The firmware in the field is based of sdk v11 and has the legacy bootloader for OTA DFU. After some digging I found this post:
Hi Sam,
I assume you testing using the custom bootloader made by Bjørn in this case.
Please describe step by step what you did and what's the result.
Has the custom bootloader boot and running, at which step do you receive Op Code 2 status 6 ?
Hi Hung Bui,
I am using the custom bootloader from that post.
I carried out the following steps to in an attempt to upgrade my bootloader:
All of this seemed to work and my custom bootloader and project were operating as normal.
In short, I am stuck attempting to use the custom bootloader to OTA DFU the new sdk v17 Secure Bootloader & Soft Device Package. Here is the output from the logs within nRF Connect.
I hope this clears things up, thanks for the help.
Sam
Hi Hung Bui,
I am using the custom bootloader from that post.
I carried out the following steps to in an attempt to upgrade my bootloader:
All of this seemed to work and my custom bootloader and project were operating as normal.
In short, I am stuck attempting to use the custom bootloader to OTA DFU the new sdk v17 Secure Bootloader & Soft Device Package. Here is the output from the logs within nRF Connect.
I hope this clears things up, thanks for the help.
Sam
Hi Sam,
Could you tell how did you generate the .zip packet for the image of the SDK v17 bootloader and the S132 v7.2.0 ? Please provide the script you used to generate the .zip file.
From my understanding you should use the old nrfutil and generate it the same way as you generated the custom bootloader.
The error Op Code = 02 means OP_CODE_RECEIVE_INIT
And status = 06 means BLE_DFU_RESP_VAL_OPER_FAILED.
This suggested that there could be an issue with the init packet. You may want to put a breakpoint inside on_ctrl_pt_write() and check how it handles OP_CODE_RECEIVE_INIT in the custom bootloader.
I would suggest to try testing just updating the same custom bootloader (simply change bootloader version) just to check if the custom bootloader actually can DFU update itself.
Ahh this clears things up for me. I was using the new nrfutil package to generate the SDK v17 bootloader and softdevice package. I used this command:
nrfutil pkg generate --hw-version 52 --bootloader secure_bootloader_ble_s132_pca10040.hex --bootloader-version 0 --softdevice s132_nrf52_7.2.0_softdevice.hex --sd-req 0x0081 --output upgraded_bl_sd.zip
This did not work. However, after using the same, old nrfutil tool package as I had used to create the custom bootloader, I was able to upload the new package containing SDK v17 bootloader and softdevice. That command was this:
nrfutil.exe dfu genpkg --bootloader secure_bootloader_ble_s132_pca10040.hex --dev-revision 0xffff --softdevice s132_nrf52_7.2.0_softdevice.hex --dev-type 0xffff --sd-req 0xfffe dfu_bl_sd_sdk17.zip
Zip created at dfu_bl_sd_sdk17.zip
Once I created this package using the old nrfutil tool package I was able to complete the following steps successfully:
Thank you so much for the help! I hope others are able to find this post helpful as well.