From owner-freebsd-usb@FreeBSD.ORG Fri Apr 17 13:16:26 2009 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 600BF10656BD for ; Fri, 17 Apr 2009 13:16:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from cmail.optima.ua (cmail.optima.ua [195.248.191.121]) by mx1.freebsd.org (Postfix) with ESMTP id D22888FC1A for ; Fri, 17 Apr 2009 13:16:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) X-Spam-Flag: SKIP X-Spam-Yversion: Spamooborona-2.1.0 Received: from orphanage.alkar.net (account mav@alkar.net [212.86.226.11] verified) by cmail.optima.ua (CommuniGate Pro SMTP 5.2.9) with ESMTPA id 240586393 for freebsd-usb@freebsd.org; Fri, 17 Apr 2009 15:16:24 +0300 Message-ID: <49E87317.2060103@FreeBSD.org> Date: Fri, 17 Apr 2009 15:16:23 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.14 (X11/20080612) MIME-Version: 1.0 To: freebsd-usb@freebsd.org X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Subject: Are usbhidctl/usbhidaction working? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Apr 2009 13:16:27 -0000 Hi. I have tried to configure multimedia buttons of my Logitech/BTC keyboard on 8-CURRENT from March 26 and found that it is not working. Keyboard detected as: ugen0.2: at usbus0 ukbd0: on usbus0 kbd2 at ukbd0 kbd2: ukbd0, generic (0), config:0x0, flags:0x3d0000 uhid0: on usbus0 As I have found keyboard supports 3 reports: #1, #2 and #3, while tools only trying to use report #0 and fail. I have tried to hack tools to use report 2, which is most interesting for me, but I have found that data read from uhid device are preceded with 0x02 byte (I think it may be report id) which confuses usbhidaction. Here is some debug I have got from it after just stripping first byte to make it work: read 3 bytes: 02 02 00 2 Consumer:Volume_Decrement 1 0 echo 'Volume_Decrement' >>/qqq 1 system 'echo 'Volume_Decrement' >>/qqq' read 1 bytes: 00 read 3 bytes: 02 00 00 read 1 bytes: 00 read 3 bytes: 02 01 00 1 Consumer:Volume_Increment 1 0 echo 'Volume_Increment' >>/qqq 1 system 'echo 'Volume_Increment' >>/qqq' read 1 bytes: 00 read 3 bytes: 02 00 00 read 1 bytes: 00 So I have a questions: - Are these tools are working at least for somebody now? - Are these tools able to work with several report ids? - Am I right that 0x02 by preceded before report is report id and usbhidaction tool should parse/strip it? - Is it expected way to use uhid with libusd by reading /dev/uhidX device directly? -- Alexander Motin