歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> RHEL6.0下C-kermit的安裝及配置

RHEL6.0下C-kermit的安裝及配置

日期:2017/2/28 15:28:34   编辑:Linux教程

1.安裝

sudo yum install ckermit

2.配置

vim ~/.kermrc

#內容如下

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

#保存退出

3.連接串口

sudo kermit -c

#出現如下提示:

?SET SPEED has no effect without prior SET LINE

Sorry, you must SET LINE or SET HOST first

#出現這個的原因是kermit是root用戶的,在運行時不會使用~/.kermrc配置

#解決辦法,將配置文件移動到root目錄下

sudo mv ~/.kermrc /root/

#這個辦法是參考一網上的方案的,詳見http://www.linuxidc.com/Linux/2012-11/74558p2.htm ,不過我對作者關於Ubuntu 9.04不能使用~/.kermrc配置持保持態度,因為我以前使用Ubuntu 9.04LTS和Ubuntu 10.04LTS都沒有出現這個問題。

#正常運行是如下提示:

Connecting to /dev/ttyS0, speed 115200

Escape character: Ctrl-\ (ASCII 28, FS): enabled

Type the escape character followed by C to get back,

or followed by ? to see other options.

----------------------------------------------------


Communications disconnect (Back at localhost.localdomain)

----------------------------------------------------

C-Kermit 9.0.301 OPEN SOURCE:, 11 Jul 2011, for Linux

Copyright (C) 1985, 2011,

Trustees of Columbia University in the City of New York.

Type ? or HELP for help.

#另一個要注意的是:

在串口通信下,外接鍵盤無法響應Ctrl+\和c組合鍵,使用筆記本上的按鍵就沒問題。

使用dmesg | grep tty* 可以查看到有幾個串口.

Copyright © Linux教程網 All Rights Reserved