Month: April 2009

Force a USB device to use OHCI

Posted by on April 21, 2009

As I described in my previous post I built a cheap USB wireless adapter into my NSLU2. It finds my network and connects without problems. But when I transfer bigger loads of data, it sometimes stops working. The log showed that it disconnects from the USB hub. Other people experiencing similar problems indicated that this was a problem with the ehci_hcd kernel module and “solved” by removing this module. But thats definitely not a good idea when your only mass storage device is connected via USB too.
So I needed to disable the EHCI for the wireless adapter only. That should have no big impact because I don’t think my network really offers speeds above 12 Mbit/s. Fortunately there is a script by Ernestas Vaiciukevičius that does exactly this.

Update:
Seems like the link is dead. You can find the script here.
Usage: Create a udev rule that runs it:

SUBSYSTEM=="usb", ENV{PRODUCT}=="xxxx/yyyy/*" RUN+="/usr/local/bin/force_ohci.sh"

xxxx and yyyy can be found in lsusb’s output:

$ lsusb
Bus 001 Device 001: ID xxxx:yyyy Device name
[...]

For testing reasons you can also run it from the command line:

$ ./force_ohci.sh "xxxx:yyyy"

Wireless NSLU2

Posted by on April 20, 2009

I bought a NSLU2 some weeks ago. I will use it as printer and scanner server and as an ever running torrent client. As I don’t want to run a ethernet cable through the walls of our flat, I need wireless network on it.
There is a nice HowTo on NSLU2-Linux. I got my hands on a wireless usb stick for 15 €, warmed up the soldering iron and got started:
You really need a steady hand for soldering onto these tiny contacts.
IMG_0527

But to my own surprise I managed to:
done with soldering

Inside the case of the NSLU2 there is enough space, so i just taped the new part on top of some capacitors:
completed

5 minutes later I was really glad to see the device in lsusb.

Photos online

Posted by on April 14, 2009

I just finished uploading some photos taken during my recent flights. See them here.
And I got a new hobby.

Multi-line comments in ruby

Posted by on April 7, 2009

I keep forgetting how to do them, so I post myself a little reminder here.

Just put

=begin
...
=end

around the stuff to be commented out. There must not be whitespaces before these keywords.