Hello,
I'm using nRF52832, SDK15.0.0, Softdevice S132.
What should be the code added to application in order to support BLE DFU service?
I've been here, but its for nRF52 SDK V0.9.2 (which I think is very old).
Thanks in advance for your reply.
Hello,
I'm using nRF52832, SDK15.0.0, Softdevice S132.
What should be the code added to application in order to support BLE DFU service?
I've been here, but its for nRF52 SDK V0.9.2 (which I think is very old).
Thanks in advance for your reply.
Hello,
If you have not used the bootloader and DFU yet, I suggest that you start with this guide. I know it is a bit old, but it should be very suited as a starting point for SDK15.
If you start with this example, and then move over to the ble_app_buttonless_dfu example in SDK15\examples\ble_peripheral, using the same bootloader that you made in the guide, using the SDK15\examples\dfu\secure_bootloader\pca10040_ble, you should be up and running.
What you want to do, eventually, is to add the buttonless_dfu service from the ble_app_buttonless_dfu example to your custom project. Note that this requires the chip/board to have a bootloader flashed when running, or it will cause an application error. This can be ensured upgrading from the dfu\secure_bootloader example to the buttonless_dfu example using the bootloader.
Let me know if you run into any problems on the way.
Best regards,
Edvin
Hello Edvin,
Thanks a lot for your reply.
I've followed the guide but I had problems as described here.
Please correct me if I'm wrong. What I need to do is:
1. Add the buttonless_dfu service from the ble_app_buttonless_dfu example to my project.
2. Flash the application.
3. Flash the chip with the same bootloader that I've made in the guide (with its settings).
4. Flash sd132 V6.0.0.
I'm not sure I understand the last sentence: "This can be ensured upgrading from the dfu\secure_bootloader example to the buttonless_dfu example using the bootloader".
Can you explain it please?
Best regards,
Ran
Hello,
Do you have an extra DK that you can try to upload the DFU packet with, instead of using the phone?
The last sentence:
What I meant is that if you only flash your application with the buttonless_dfu service, you will get an error in services_init() saying that it couldn't find a bootloader. If you start by doing the dfu\secure_bootloader project, and upgrade the firmware to the buttonless_dfu project by creating a DFU pack containing this project, it will not erase the bootloader in this process. But if you use nRFGo studio or nrfjprog to erase the chip, it will remove the bootloader.
But do you have access to 2x nRF52 DKs? Just to eliminate the phone as a possible source of error? Try to use the latest release of nRF Connect for desktop to upload the DFU firmware.
BR,
Edvin
Hello,
Do you have an extra DK that you can try to upload the DFU packet with, instead of using the phone?
The last sentence:
What I meant is that if you only flash your application with the buttonless_dfu service, you will get an error in services_init() saying that it couldn't find a bootloader. If you start by doing the dfu\secure_bootloader project, and upgrade the firmware to the buttonless_dfu project by creating a DFU pack containing this project, it will not erase the bootloader in this process. But if you use nRFGo studio or nrfjprog to erase the chip, it will remove the bootloader.
But do you have access to 2x nRF52 DKs? Just to eliminate the phone as a possible source of error? Try to use the latest release of nRF Connect for desktop to upload the DFU firmware.
BR,
Edvin
Hello,
I have only one DK.
I thought to:
1. Upgrade my application as described at my last comment and flash the SD, application and BL to my custom device.
2. Upload the DFU packet (e.g. ble_app_hrs.zip) from the DK.
Is it correct?
Although I've downloaded the nRFConnect_BLE_User_Guide_v2.2.pdf, can you tell me in short
what should be flashed in the DK and how it sends the DFU packet to the custom device?
BR,
Ran
I am a bit confused. Do you have one custom device and one DK?
And you want to update the DK, right?
1: on the device that you want to be able to update:
program the bootloader, softdevice and application via programming cable. You can use the project in examples\dfu.
2: Now it should advertise as DfuTarg. You can connect to it with nRF Connect. Either the app for a phone, or with a computer running nRF Connect for Desktop with a separate DK connected.
3: After the connection is established, select your application package (ble_app_hrs.zip). This package must be created via the nrfutil tool in the guide that I linked to in a previous answer. It is not possible to just zip the application folder. Then click "Start DFU", and it should run the DFU process.
Are you able to do these steps, or does something fail in one of these 3 steps?
Best regards,
Edvin
Hello,
We have a BLE sensor. We would like to update FW OTA.
So now I want to see if I can update the ble_app_hrs.zip (which is created via the nrfutil tool) from the DK to our sensor (DK -> Sensor)
I hope the problem was that I used the same --sd-req 0x98 as in the blog post and not 0x00a8 for S132 V6 (as I commented here)
My DK was burned out, so I'm waiting for new board to continue the experiment.
BR,
Ran
That may be. nrfutil is not always up to date on the --sd-req hex values. 0x008a will still work, but it is not listed in the --help menu. To see what version a softdevice is, you can flash the softdevice to a DK, and open nRFgo Studio, and see the softdevice id there.
Also remember to update the --application-id to always be at least 1 higher than the currently running application. Unless the the bootloader will reject the packet.
BR,
Edvin