Weblog entry #46 for dkg
As part of upstream on cereal, i feel obliged to mention that package as a tool for managing serial console farms like this. It's designed to run in a small footprint, stores timestamped logs for the consoles, supports concurrent remote access, and uses standard unix accounts (usually via ssh) to permit read and/or write access to each port. It has saved me exactly the headaches Matt describes many times.
However, i've had trouble getting multiple identical USB serial adapters to persist at standard device file locations across reboot. That is, if you have four pl2303 devices from the same manufacturer, it seems to be a crapshoot which one will be /dev/ttyUSB0 after you restart your system. I could find no distinguishing data in the sysfs to get udev to persistently key off of, anyway. if you know a way to do it, i'd be happy to see it!
Depending on how many ports you need, another alternative would be to use a sheevaplug with a multiport USB-to-serial adapter. While i haven't tried this specific hardware, it would remove the need for the hub, and potentially would mean you didn't need any extra power. I'm assuming that this device would give you persistent port naming, but i haven't tried it. Pricewise, it seems to be a win, too: $100 for the SheevaPlug and $100 for the 8-port adapter.
Comments on this Entry
(I have not tried this with an external hub, just on-MB usb ports.)
[ Parent | Reply to this comment ]
(scroll down to "What are the sysfs structures for Linux USB")
It says there:
A: For example the directory will have something like:
# ls /sys/bus/usb/devices/
1-0:1.0 1-1.3 1-1.3.1:1.0 1-1:1.0
1-1 1-1.3.1 1-1.3:1.0 usb1
...
All the other entries refer to genuine USB devices and their interfaces. The devices are named by a scheme like this:
bus-port.port.port ...
In other words, the name starts with the bus number followed by a '-'. Then comes the sequence of port numbers for each of the intermediate hubs along the path to the device.
...
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Send Message | View dkg's Scratchpad | View Weblogs ]
cereal stores timestamped logs -- does the fonera have a reasonable amount of internal storage (e.g. a few dozen MB free, depending on how many consoles you plan to manage, and how much spew your machines send to the console)?
If onboard storage is too tight, you'd probably want to find a way to either add extra storage, or write data to files on another machine (using nfs/nbd/whatever), so that you can keep the console history around for a little while at least.
if you want to try to get cereal working on top of openwrt, please let me know. We'd love to see that happen.
[ Parent | Reply to this comment ]
SUBSYSTEMS=="usb", ATTRS{manufacturer}=="FTDI", ATTRS{product}=="TTL232R", ATTRS{serial}=="FTDZIB0L", KERNEL=="ttyUSB[0123]", SYMLINK+="newname", MODE="0660", GROUP="dialout"
Normally every usb-to-serial adapter has an unique ID called serial. May be die pl2303 is to cheap but every FTDI provides it.
[ Parent | Reply to this comment ]