Hi,
What is the best way to send image from one nrf5340 that is central to other nrf5340 that is peripheral in order to update him via
Hi,
What is the best way to send image from one nrf5340 that is central to other nrf5340 that is peripheral in order to update him via
I added the echo command to my code.
How to implement other commands?
For example Reset or Upload the image?
Where is an documentation for this(op,flags,id, payload types)?
Thanks
Thank, waiting for update
Thanks for update.
I was also created a reset command.
still stack at image upload command.
Hello,
I will be gone until Monday and won't be able to continue with this until then. My apologies for that.
Best regards,
Simon
I would like to inform you that I'm still working on this. I encountered some issues with the parsing of the image upload command on the smp_svr side, but I talked to a developer internally and got some tips on how to debug it. Will keep you updated.
Best regards,
Simon
Some progress. Now I was able to sucessfully send the first packet of an image upload command and correctly parse it on the smp_svr side.
Thanks for update
Thanks for update
I've now put the app_update.bin file into flash of the device running the central_smp_client sample, then I read out the first 32 bytes containing the image header and sends it to the device running the smp_svr sample. The smp_svr side sends an image upload response in return, with "rc"=0 and "off"=32.
Amazing.
if it is ok i can also test it on my side, i have an image stored at the external flash that i downloaded and i can read data and send it.
You can attach a code for this.
Check it out here: https://github.com/simon-iversen/ncs_samples/tree/master/central_smp_client_dfu
The code is really messy and not cleaned up at all. Sorry about that. I'm using nRF52840 DK on both sides by the way, but I don't think that should matter.
Then you should receive 0x300c0101bf6272630636f66661820ff in response.
You can see these bytes by adding the following piece of code to C:\v2.0.0\nrf\subsys\bluetooth\services\dfu_smp.c--notify_process()
printk("Received %d amount of bytes\n", length); printk("Bytes: 0x"); for(int x = 0;x < length; x++){ printk("%x", ((uint8_t *)data)[x]); } printk("\n");
Currently I'm struggling to parse the response in the app itself (using this method). But using cbor.me I'm able to see that the received data corresponds to this:
300c0101bf → ???
627263 → "rc"
0 → 0
636f6666 → "off"
1820 → 32 (unsigned(32))
ff → end of packet I think
So you can see that it contains rc=0 and off=32
Let me know if you achieve any progress.
Now I'm able to parse the incoming image upload CBOR response in the central_smp_client sample. So to complete the image upload command, I just need to repeat the process and send all of image chunks.
Hi Guys, I need to integrate into my project an OTA update.
I have a gateway (nrf52840) connected using UART to an external microcontroller to the cloud, and IoT nodes connected using BLE.
I begin following one thread on devzone, and then the guys talk to me about your dev thread.
I purpose to join together to make a def. guide as in Nordic Doc I always can't find the solutions to my problems
My idea was to get data from UART (as I connect the nordic to an ESP32 with AT commands for Wifi Connection) and then store them into flash, and after getting the file .hex from uart, restart the micro.
Into the bootloader, pick up data from flash and store to the program memory zone, and after that, restart the micro and that's it.
When the gateway is updated, the next step is to update also IoT node, but in this case, using the BLE and not the UART obviously.
Using STM it's a child's play, using nordic everything seems to be impossible... is it the way you are proceding ?