Date: Mon, 22 Sep 2003 00:04:15 +0200 From: Bernd Walter <ticso@cicely12.cicely.de> To: Lars Eggert <larse@ISI.EDU> Cc: current <current@freebsd.org> Subject: Re: X10 Wireless Technology Inc USB Receiver Message-ID: <20030921220414.GZ21665@cicely12.cicely.de> In-Reply-To: <3F6DE165.1020404@isi.edu> References: <3F57B0A0.2040508@isi.edu> <20030905072228.3def6a8b.steve@sohara.org> <3F63E246.8030801@isi.edu> <20030915190350.3e0fe0ec.steve@sohara.org> <20030918165710.GB19984@genius.tao.org.uk> <3F69FFC9.80308@isi.edu> <20030918231742.GB41432@genius.tao.org.uk> <3F6DE165.1020404@isi.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Sep 21, 2003 at 10:35:33AM -0700, Lars Eggert wrote: > 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 Are you shure that the above is correct data for the device? The IO error could also be returned from the device. What does USB_DEBUG with hw.usb.debug=2 and hw.usb.ugen.debug=2 say? Bevor I download the complete source you mentioned, can you give us the lines that lead to the above command? > 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. I don't know, but it could also depend on the controller you use. E.g. ehci currently doesn't support interrupt endpoints at all. -- B.Walter BWCT http://www.bwct.de ticso@bwct.de info@bwct.de
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030921220414.GZ21665>