Instructions to use the serial port of your Armadeus board to transfer files from/to your PC.
When you only have a serial link (RS232/USB) as connection with your devt PC (ie no Ethernet available), then you can use Zmodem protocol to send/receive files to/from your Shell/Console of your Armadeus board.
Modify your Buildroot configuration:
$ make menuconfig
to add lrzsz package:
Package Selection for the target ---> Networking applications ---> [*] lrzsz
and then rebuild your rootfs:
Reflash it or manually copy rz and sz executables found in $ARMADEUS_ROOTFS_DIR/usr/bin/.
- Install lrzsz package, if not already installed on your system. For example on Ubuntu/Debian:
$ sudo apt-get install lrzsz
- Install minicom tool:
$ sudo apt-get install minicom
- The first time, configure minicom (as root):
$ sudo minicom -s
- Be sure to have correctly configured Minicom (line speed, 8N1, no flow control, and correct download/upload directories path).
- Use rz for receiving and sz to send files:
Host (PC) --> Target (APF)
# cd /whereToPutTheFileOnTheTarget/ # rz -bZ .. waiting to receive.
- then in minicom do: Ctrl+A , s and choose zmodem protocol and the file to send.
- Wait a little and your file will be copied to your board rootfs ! ;-)
Target (APF) --> Host (PC)
# cd /location/of_the/file_to_send/on_the_apf/ # sz -b --zmodem filename
Minicom handles the file receiving automatically (and put it in your $HOME by default, or the directory you configured in Minicom: Ctrl+z, o, Filenames and paths, Download directory)
After having booted your board:
- On your Target, open a new terminal on your serial link (here USB):
# /sbin/getty -L ttygserial 115200 vt100
- On your Host, launch Minicom and configure it to use /dev/ttyUSB1 at 115200, then connect it to this terminal
Transfer without terminal
- On your Target, launch receiving:
# rz --zmodem 1>/dev/ttyXXX 0</dev/ttyXXX
- On your Host, launch transfer:
$ sz --zmodem /tftpboot/afiletosend 1>/dev/ttyUSB1 0</dev/ttyUSB1