1. 将usb转串口连接到PC上。通过dmesg命令可以查看USB转串口是否被PC识别。显示 ……attachec to ttyUSB0即被识别。
2. 安装kermit。
guo@linux:~$ sudo apt-get install ckermit
[sudo] password for guo:
3. 配置kermit。
guo@linux:~$ sudo vim /etc/kermit/kermrc
在打开的文件里添加以下内容:
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
添加后:
; If you want to run additional user-specific customisations in
; addition to this file, place them in ~/.mykermrc
; Execute user's personal customization file (named in environment var
; CKERMOD or ~/.mykermrc)
;
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
if def $(CKERMOD) assign _myinit $(CKERMOD)
if not def _myinit assign _myinit v(home).mykermrc
xif exist m(_myinit) { ; If it exists,
echo Executing m(_myinit)... ; print message,
take m(_myinit) ; and TAKE the file.
}
4. 如果在set window 5下面再加一行,c,则kermit启动后会自动连接到串口,否则需要手动在kermit的提示符下
输入命令“c”或者“connect”(不包括双引号),这样才能连接到串口。
在串口连接的状态下,按下“Ctrl+/”再输入“c”即可返回到kermit。