免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1113 | 回复: 0
打印 上一主题 下一主题

minicom --Linux下的超级终端 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-10-20 19:58 |只看该作者 |倒序浏览
Linux下可以使用minicom通过串口对路由器, 交换机, 别的Linux服务器等设备进行配置,就像Windows下的超级终端一样, 不过功能更强大了.

入minicom命令进入minicom界面, 按CTRL-A Z(同时按Ctrl和A, 然后按Z), 然后按O 选择cOnfigure
Minicom进入minicom的配置界面(也可以输入minicom -s 在minicom启动时直接进入配置界面).
使用向上,向下方向键选择Serial port setup在弹出框中可以按左边的字母修改相应的值, 比如修改串口设备, 则按A,
修改硬件流控, 则按F, 串口设置完成后按回车回到minicom的配置窗口.
由于我们使用minicom作为超级终端控制路由器
等设备, 而不是控制modem, 所以需要修改Modem and dialing, 将Init string, Reset string,
Hang-up string设置为空. 设置完成后选择Save setup as dfl将当前设置保存为默认设置.
选择Exit离开minicom的设置窗口.
按CTRL-A Z, 然后按X选择eXit and reset退出minicom, 并重新启动使设置生效.
参考资料
linux 下的超级终端minicom的使用手册
                        Linux下的Minicom的功能与Windows下的超级终端功能相似,适于在linux通过超级终端对嵌入式设备的管理以及对嵌入操作系统的升级,现写出Minicom的使用手册
配置minicom和使用minicom
1.  启动minicom
以root权限登录系统
使用命令
root –s 则minicom启动,屏幕出现如下的界面|:
………………………………[configuration]……………………………………
……………………   Filename and paths         …………………………
……………………   File transfer and protocols       …………………………
……………………   Serial port setup                  …………………………
……………………   Modem and dialing        …………………………
……………………   Screen and keyboard                 …………………………
……………………   Save setup as df1               …………………………
……………………   Save setup as……         …………………………
……………………   Exit                     …………………………
……………………   Exit from  minicom       …………………………
……………………………………………………………………………………
2.  设置serial port setup
使用down箭头选择serial port setup,出现具体各选项的配置:
   A —  Serial Device  :    /dev/ttyS0
   B —  lockfile Location :  /var/lock
   C —  Calling Program :
   D —  Callout Program:
   E —   Bps/par/Bits   : 9600 8N1
   F —   Hardware Flow Control : YES
   G —   Software Flow Control : NO
   Change  with setting?
将选项A的值设置为/dev/ttyS0 表示是串口0。
将选项E的值设置为9600或115200.
设置过程中命令的使用,例如需要修改选项A的值,在Change with setting?选项后输入A则光标转移到A选项后,可以对A选项的值进行修改。
3.  设置Modem and dialing
使用方向箭头选中modem and dialing 项,则修改modem and dialing 选项中的配置项。
需要修改的是去掉A — initing string ……:,B — Reset string ……:
K — Hang-up string ……三个配置项。
4.  选择Save as df1。
选择Save as df1选项将修改后的配置信息进行保存为默认的配置选项。
5.  Exit from  minicom 。
选择Exit from minicom 选项从配置菜单返回到命令行。选择Exit可进入.
6.  重新启动Minicom。
使用minicom  启动minicom 在linux下通过串口连接路由器,实现超级终端的功能。
               


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/1127/showart_1330168.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP