Using minicom to interface with serial devices on Linux

I came across a problem recently, I needed to configure a Cisco switch and all I had was a Ubuntu machine that had a serial port. Since then I've got a Cisco 2511, with octal cable, which is very handy when configuring many devices, but that is for another post.

I found a program called 'minicom' which is available as far as I'm aware in all the main repositories. This post is a brief explanation on how to find your serial port and setup / use minicom.

1. First of all lets start with finding the computers serial ports, make sure you have your device powered on and connected:

dmesg | grep tty

Listing Linux serial devices

This shows in my example that the physical serial port is at ttyS0, where as usb > serial converters will show as ttyUSB0

2. Time to open up minicom, I believe the later versions will allow running as an unprivileged user, but this will mean that you can not save configurations. Better to run as root if you have the option.

Start-up Minicom

Default page after starting Minicom

3. Checking the options available is very easy, to put minicom in to command mode control+a needs to be pressed, with a following 'z' to show the options. For example, control+a then x will close minicom.

Minicom Options

4. Now it is time to setup minicom, as you can see from the help page you need to use control+a then o (for options). Scroll down to "Serial port setup" and hit enter.

Minicom serial settings.

5. From there is is pretty straight forward to follow the prompts to change to your required settings. Typically Cisco networking equipment uses 9600 Bps/Par/Bits, "8-N-1", Yes to Hardware Control Flow and no to Software Control Flow. Also set your serial device to the one you found in the first step.

Minicom Cisco Settings

6. Now save your configuration for quicker access in the future, personally I save it as "Cisco".

Saving configuration

7. Now close minicom with control+a then x will prompt you the option to close the program or simply scroll to "Exit".

Resetting Minicom

8. If you saved a configuration within minicom, it can be used to open minicom directly in to those settings. For example, "minicom cisco".

Initialising Minicom

9. Everything should be ready for using your serial device.

Functioning Minicom


Original link:

http://lachlanmiskin.com/blog/2012/08/03/using-minicom-to-interface-with-serial-devices-on-linux/


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值