Hi,
You can refer to the SMP server sample.
I use this command
west build -p -b nrf52840dk_nrf52840 zephyr/samples/subsys/mgmt/mcumgr/smp_svr -- -DOVERLAY_CONFIG='overlay-fs.conf;overlay-serial.conf' && west flash --recover
and get
Regards,
Amanda H.
Hi Amanda,
Thank you for your reply!
I could be able to run the smp server, that you cited and able to transfer small files.
My use case is to transfer 300kB of file to Filesystem, but It did not succeed. Even I tried low sized file, 108kB of file size, but it also failed with timeout.
Here
mu.txt file size is 1kB
mu108_kb.txt file size is108kB
C:\Users\MK\Downloads\serial_upgrade>mcumgr --conntype serial --connstring "COM10,baud=115200" fs upload mu.txt /lfs1/mu.txt
12
Done
C:\Users\MK\Downloads\serial_upgrade>mcumgr --conntype serial --connstring "COM10,baud=115200" fs upload mu108_kb.txt /lfs1/mu108_kb.txt
Error: NMP timeout
Any suggestion?
Thanks,
MK V
++++
In this exercise, i tried to determine the least number of characters in the file that I can transfer.
Here the number of characters included in the file is 35, also same it showed it written 35 bytes in the console.
C:\Users\MK\Downloads\serial_upgrade>mcumgr --conntype serial --connstring "COM10,baud=115200" fs upload mu108_kb.txt /lfs1/mu108_kb.txt
35
Done
Here after added extra one character to the mu108_kb.txt for successive cases.
C:\Users\MK\Downloads\serial_upgrade>mcumgr --conntype serial --connstring "COM10,baud=115200" fs upload mu108_kb.txt /lfs1/mu108_kb.txt
36
Done
C:\Users\MK\Downloads\serial_upgrade>mcumgr --conntype serial --connstring "COM10,baud=115200" fs upload mu108_kb.txt /lfs1/mu108_kb.txt
37
Done
C:\Users\MK\Downloads\serial_upgrade>mcumgr --conntype serial --connstring "COM10,baud=115200" fs upload mu108_kb.txt /lfs1/mu108_kb.txt
38
Done
C:\Users\MK\Downloads\serial_upgrade>mcumgr --conntype serial --connstring "COM10,baud=115200" fs upload mu108_kb.txt /lfs1/mu108_kb.txt
Error: NMP timeout
Maximum character I could transfer using mcumgr over UART is 38 bytes.
Could you elaborate me on this transfer limitation and What is the possibilities to transfers 500kB of file over uart using mcumgr on application?
Thanks,
MK V
Hi Amanda,
Any config changes help to break this limitation?
Could you able to upload 500kb of file using mcumgr over UART?
Thanks,
MK V
Hi,
500KiB uploads work fine, but you need to have a flash device that you can store it on. For our DKs, that would mean having to move the fatfs/lfs partition to QSPI/SPI flash with CONFIG_PM_PARTITION_REGION_LITTLEFS_EXTERNAL. You can execute "ninja partition_manager_report" command under the build folder to check the memory layout and size large enough for the upload file:
My test project for nRF52840DK with spi external flash: smp_svr.7z
-Amanda H.