From owner-freebsd-usb@FreeBSD.ORG Sat Jun 20 09:37:41 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 738DC106564A; Sat, 20 Jun 2009 09:37:41 +0000 (UTC) (envelope-from christoph@rosenkeller.org) Received: from rosenkeller.org (fry.rose.uni-jena.de [141.35.60.60]) by mx1.freebsd.org (Postfix) with ESMTP id EC92B8FC08; Sat, 20 Jun 2009 09:37:40 +0000 (UTC) (envelope-from christoph@rosenkeller.org) Received: by rosenkeller.org (Postfix, from userid 65534) id AF203264213; Sat, 20 Jun 2009 11:37:33 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by rosenkeller.org (Postfix) with ESMTP id 9273D264213; Sat, 20 Jun 2009 11:37:33 +0200 (CEST) Received: from rosenkeller.org ([127.0.0.1]) by localhost (fry.localnet.rose [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 11966-07; Sat, 20 Jun 2009 11:37:26 +0200 (CEST) Received: from [192.168.0.2] (cable-static-237-100.teleport.ch [213.188.237.100]) by rosenkeller.org (Postfix) with ESMTPSA id E899626420C; Sat, 20 Jun 2009 11:37:22 +0200 (CEST) Message-ID: <4A3CADDF.6070708@rosenkeller.org> Date: Sat, 20 Jun 2009 11:37:35 +0200 From: Christoph Langguth User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: freebsd-usb@freebsd.org References: <4A0DC89C.6010708@rosenkeller.org> <200905162158.22210.hselasky@c2i.net> <4A0F25C5.9020706@rosenkeller.org> <200906020937.20466.hselasky@c2i.net> In-Reply-To: <200906020937.20466.hselasky@c2i.net> Content-Type: multipart/mixed; boundary="------------010706030300000008000904" X-Virus-Scanned: amavisd-new at rosenkeller.org X-Spam-Status: No, score=-4.399 tagged_above=-99 required=5 tests=[ALL_TRUSTED=-1.8, BAYES_00=-2.599] X-Spam-Score: -4.399 X-Spam-Level: Cc: Rui Paulo Subject: Re: How to add support for Macbook Pro (USB) keyboard? 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: Sat, 20 Jun 2009 09:37:41 -0000 This is a multi-part message in MIME format. --------------010706030300000008000904 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Hans Petter Selasky schrieb: > Hi Christoph! > > Rui Paulo has an additional patch for ukbd.c. Can you look at it and verify? > > --HPS > > > > Here's how it worked: > http://wiki.freebsd.org/AppleMacbook#head-7eab3730c3bf3d04bdfb0d1d3649eaddf2fed595 > > If there's any problem with the userland approach, I would like to know. > If there isn't, please consider removing the kenrel support for the > eject key. > > > Hi all! I've poked around a bit on my freshly reinstalled system. To make things short, usbhidctl does not yield anything for the keyboard. I guess the reason is quite simple: # kldload uhid uhid0: on usbus5 uhid1: on usbus5 So the keyboard isn't even recognized by uhid. See the attached file for some usbconfig device dumps, I can't make a lot of sense of it, but maybe someone can. What would one need to do to still make usbhidaction (as an example) work with this device, so that the "additional keys" like the eject button and brightness/volume control etc. (mapped onto Fn + the F1-F12 keys) would be reported? Thanks! --Chris --------------010706030300000008000904 Content-Type: text/plain; name="usbconfig.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="usbconfig.txt" [root@ /usr/src/sys/dev/usb/input]# usbconfig -u 5 -a 2 dump_curr_config_desc ugen5.2: at usbus5, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON Configuration index 0 bLength = 0x0009 bDescriptorType = 0x0002 wTotalLength = 0x0022 bNumInterfaces = 0x0001 bConfigurationValue = 0x0001 iConfiguration = 0x0001 bmAttributes = 0x00a0 bMaxPower = 0x0032 Interface 0 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0000 bAlternateSetting = 0x0000 bNumEndpoints = 0x0001 bInterfaceClass = 0x0003 bInterfaceSubClass = 0x0000 bInterfaceProtocol = 0x0000 iInterface = 0x0000 Additional Descriptor bLength = 0x09 bDescriptorType = 0x21 bDescriptorSubType = 0x11 RAW dump: 0x00 | 0x09, 0x21, 0x11, 0x01, 0x00, 0x01, 0x22, 0x2a, 0x08 | 0x00 Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0082 bmAttributes = 0x0003 wMaxPacketSize = 0x0008 bInterval = 0x000a bRefresh = 0x0000 bSynchAddress = 0x0000 [root@ /usr/src/sys/dev/usb/input]# usbconfig -u 5 -a 3 dump_curr_config_desc ugen5.3: at usbus5, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON Configuration index 0 bLength = 0x0009 bDescriptorType = 0x0002 wTotalLength = 0x0054 bNumInterfaces = 0x0003 bConfigurationValue = 0x0001 iConfiguration = 0x0000 bmAttributes = 0x00a0 bMaxPower = 0x0014 Interface 0 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0000 bAlternateSetting = 0x0000 bNumEndpoints = 0x0001 bInterfaceClass = 0x0003 bInterfaceSubClass = 0x0001 bInterfaceProtocol = 0x0001 iInterface = 0x0003 Additional Descriptor bLength = 0x09 bDescriptorType = 0x21 bDescriptorSubType = 0x11 RAW dump: 0x00 | 0x09, 0x21, 0x11, 0x01, 0x0d, 0x01, 0x22, 0x9c, 0x08 | 0x00 Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0083 bmAttributes = 0x0003 wMaxPacketSize = 0x000a bInterval = 0x0008 bRefresh = 0x0000 bSynchAddress = 0x0000 Interface 1 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0001 bAlternateSetting = 0x0000 bNumEndpoints = 0x0001 bInterfaceClass = 0x0003 bInterfaceSubClass = 0x0000 bInterfaceProtocol = 0x0000 iInterface = 0x0004 Additional Descriptor bLength = 0x09 bDescriptorType = 0x21 bDescriptorSubType = 0x11 RAW dump: 0x00 | 0x09, 0x21, 0x11, 0x01, 0x00, 0x01, 0x22, 0x1b, 0x08 | 0x00 Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0081 bmAttributes = 0x0003 wMaxPacketSize = 0x0040 bInterval = 0x0002 bRefresh = 0x0000 bSynchAddress = 0x0000 Interface 2 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0002 bAlternateSetting = 0x0000 bNumEndpoints = 0x0001 bInterfaceClass = 0x0003 bInterfaceSubClass = 0x0001 bInterfaceProtocol = 0x0002 iInterface = 0x0004 Additional Descriptor bLength = 0x09 bDescriptorType = 0x21 bDescriptorSubType = 0x11 RAW dump: 0x00 | 0x09, 0x21, 0x11, 0x01, 0x00, 0x01, 0x22, 0x34, 0x08 | 0x00 Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0084 bmAttributes = 0x0003 wMaxPacketSize = 0x0008 bInterval = 0x0008 bRefresh = 0x0000 bSynchAddress = 0x0000 --------------010706030300000008000904--