Blog Just another tech site


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


WordPress running on a Raspberry Pi Issues

I have been monitoring the Raspberry Pi running apache2, php5, mysql powering a wordpress blog under very low traffic. I have noticed the load times are very unreasonable, with every page load causing a 100% spike in cpu activity for a fair period of time.

Response Time (in ms)

As can be seen in the above graph load times were very extreme considering the device was solely used just for running wordpress and the related software.

Page load response times

Frequently the raspberry pi would become completely unresponsive even to SSH connections.

Raspberry Pi Unresponsive

Availability Chart

Obviously a low powered device like this simply cant handle the standard software's demands. Mathew Shadel's blog talks about some interesting ways minimalise the software load with different software, I may try this in the future but for now I want to try a few different things with my Pi and not have it tied up in a server room.


WordPress running on a Raspberry Pi

Raspberry Pi

Just a heads up, there is a clone of this very blog running at on a Raspberry Pi.

It is running the standard Debian install provided at the Raspberry Pi website running stock standard apache2/php5/mysql server. This is very heavy for the low powered Raspberry Pi so if your trying it out, expect very slow load times and occasional crashes. From my experiences it seems that with an overload will cause the whole system to become unresponsive and requires a power cycle.

There are other software packages around for lower powered linux servers which I may look in to sometime in the future.

I recently received an MK802, so who knows may the blog will be dished out from that eventually.


Centos: Yum update error “file from install of conflicts with file from package”

Centos Yum Update Issue

Recently I decided to update a few linux servers that I maintain and found some issues while running yum update which were stopping updates. Many errors showing that file conflicts with the file from package etc. All of the servers are 64 bit, but it seemed that yum had previously downloaded 32 bit versions of the programs installed, so these useless copies have to be removed.

file /usr/share/man/man1/perlplan9.1.gz from install of perl-5.8.8-38.el5.x86_64 conflicts with file from package perl-5.8.8-32.el5_7.6.i386
file /usr/share/man/man1/perlpod.1.gz from install of perl-5.8.8-38.el5.x86_64 conflicts with file from package perl-5.8.8-32.el5_7.6.i386
file /usr/share/man/man1/perlpodspec.1.gz from install of perl-5.8.8-38.el5.x86_64 conflicts with file from package perl-5.8.8-32.el5_7.6.i386
file /usr/share/man/man1/perlport.1.gz from install of perl-5.8.8-38.el5.x86_64 conflicts with file from package perl-5.8.8-32.el5_7.6.i386

The steps I took to resolve the issues:

  1. yum remove \*.i386 \*.i686
  2. If you don't want to issue to reoccur, echo "exclude = *.i?86" >> /etc/yum.conf
  3. yum reinstall \* or yum update
Filed under: General Linux 2 Comments