Difference between revisions of "How to transfer a file over serial console"

[quality revision] [quality revision]
m
 

Template:ArticleApprovedVersion

1 Purpose[edit]

The article provides information that is useful when starting with ckermit.

2 Introduction[edit]

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[edit]

Kermit is installed on the STMicroelectronics images via the ckermit package

4 Installation on your PC[edit]

The ckermit package MUST be installed on your PC to perform file tranfers via a serial console

On ubuntu

 sudo apt-get install ckermit

5 Getting started[edit]

  • 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
Info white.png Information
ttyACM0 corresponds to the serial port on Linux connected to the board. It can vary depending on the type of serial connection (ttyS0, ttyUSB0,...
  • 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
Info white.png Information
To close the kermit session properly, don't forget to send the following command:
 kermit kermit_ttyACM0.cfg -f

6 Tips[edit]

  • 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)


<noinclude>

{{ArticleApprovedVersion | ChristopheP | BernardP ChristopheM SebastienG (Passed,Mar'18 ) | No previous approved version | PhilipS - 24Jul'18 - 7515 | 29Aug'18}} 
[[Category:How to run use cases]]
[[Category:How to populate boards]]</noinclude>

==Purpose==
The article provides information that is useful when starting with '''ckermit'''.

==Introduction==
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. <br/>

<br/>

In this article, we focus only on file-transfer between a host PC and an STMicroelectronics board via a serial console.

==Installation on your target==
Kermit is installed on the STMicroelectronics images via the '''ckermit''' package

==Installation on your PC==
The '''ckermit''' package  MUST be installed on your PC to perform file tranfers via a serial console

On ubuntu
 {{PC$}} sudo apt-get install ckermit

==Getting started ==
* generate a configuration file for kermit
Content of kermit_ttyACM0.cfg<pre>

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</pre>

{{Info|ttyACM0 corresponds to the serial port on Linux connected to the board. It can vary depending on the type of serial connection (ttyS0, ttyUSB0,...}}

* Download a file from a board to your PC:
Get the file '''/etc/hosts''' from the board:
 {{PC$}} 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/
 {{PC$}} kermit kermit_ttyACM0.cfg -s myfile.txt

{{Info|To close the kermit session  properly, don't forget to send the following command:
 {{PC$}} kermit kermit_ttyACM0.cfg -f
}}

==Tips==
* Serial port already in use
If you encounter this kind of message (or if the command line is stuck, and displays random characters)
 {{PC$}} 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)

<noinclude>

[[Category:How to run use cases]]
[[Category:How to populate boards]]
{{PublicationRequestId | 7515 | 2018-07-24 | PhilipS}}</noinclude>
Line 1: Line 1:
<noinclude>
 
{{ArticleApprovedVersion | ChristopheP | BernardP ChristopheM SebastienG (Passed,Mar'18 ) | No previous approved version | PhilipS - 24Jul'18 - 7515 | 29Aug'18}}
 
[[Category:How to run use cases]]
 
[[Category:How to populate boards]]
 
</noinclude>
 
 
 
==Purpose==
 
==Purpose==
 
The article provides information that is useful when starting with '''ckermit'''.
 
The article provides information that is useful when starting with '''ckermit'''.
Line 59: Line 53:
   
 
Please kill/close the serial console application (generaly Minicom on Linux)
 
Please kill/close the serial console application (generaly Minicom on Linux)
  +
  +
<noinclude>
  +
[[Category:How to run use cases]]
  +
[[Category:How to populate boards]]
  +
{{PublicationRequestId | 7515 | 2018-07-24 | PhilipS}}
  +
</noinclude>