Uploading DFU OTA to nrf52840 using nrf connect sdk

I am trying to use an ESP32 board to upload OTA DFU from SD card to NRF52840 board. I am using ZCBOR library to encode and decode requests and responses I am sending over BLE.

I successfully managed to implement echo, reset, image list commands and they are working.

Following docs https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/services/device_mgmt/smp_groups/smp_group_1.html to upload the image chunk by chunk to nrf52840, but when sending the first chunk I am getting an error in the response with number 3 (Invalid value; a request contains an invalid value.)

I am not sure what is going wrong there, but I need to understand few points:

1- is there any config I can activate on nrf52840 to get more logs and see where exactly the failure comes from.

2- according to docs, I have to send image as text without sending the length of bytes being sent, assuming it will get this as string do I have to convert the chunk I am sending to hex string format before encoding it with zcbor and sending over BLE?

Related