How can I transfer a binary file using minicom and a serial connection?
I have not tried this before, but this page says you can send binary via minicom by encoding it in ASCII. You need to have busybox
installed on the box.
Use uuencode
to encode. Here is it's syntax:
uuencode [INFILE] STORED_FILENAME > send_file
INFILE is the path to file to encode and STORED_FILENAME is obviously the name of the file. uuencode outputs to stdout, so it is redirected to a temporary file, send_file
.
Ready the target machine for recieving file:
target$ cat > recieved_file
Now it is uploaded as ascii using minicom:
host$ minicom
CTRL+A S
+-[Upload]--+
| zmodem |
| ymodem |
| xmodem |
| kermit |
|>ascii< |
+-----------+
On the target, decode the file:
uudecode [-o OUTFILE] [INFILE]
To see if it worked as expected, check md5:
busybox md5sum <filename>
Please see if this works and post back, because I have never done this. myself
Related videos on Youtube
kaio
Updated on September 18, 2022Comments
-
kaio over 1 year
How can I transfer a binary file using a serial cable between my Ubuntu pc and a box where I've installed minicom? The minicom box doesn't have a connection.
-
Admin almost 9 yearsIs a serial cable the only option? Does the box have a network card? A usb port?
-
Admin almost 9 yearsyes @ terdon , the serial cable the only option .it haven't a network card , usb port.
-
Admin almost 9 yearsDid you read armadeus.com/wiki/index.php?title=Serial_Transfer
-
-
JohnTortugo about 7 yearsFYI: Just tried it on Ubuntu and Petalinux and it worked perfectly!
-
Lexible almost 4 yearsAnd how do you send byte-for-byte binary if the embedded system does not permit you decode ascii?