Wednesday, November 19, 2008

Nextwiki has new name

The TWiki fork has now decided on a name. They have decided on Foswiki. This is the most popular AND least hated of the names they'd decided to select from. Getting both of these is pretty impressive :-)

It's not the most scintillating name but it will not be embarrassing to mention to my managers so it meets my major wish list.

Sunday, November 02, 2008

x10 Automation and the cm15a

Haven't played with misterhouse for a while and since the last time we did, we upgraded the kernel on our freevo misterhouse media box.

Tried to turn on a light for a while and released that as we're using the usb cm15a as our pc interface, I needed to rebuild the module. Look at my last blog notes and found that they really weren't detailed enough for me to remember how it all worked. Bad bristley - should take better notes.

Searching google based on the sparse clues I'd left myself I found this useful post on the cm15a with the generic usb driver.

So a synopsis in case it disappears or I'm too lazy to look it up next time.

Doing cat /proc/bus/usb/devices shows me that I have the x10 usb device there but no driver.

T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#= 4 Spd=1.5 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0bc7 ProdID=0001 Rev= 1.00
S: Manufacturer=X10 Wireless Technology Inc
S: Product=USB ActiveHome Interface
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=00(>ifc ) Sub=00 Prot=00 Driver=(none)
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=10ms
E: Ad=02(O) Atr=03(Int.) MxPS= 8 Ivl=10ms


I already had the iplc driver code from this page sitting in my home directory from last time. I had already modified the code to work with the latest 2.6 kernels as recommended on the instruction page. I installed the kernel headers and kernel source (apt-get - I love Debian).

Then I built the cm15a driver - this is the bit I'd forgotten. I tried make -f Makefile.cm15a but what you're supposed to do is

make cm15a


This built the driver for me in /root/iplc/driver/linux-2.6/cm15a.d/cm15a.ko
From the cm15a.d directory I ran
insmod cm15a.ko


And then my at cat /proc/bus/usb/devices showed

T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#= 4 Spd=1.5 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0bc7 ProdID=0001 Rev= 1.00
S: Manufacturer=X10 Wireless Technology Inc
S: Product=USB ActiveHome Interface
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=00(>ifc ) Sub=00 Prot=00 Driver=cm15a
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=10ms
E: Ad=02(O) Atr=03(Int.) MxPS= 8 Ivl=10ms


Note that Driver on the I line now says cm15a. And there is now a /dev/cm15a0 device.