Write a file to littlefs using mcumgr and return The system cannot find the path specified

I tried to use mcumgr to write and read files to the littlefs of 9160. According to the instructions, I will enter mcumgr conn add acm0 type="serial" connstring="dev=/dev/ttyACM0,baud=115200,mtu=512" first, then enter mcumgr -c acm0 fs upload foo.txt /lfs/foo.txt, will get this error

I have also set CONFIG_MCUMGR_GRP_FS to y

How should I solve this problem?

Parents
  • Hi llly,

    The error seems to be because the command line cannot find foo.txt on your system rather than a problem with the device.

    I am not sure where mcumgr expect foo.txt to be without any path, but can you try using an absolute path? Also avoid using any non-ASCII character in the path. Preferably only use alphanumeric character and maybe underscore "_".

    Hieu

Reply
  • Hi llly,

    The error seems to be because the command line cannot find foo.txt on your system rather than a problem with the device.

    I am not sure where mcumgr expect foo.txt to be without any path, but can you try using an absolute path? Also avoid using any non-ASCII character in the path. Preferably only use alphanumeric character and maybe underscore "_".

    Hieu

Children
Related