We are implementing DFU over serial to the nRF52832 from another microcontroller.
We are using SDKv15.30 and a slightly modified the serial bootloader from the DFU bootloader examples.
Does the DFU protocol over serial in SDKv15.3.0 use the HCI packet format?
the serial bootloader uses the Serial Line Internet Protocol (SLIP) to encapsulate the data, see the Serial transport layer and the SLIP library documentation.
I think the SLIP layer framing matches that of the the Bluetooth Core Specification 4.0, Volume 4, Part D, Chapter 3 SLIP Layer.
Thanks for your reply. We understand the SLIP encapsulation. The question was that in earlier SDK (v10) we were sending DFU packets over serial that were using the HCI packet format with Vendor Specific extension. We have now changed to SDKv15.3.0, and nothing seemed to line up with what we were doing. However, over the last couple of days I found that the entire DFU protocol changed at SDKv12. I've found the DFU protocol documentation in nRF SDKv15.3.0 and we are implementing that.
Could you please confirm that in SDKv15.3.0 the DFU init packet is now the file "<file>.dat" in the DFU package zip file. Do we send this file exactly as it is byte-for-byte? Or do we have to extract fields from the .dat file and create an init packet?
The reason I ask this is that previously the *.dat file had very little in it and the information about the image was in the manifest.json file. We read data from the manifest.json file (such as file size, version, CRC etc) and generated an init packet.
Phil said:Could you please confirm that in SDKv15.3.0 the DFU init packet is now the file "<file>.dat" in the DFU package zip file. Do we send this file exactly as it is byte-for-byte? Or do we have to extract fields from the .dat file and create an init packet?
Yes, the init packet is the .dat file in the .zip that is generated by nrfutil. The .dat file should be transmitted to the nRF byte-for-byte as shown in the Message Sequence Charts of the Serial transport layer.
Thanks Bjorn. This makes perfect sense. I think the documentation could have spelled this out a bit better. Your help is much appreciated.
Happy to help. Will pass on your feedback on this.