X10 Wireless Technology Inc USB Receiver
Lars Eggert
larse at ISI.EDU
Sun Sep 21 10:36:12 PDT 2003
Hi,
I'm trying to get the USB RF remote control that comes with some ATI
Wonder cards to do something meaningful under -current.
It shows up as an "X10 Wireless Technology Inc USB Receiver" with three
devices: /dev/ugen0, and the corresponding input (/dev/ugen0.1) and
output endpoints (/dev/ugen/0.2). Also see the attached usbctl output.
Simply reading from the input endpoint /dev/ugen0.1 doesn't work.
This page (http://remotew.free.fr/linux_en.htm) points at the Gatos
project, which has a Linux driver (ati_remote) that seems to make the
remote show up as a USB keyboard:
http://sourceforge.net/project/showfiles.php?group_id=12629
That driver sends a couple of magic bytes to the device during
initialization. I'm trying to do the same from userland:
static char init1[]= { 0x80, 0x01, 0x00, 0x20, 0x14 };
static char init2[]= { 0x80, 0x01, 0x00, 0x20, 0x14, 0x20, 0x20, 0x20 };
int main(int argc, char *argv[]) {
int out = open("/dev/ugen0.2", O_WRONLY);
if (out == -1) {
perror("ugen0.2");
goto done;
}
if (write(out, init1, sizeof init1) == -1) {
perror("write init1");
goto done;
}
if (write(out, init2, sizeof init2) == -1) {
perror("write init1");
goto done;
}
done:
close(out);
}
Really simply. Here's what happens when I run it:
write init1: Input/output error
it feels like I'm missing something extremely obvious, but I'm new to
the USB internals. The two endpoints are "interrupt" endpoints. I'm not
sure what that signifies, but I heard writing to them on -stable is
broken, but on -current it should work.
Any ideas?
Thanks,
Lars
--
Lars Eggert <larse at isi.edu> USC Information Sciences Institute
-------------- next part --------------
DEVICE addr 2
DEVICE descriptor:
bLength=18 bDescriptorType=device(1) bcdUSB=1.10 bDeviceClass=0 bDeviceSubClass=0
bDeviceProtocol=0 bMaxPacketSize=8 idVendor=0x0bc7 idProduct=0x0004 bcdDevice=100
iManufacturer=1(X10 Wireless Technology Inc) iProduct=2(USB Receiver) iSerialNumber=0() bNumConfigurations=1
CONFIGURATION descriptor 0:
bLength=9 bDescriptorType=config(2) wTotalLength=32 bNumInterface=1
bConfigurationValue=1 iConfiguration=0() bmAttributes=80 bMaxPower=2 mA
INTERFACE descriptor 0:
bLength=9 bDescriptorType=interface(4) bInterfaceNumber=0 bAlternateSetting=0
bNumEndpoints=2 bInterfaceClass=255 bInterfaceSubClass=0
bInterfaceProtocol=0 iInterface=0()
ENDPOINT descriptor:
bLength=7 bDescriptorType=endpoint(5) bEndpointAddress=1-in
bmAttributes=interrupt wMaxPacketSize=8 bInterval=10
ENDPOINT descriptor:
bLength=7 bDescriptorType=endpoint(5) bEndpointAddress=2-out
bmAttributes=interrupt wMaxPacketSize=8 bInterval=10
current configuration 1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3529 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20030921/e38f8a93/smime.bin
More information about the freebsd-current
mailing list