Learnt something new : cu

Standard

Inside the uucp package is a nifty tool that I just picked up on called cu.  This is for serial connection management and it works beautifully, and simply.  I had a few old machines that I needed to tap into via serial and a friend admin I was with recently mentioned her love of this command.  So having a selectively great memory, I gave it a stab.

1)First get uucp installed.  I see that it comes from EPEL on RHEL7.

[andrew@big-red-wireless Desktop]$ sudo yum info uucp
Loaded plugins: langpacks, nvidia, product-id, subscription-manager
Installed Packages
Name : uucp
Arch : x86_64
Version : 1.07
Release : 41.el7
Size : 2.7 M
Repo : installed
From repo : epel
Summary : A set of utilities for operations between systems
URL : http://www.airs.com/ian/uucp.html
License : GPLv2+
Description : The uucp command copies files between systems. Uucp is primarily
: used by remote machines downloading and uploading email and news
: files to local machines.

[andrew@big-red-wireless Desktop]$

2)Secondly determine your connection parameters.  I have a USB to serial hodgepodge of cabling and adapters that I tote around and stash in places useful.  So in my case its /dev/ttyUSB0 for the device, and of course each connection has its flow control and bitrate and parity, etc…  Know that all.  In my case the devices preferred to speak 19200b, 8N1, FC Off (manuals say so).  But being hasty I just slapped into the terminal:

[andrew@big-red-wireless ~]# sudo cu -l /dev/ttyUSB0 -s 19200

And things just worked.  For a full reference guide for various settings and such,:

http://linux.die.net/man/1/cu

http://www.jann.cc/2013/02/10/the_cu_command.html

Leave a Reply