Getting your CM19a working on Linux
I recently acquired a Raspberry Pi, and my main project is to get X10 stuff working again in my house.
To that end, I purchased a CM19a. I'm going to chronicle the process of getting it working here, so that eventually this will be a helpful howto. At the moment, it's just a collection of notes and frustration.
First, plug in your CM19a to the USB port.
dmesg. You'll see something like:
[ 11.236260] input: X10 Wireless Technology Inc USB Transceiver as /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/input/input0
[ 11.436218] usb 1-1.3: Weird data, len=1 ff 00 ff 00 00 00 ...
[ 11.447235] usbcore: registered new interface driver ati_remote
[ 11.584656] ati_remote: 2.2.1:ATI/X10 RF USB Remote Control
Also, when you run
lsusb you'll see:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 0bc7:0002 X10 Wireless Technology, Inc. Firecracker Interface (ACPI-compliant)
/dev you'll see:
rbowen@raspberrypi ~ $ ls -la /dev/usb*
crw------T 1 root root 189, 0 Jan 1 1970 /dev/usbdev1.1
crw------T 1 root root 189, 1 Jan 1 1970 /dev/usbdev1.2
crw------T 1 root root 189, 2 Jan 1 1970 /dev/usbdev1.3
crw-rw-rwT 1 root root 189, 3 Jan 1 1970 /dev/usbdev1.4
So far, so good. Linux sees it.
You'll need to create /dev/ttyUSB* to go along with that. Paste this at the shell:
for i in 0 1 2 3 4; do
sudo mknod /dev/ttyUSB$i c 188 $i
Note: 1) This is a magical incantation. I don't yet know what the args to mknod mean. 2) I did 0..4 because lsmod shows devices up to 4. If you have more, make more.
I'm fond of
heyu, so go install that. There's a sample config file that should get installed at
/usr/local/etc/heyu/x10config.sample - copy that over to
~/.heyu/x1config and tinker with the settings in there.
Now, from here, I'm making it up as I go along. Please let me know if you know something I don't. Next step seems to simply be figuring out how to map a serial device to the USB one, since heyu seems to only know how to talk serial. Hopefully this is an easy thing to do, right?