2010-08-05

Digi Edgeport/8 persistent serial port assignments

Even better than patching usb-serial.ko is to use the /dev/serial/by-id links that are provided with recent versions of Udev.

In the case of Debian Lenny (5.0.4), where the version of Udev (125) is too old, patching /lib/udev/path_id as follows:

--- a/extras/path_id/path_id
+++ b/extras/path_id/path_id
@@ -515,6 +515,9 @@ handle_device () {
*/host[0-9]*/[0-9]*:[0-9]*:[0-9]*:[0-9]*)
handle_scsi "$D"
;;
+ */ttyUSB*)
+ D=${D%/ttyUSB*}
+ ;;
*/usb[0-9]*/[0-9]*/*)
handle_usb "$D"
;;
and copying /lib/udev/60-persistent-serial.rules (the latter goes to /etc/udev/rules.d) provides the capability.

2010-05-18

How to do a remote installation of Debian 5.0.4 on a Dell Poweredge 2900 using the DRAC 5 Virtual Media feature

1. Update the DRAC firmware to the latest revision (System->Remote Access). I have 1.51

2. Install a 32-bit version of Firefox 3.0, along with 32-bit Java plugin. This allows the "Native" plug-in to be installed and work!

3. Download the Debian netinst iso image, and "connect" it (set "Auto-Attach").

4. Boot the server - press F11 so you can select the Virtual CD-ROM from the boot menu.

5. During the installation, the CD-ROM mount may fail. Start the shell from the installer menu, and mount /dev/sr1 on /cdrom. Check to make sure /cdrom shows the CD content.

6. After partitioning is complete, unmount /cdrom. (THis took forever to find out!)

2010-05-10

How to get a Digi Edgeport/8 working with RHEL/CentOS 5 - part 2

It turns out this wasn't the entire story. The device filenames that are created when the device is plugged-in (or at boot-up) depend on what other usb-serial devices are also connected, and which USB ports they are plugged into.

The standard advice is to use 'udev' to cause symlinks to be created that refer to the adapter ports independently of the kernel-assigned /dev/ttyUSBn names.

Unfortunately, in kernel 2.6.18, as shipped, this port information is not in the 'sysfs' database.

Fortunately, I found this patch, which enabled me to build an updated usb-serial.ko (using the procedure in the previous post).

Once installed, the following udev rules file /etc/udev/rules.d/11-edgeport.rules :

BUS=="usb",SYSFS{idVendor}=="1608",SYSFS{idProduct}=="0244",SYSFS{serial}=="*-0",NAME="%k",SYMLINK="ttyEDGE8_0_$sysfs{port_number}"`
BUS=="usb",SYSFS{idVendor}=="1608",SYSFS{idProduct}=="0244",SYSFS{serial}=="*-1",NAME="%k",SYMLINK="ttyEDGE8_1_$sysfs{port_number}"`
BUS=="usb",SYSFS{idVendor}=="1608",SYSFS{idProduct}=="0244",SYSFS{serial}=="*-2",NAME="%k",SYMLINK="ttyEDGE8_2_$sysfs{port_number}"`
BUS=="usb",SYSFS{idVendor}=="1608",SYSFS{idProduct}=="0244",SYSFS{serial}=="*-3",NAME="%k",SYMLINK="ttyEDGE8_3_$sysfs{port_number}"`

causes symlinks to be created like this:

lrwxrwxrwx 1 root root 7 May 10 14:53 /dev/ttyEDGE8_0_0 -> ttyUSB1
lrwxrwxrwx 1 root root 7 May 10 14:53 /dev/ttyEDGE8_0_1 -> ttyUSB2
lrwxrwxrwx 1 root root 7 May 10 14:53 /dev/ttyEDGE8_1_0 -> ttyUSB3
lrwxrwxrwx 1 root root 7 May 10 14:53 /dev/ttyEDGE8_1_1 -> ttyUSB4
lrwxrwxrwx 1 root root 7 May 10 14:53 /dev/ttyEDGE8_2_0 -> ttyUSB5
lrwxrwxrwx 1 root root 7 May 10 14:53 /dev/ttyEDGE8_2_1 -> ttyUSB6
lrwxrwxrwx 1 root root 7 May 10 14:53 /dev/ttyEDGE8_3_0 -> ttyUSB7
lrwxrwxrwx 1 root root 7 May 10 14:53 /dev/ttyEDGE8_3_1 -> ttyUSB8

2010-05-07

How to get a Digi Edgeport/8 working with RHEL/CentOS 5

The issue: although Edgeport USB-serial devices have in-kernel support, the changes for the Edgeport/8 didn't make it into 2.6.18 .

Thanks to some great support from Digi and the driver author, I was able to get this working perfectly on CentOS 5.4, although this ought to work on any RHEL5 or CentOS5 version.

First, follow the procedure for installing the kernel source and setting up a non-root user build area.

Prepare for module build with this procedure

Download this patchfile , then change directory to BUILD/kernel-2.6.18/linux-2.6.18.i686/drivers/usb/serial/ and use the 'patch' program to update the driver source.

Change directory to BUILD/kernel-2.6.18/linux-2.6.18.i686 and do 'make M=drivers/usb/serial' . Copy the resulting io_ti.ko module to /lib/modules/`uname -r`/kernel/drivers/usb/serial/

DON'T FORGET to run 'depmod -a' (like I did!), then reboot. You should see /dev/ttyUSB[0-7] created.

pyserial is handy for verifying the hardware is working correctly - I used the loopback test (test/test.py) from the source tarball.

2010-04-08

Quick and easy bootable DOS CD using Linux

I needed a DOS bootable CD to update the BIOS on a Dell server. The Dell executable was too large to fit on a 1.44MB floppy image, so many of the recipes I found wouldn't work. I ran across this page and adapted it to my needs. Here is a generic procedure:

0: Install mkisofs (and optionally qemu, if you want to test the image before burning).

1. mkdir freedos_livecd && cd freedos_livecd # or whatever name

2. wget -N http://www.mikerosoft.org/Utilities/FDOEMCD.builder.zip

3, unzip FDOEMCD.builder.zip && cd FDOEMCD/CDROOT

4. cp {files needed on CD} .

5. cd ..

6. mkisofs -o imagename.iso -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 \
-boot-info-table -N -J -r -c boot.catalog -hide boot.catalog -hide-joliet boot.catalog CDROOT

Done!

To test the image before burning:

qemu -localtime -boot d -cdrom imagename.iso # Ctrl-Alt to get your pointer back

Then burn it.

2009-11-16

Safari books

I was reminded how much I like having a Safari Books Online subscription this morning.

I read this Slashdot review of Becoming Agile: In An Imperfect World and then was able to open the Safare web page, paste in the title, and start reading. Instant gratification!

2009-10-30

Asus EEE PC useful at last!

We purchased one of these to evaluate, and it fell into disuse for the usual reasons (mainly the display is too small to be useful for much).

However, I needed to use Skype to conference with a colleague while at the summit for a engineering run, and could not get the microphone to work on my T61p laptop. So I fired up Skype on the EEE and it worked "out of the box".

However, the version that comes with it is too old to have video support. Some Googling found this article

Unfortunately, the link in the article takes you to the current version, 2.1, for Debian, not built for Xandros. Rather than get into dependency hell, I dug around, and found the previous version for Xandros here: http://download.skype.com/linux/skype-debian_2.0.0.72-1_i386.deb

Everything else worked as described, and I had two-way video, using the little built-in webcam.

So now I have a handy little video-phone!