From owner-freebsd-hardware@FreeBSD.ORG Sat Jun 7 13:41:35 2003 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 95E4937B404 for ; Sat, 7 Jun 2003 13:41:35 -0700 (PDT) Received: from mail.dada.it (mail3.dada.it [195.110.100.3]) by mx1.FreeBSD.org (Postfix) with SMTP id 16A3443FE0 for ; Sat, 7 Jun 2003 13:41:32 -0700 (PDT) (envelope-from riccardo@torrini.org) Received: (qmail 12143 invoked from network); 7 Jun 2003 20:41:27 -0000 Received: from unknown (HELO trudy.torrini.home) (195.110.114.101) by mail.dada.it with SMTP; 7 Jun 2003 20:41:27 -0000 Received: from trudy.torrini.home (localhost.torrini.home [127.0.0.1]) by trudy.torrini.home (8.12.9/8.12.9) with ESMTP id h57KfS7X013010; Sat, 7 Jun 2003 22:41:28 +0200 (CEST) (envelope-from riccardo@trudy.torrini.home) Received: (from riccardo@localhost) by trudy.torrini.home (8.12.9/8.12.9/Submit) id h57KfShm013009; Sat, 7 Jun 2003 22:41:28 +0200 (CEST) Date: Sat, 7 Jun 2003 22:41:28 +0200 From: Riccardo Torrini To: n_hibma@FreeBSD.ORG, Lennart Augustsson , freebsd-hackers@FreeBSD.ORG, freebsd-hardware@FreeBSD.ORG, freebsd-questions@FreeBSD.ORG Message-ID: <20030607204128.GA12773@trudy.torrini.home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Subject: Trying to use a USB HID device (APC RS-500) without success X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jun 2003 20:41:35 -0000 I already sent this message without reply. I need only a pointer to the right direction, please, I think I'm near the solution... TIA, Riccardo. PS: please Cc: me, I follow only current@ ----- Forwarded message from myself ----- I'm trying to interface my new APC (RS 500) with FreeBSD 4.8-STABLE but I found some (a lot of?) problems: # usbdevs -v -d Controller /dev/usb0: addr 1: self powered, config 1, UHCI root hub(0x0000), VIA(0x0000), rev 1.00 uhub0 port 1 powered port 2 addr 2: low speed, self powered, config 1, \ Back-UPS RS 500 FW:30.j2.I USB FW:j2(0x0002), \ American Power Conversion(0x051d), rev 0.06 Looking into source I found that prototyping: -----8<-----[ /usr/src/lib/libusbhid/libusbhid.h ]-----8<----- [...] int hid_report_size(report_desc_t d, unsigned int id, enum hid_kind k); [...] is different from man page (2nd/3rd parameter swapped): -----8<-----[ man hid_report_size ]-----8<----- [...] int hid_report_size(report_desc_t d, unsigned int id, hid_kind_t k); [...] I think man page is wrong, but this is not a problem. After playing with usbhidctl I found that my APC use 0xff84, 0xff85 and 0xff86 instead of 0x84, 0x85 and 0x86 as it would so I created a custom file with the contents of /usr/share/misc/usb_hid_usage and with a copy of pages 132/133 to 0xff84/0xff85 and now it decode pages/usages. Now I'm at a dead end, usbhidctl say: device does not support immediate mode, only changes reported. but interrogating device with -a and/or -l show me only zeros. If you need my config/boot.log feel free to download them from: ftp://ftp.torrini.org/pub/FreeBSD/APC-hacking/ What else can I do (apart from changing UPS)? I hope you can point me to the right direction (docs or ML)... TIA PS: can we change .../usb_hid_usage and use hex notation, instead of decimal one, also for pages because usbhidctl report them as hex? -- Riccardo. ( http://www.GUFI.org/~vic/ )