Difference between revisions of "Kermit"

From ArmadeusWiki
Jump to: navigation, search
(creation)
 
(Installation)
 
(24 intermediate revisions by 7 users not shown)
Line 1: Line 1:
Kermit is a serial line terminal emulator that allows you to take control of your board through the RS232 line. With it you can have access to the Linux console of your board without any keyboard/screen need. ([http://tldp.org/HOWTO/Remote-Serial-Console-HOWTO/ For more informations])
+
[[Category: terminal]]
 +
 
 +
Kermit is a serial line terminal emulator that allows you to take control of your board through the RS232 line. With it you can have access to the U-Boot/Linux console of your APF without needing to connect a keyboard/screen to the board. ([http://tldp.org/HOWTO/Remote-Serial-Console-HOWTO/ For more informations on remote console])
  
 
==Installation==   
 
==Installation==   
 +
The 'sudo' command requires from the user to be registered in the 'sudo' group or to be in the sudoers list on your PC.
 
===On *Ubuntu / Debian===
 
===On *Ubuntu / Debian===
 +
 
  $ sudo apt-get install ckermit
 
  $ sudo apt-get install ckermit
or use Synaptic graphical package manager.
+
 
 +
you may have to configure your distribution to accept compatible  software from the internet. This can be done through the synaptic package manager  
 +
<pre class="config">
 +
-> repositories.. ->debian software -> Non-DFSG-compatible software.
 +
</pre>
 +
 
 +
To avoid using ''sudo'' or ''root'', add your user (here ''mylogin'') in ''dialout'' group:
 +
 
 +
<pre class="host">
 +
$ sudo adduser mylogin dialout
 +
</pre>
 +
then close and re-open your graphical session, to make group changes taken into account.
  
 
===On Fedora===
 
===On Fedora===
 
  # rpm -q ckermit
 
  # rpm -q ckermit
 +
 +
===On OpenSUSE 11.3===
 +
# sudo zypper addrepo http://download.opensuse.org/repositories/openSUSE:/11.3:/Contrib/standard/ Contrib
 +
# zypper install ckermit
  
 
==Configuration==   
 
==Configuration==   
* Edit/Create .kermrc file in your $HOME directory and fill it with:
+
* Edit/Create ''.kermrc'' file in your ''$HOME/'' directory (ex: ''/home/james/.kermrc'') and fill it with:
 
  set line /dev/ttyS0
 
  set line /dev/ttyS0
 
  set speed 115200
 
  set speed 115200
Line 23: Line 42:
 
  set window 5
 
  set window 5
 
  set transmit linefeed on
 
  set transmit linefeed on
* In this example, we assume that your serial port is ttyS0 (first serial port). Change this to correct value if necessary.
+
{{:Serial port selection generalities}}
* If you use an ''USB <-> Serial'' converter then serial port would surely be named like that: ttyUSB0
+
** If ''USB <-> Serial'' converter doesn't seem to work, run the ''dmesg'' command. You should read [http://ubuntuforums.org/archive/index.php/t-392791.html this thread] if you see some disconnection data like this :
+
[ 2445.568000] usb 1-1.4: new full speed USB device using uhci_hcd and address 22
+
...
+
[ 2446.964000] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
+
[ 2446.964000] ftdi_sio 1-1.4:1.0: device disconnected
+
  
* If you get an error message such:
+
==Usage== 
 +
* To launch it:
 +
<pre class="host>
 
  $ kermit -c
 
  $ kermit -c
 +
</pre>
 +
* If you get an error message such:
 +
<pre class="host>
 
   /dev/ttyS0  
 
   /dev/ttyS0  
 
   ?SET SPEED has no effect without prior SET LINE  
 
   ?SET SPEED has no effect without prior SET LINE  
check that you have read/write rights on /dev/ttyS0 (ie your serial port)
+
</pre>
 +
then recheck that you have read/write rights on the serial port (Typically on Ubuntu: you are not member of "dialout" group).
 +
On OpenSUSE 11.3 you may need to be in "dialout" and 'uucp" groups and give the rights to write in /var/lock:
 +
<pre class="host>
 +
sudo chmod 777 /var/lock
 +
</pre>
  
==Usage== 
 
* To launch it:
 
$ kermit -c
 
 
* To switch from terminal mode to command mode:
 
* To switch from terminal mode to command mode:
 
  CTRL + \ then c
 
  CTRL + \ then c
Line 47: Line 67:
 
  Switch in command mode
 
  Switch in command mode
 
  C-Kermit>q then ENTER
 
  C-Kermit>q then ENTER
 +
 +
== Usefull tips ==
 +
 +
* Download a file via serial in U-Boot :
 +
<pre class="apf">
 +
BIOS> loadb
 +
## Ready for binary (kermit) download to 0xA0000000 at 115200 bps...
 +
</pre>
 +
Then type <Ctrl-\>c and send your file with command :
 +
<pre class="apf">
 +
kermit> send filename
 +
</pre>
  
 
==Links==
 
==Links==
 
* http://www.columbia.edu/kermit/ckermit.html
 
* http://www.columbia.edu/kermit/ckermit.html

Latest revision as of 14:43, 16 April 2018


Kermit is a serial line terminal emulator that allows you to take control of your board through the RS232 line. With it you can have access to the U-Boot/Linux console of your APF without needing to connect a keyboard/screen to the board. (For more informations on remote console)

Installation

The 'sudo' command requires from the user to be registered in the 'sudo' group or to be in the sudoers list on your PC.

On *Ubuntu / Debian

$ sudo apt-get install ckermit

you may have to configure your distribution to accept compatible software from the internet. This can be done through the synaptic package manager

-> repositories.. ->debian software -> Non-DFSG-compatible software.

To avoid using sudo or root, add your user (here mylogin) in dialout group:

$ sudo adduser mylogin dialout

then close and re-open your graphical session, to make group changes taken into account.

On Fedora

# rpm -q ckermit

On OpenSUSE 11.3

# sudo zypper addrepo http://download.opensuse.org/repositories/openSUSE:/11.3:/Contrib/standard/ Contrib
# zypper install ckermit

Configuration

  • Edit/Create .kermrc file in your $HOME/ directory (ex: /home/james/.kermrc) and fill it with:
set line /dev/ttyS0
set speed 115200
set carrier-watch off
set handshake none
set flow-control none
robust
set file type bin
set file name lit
set rec pack 1000
set send pack 1000
set window 5
set transmit linefeed on
  • In this example, we assume that your serial port is /dev/ttyS0 (first serial port). Change this to the appropriate value if necessary. For example if you use an USB <-> Serial converter then serial port would surely be named like that: /dev/ttyUSB0 or /dev/ttyACM0
  • If your USB <-> Serial converter doesn't seem to work, run the dmesg command. You should read this thread if you see some disconnection data like this :
[ 2445.568000] usb 1-1.4: new full speed USB device using uhci_hcd and address 22
...
[ 2446.964000] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
[ 2446.964000] ftdi_sio 1-1.4:1.0: device disconnected
  • Check that you have read/write rights on /dev/ttyS0 (ie your serial port): your user ID (here julien) should be part of the serial port access group (here dialout):
$ ls -al /dev/ttyS0
crw-rw---- 1 root dialout 4, 64 2009-05-15 14:56 /dev/ttyS0
$ id
uid=1000(julien) gid=1000(julien) groupes=4(adm),20(dialout),...

Usage

  • To launch it:
 $ kermit -c
  • If you get an error message such:
  /dev/ttyS0 
  ?SET SPEED has no effect without prior SET LINE 

then recheck that you have read/write rights on the serial port (Typically on Ubuntu: you are not member of "dialout" group). On OpenSUSE 11.3 you may need to be in "dialout" and 'uucp" groups and give the rights to write in /var/lock:

sudo chmod 777 /var/lock
  • To switch from terminal mode to command mode:
CTRL + \ then c
  • To switch from command mode to terminal mode:
C-Kermit>c then ENTER
  • To quit:
Switch in command mode
C-Kermit>q then ENTER

Usefull tips

  • Download a file via serial in U-Boot :
BIOS> loadb
## Ready for binary (kermit) download to 0xA0000000 at 115200 bps...

Then type <Ctrl-\>c and send your file with command :

kermit> send filename

Links