Re: [SLUG] USB <-> serial cables

From: Mark Polhamus (meplists@earthlink.net)
Date: Sat May 12 2007 - 11:55:46 EDT


Eben King wrote:
> On Thu, 10 May 2007, Mark Polhamus wrote:
>
>> Eben King wrote:
>>> Anybody used a USB <-> serial cable? I had this bright idea of hooking
>>> my UPS to the computer. I understand lots of nifty stuff can be
>>> accomplished through such a connection.
>>>
>>> Unfortunately, my UPS's cable is serial on both ends, and my computer's
>>> sole serial port is occupied by a modem. I looked aroung for a USB
>>> variant. Since the "S" in "USB" stands for "serial", I thought it
>>> shouldn't be too hard to find. Unfortunately, it was. The only USB
>>> cables I found had an RJ-45 on the other end.
>>>
>>> So, I figured I could put either the modem (it only gets Caller-ID data,
>>> so flow control and speed aren't that important) or the UPS (2400 BPS
>>> sez the manual, so ditto) on the USB <-> serial cable I have. But, I've
>>> never used it but once (and that was in The Other OS). Help?
>
> I tried plugging the UPS into the USB <-> serial cable, but:
>
> On the first attempt, everything was "live" when I inserted the plug
> (DB-9) and the UPS shut off immediately. Crud. OK, now that it wass
> down, things weren't likely to get worse, so I went ahead and hooked it
> up. The UPS came up OK (as long as I let it finish the self-test before
> booting the computer).
>
> Then, during the boot sequence, the UPS powered off. My guess is that
> when the USB port is initialized, the transition from "no power" to
> "power" makes the converter go through an initialization sequence, part
> of which means "shut down now" to the UPS. Said sequence is not a
> concern to the modem (and in any case it's rather less vital) so I
> switched the connections.
>
>> I've used USB to Serial converters on Linux and Windows. They
>> actually work better on Linux since drivers are built into recent
>> kernels and there is nothing to install. They present a virtual comm
>> port interface, so to your software they look just like another serial
>> port, "/dev/ttyUSB0" or some such.
>
> Thanks. I found out about "lsusb" so I could find what my device
> _really_ is.
>
>> Keyspan model USA-19HS is the one I have used the most, which has some
>> sort of TI chip.
>
> lsusb says:
>
> Bus 001 Device 005: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial
> Port
>
> so I went in the kernel configuration and compiled
>
> <M> USB Prolific 2303 Single Port Serial Driver
>
> Modprobed it, udev created the node /dev/ttyUSB0, and off I went. Not
> sure what'll happen next time I boot.
>
>> Had multiples plugged in at the same time, it all just works,
>> although you have to pay attention to make sure you associate the
>> correct device entry with each converter.
>
> Are they differentiable by udev, or once it's created the devices it's
> up to you to figure out which one is ttyUSB[0123]?

I've always just looked through /var/log/messages to figure out which is
which. There is probably a better way.

-- Mark
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 16:22:14 EDT