- Last edited 3 years ago ago
How to transfer a file over serial console
The article provides information that is useful when starting with ckermit.
C-Kermit is a combined network and serial communication software package offering a consistent, transport-independent, cross-platform approach to: connection establishment, terminal sessions, file transfer, file management, character-set translation, numeric and alphanumeric paging, automation of file transfer and management, dialogs, and communication tasks through its built-in scripting language.
In this article, we focus only on file-transfer between a host PC and an STMicroelectronics board via a serial console.
3 Installation on your target
Kermit is installed on the STMicroelectronics images via the ckermit package
4 Installation on your PC
The ckermit package MUST be installed on your PC to perform file tranfers via a serial console
sudo apt-get install ckermit
5 Getting started
- generate a configuration file for kermit
Content of kermit_ttyACM0.cfg
set line /dev/ttyACM0 set speed 115200 set carrier-watch off set flow-control none set prefixing all set parity none set stop-bits 1 set modem none
- Download a file from a board to your PC:
Get the file /etc/hosts from the board:
kermit kermit_ttyACM0.cfg -g /etc/hosts
- Upload a file from your PC to a board:
Put the local file myfile.txt on the board at specific location: /home/root/
kermit kermit_ttyACM0.cfg -s myfile.txt
- Serial port already in use
If you encounter this kind of message (or if the command line is stuck, and displays random characters)
kermit kermit_ttyACM0.cfg -s /etc/hosts Locked by process 24320 can't open device
Please kill/close the serial console application (generaly Minicom on Linux)