1. 程式人生 > >C-kermit的安裝及配置

C-kermit的安裝及配置

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* 可以檢視到有幾個串列埠.