Raspberry Pi Asked on October 5, 2021
I am configuring my raspberry pi device of the serial console (like this https://learn.adafruit.com/adafruits-raspberry-pi-lesson-5-using-a-console-cable/overview)
How can I do the equivalent of scp? (copy files to the raspberry pi)
Currently I am just going cat > newfile.py
and then pasting in the file content.
Maybe the following matrix will explain what I am missing:
over network | over serial
--------------------------------------------------------------
ssh [email protected] | picocom -b 115200 /dev/ttyU*
--------------------------------------------------------------
scp script.py [email protected]:~ | ????????????????
additional stuff:
There's nothing wrong with your approach for individual text files. For a binary file (or a large number of files/directories which you'd pack together with tar/gzip
), you can use base64
to encode them as text:
Receiver (Pi over picocom
):
cat | base64 -di > file
Sender (another terminal on the PC):
cat file | base64 > /proc/`pidof picocom`/fd/0
Also note that if you want to try out X/Y/ZMODEM (which will be about 30% faster than gzip
/base64
), the client in Debian goes by the name lrzsz
and can be installed with apt
. Other apps with ZMODEM support are cutecom
/minicom
.
Answered by Dmitry Grigoryev on October 5, 2021
Although old fashioned, Picocom supports filetransfer, x-modem, y-modem, z-modem and ascii-xfr. If I where you, i'd go for z-modem. The package you are looking for is lrzsz
(and notzmodem
as I stated earlier). Note that it operates a bit different from scp
.
Answered by Ljm Dullaart on October 5, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP