Transferring file using zmodem/picocom/minicom noninteractively
Asked Answered
P

1

8

We are trying to transfer file using minicom (in host pc) and picocom(in arm based evaluation board) combination. On evaluation board side we have /dev/ttygserial and on host pc side we have /dev/ttyUSB0.

Host side minicom setup is as follows,

  1. Serial device - /dev/ttyUSB0
  2. Baud Rate - 115200

Steps to set minicom in receiving mode.

  1. press ctrl+a R , select zmodem.
  2. Now minicom will start waiting for file from other end.

On evaluation board side we use picocom as follows to send the file.

  1. On command line execute picocom -b 115200 -s "sz -vv" /dev/ttygserial
  2. Now press Ctrl+A and Ctrl+S.
  3. Picocom will ask for filename by printing **file
  4. Once file name is provided and enter is pressed file is sent to host.

All this steps works and we are able to transfer different types of files from evaluation board to pc but now we want to put this procedure into C code. For that I have following doubts,

  1. Is it possible to set minicom in file reception mode using single command? (meaning noninteractively) ?
  2. Is it possible to send file using picocom in single command (meaning noninteractively)?
  3. Any other suggestions?
Pathological answered 9/10, 2013 at 13:10 Comment(0)
P
2

In other sites also people have asked this kind of question but questions unanswered yet.

So I decided to look into picocom code and found that it is very simple to make a change in that code.

I have made send command non-interactive, I will make receive command too non-interactive and post full code here so that it can be referred by anyone who has a similar problem.

Pathological answered 18/10, 2013 at 4:14 Comment(3)
do you mean, link to updated code ? Later we didn't use it, we use tftp so we left this picocom application and I didn't change code after initial changes.Pathological
Never came back with the code it looks like. I'm in the same boat. I can't figure out how to have minicom or picocom send and receive periodically all by them selves.Tarra
Quite possibly this dangled non-answer was the inspiration for XKCD #979.Dedededen

© 2022 - 2024 — McMap. All rights reserved.