Hi,
Invalid object can be the result of many different issues. Please take a look at nrf_dfu_req_handler.h file in the bootloader project. You can find this:
NRF_DFU_RES_CODE_INVALID_OBJECT = 0x05, //!< Data object does not match the firmware and hardware requirements, the signature is wrong, or parsing the command failed.
You may want to test with the debug variant of the bootloader and step into the code to see what exactly throwing NRF_DFU_RES_CODE_INVALID_OBJECT out.
You can verify the init packet with the signature your provide but there still a chance that your have something wrong on the DFU package that the bootloader find it's incorrect.
I found the problem.
When using protocol buffers, the message to sign is prepended with 4 bytes which I presume is the length?
Hi,
Glad to know that you got a solution. It's been a while that I haven't worked with the protobuf. My suggestion is to look at how the init packet be generated in nrfutil to compare to what you do:
https://github.com/NordicSemiconductor/pc-nrfutil/blob/release/v6.1/nordicsemi/dfu/init_packet_pb.py