From owner-freebsd-usb@FreeBSD.ORG Thu Oct 27 00:54:47 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A580B16A41F for ; Thu, 27 Oct 2005 00:54:47 +0000 (GMT) (envelope-from brian@aljex.com) Received: from s1tank.virtdom.com (s1tank.virtdom.com [216.240.101.50]) by mx1.FreeBSD.org (Postfix) with SMTP id 2B39443D46 for ; Thu, 27 Oct 2005 00:54:46 +0000 (GMT) (envelope-from brian@aljex.com) Received: (qmail 42233 invoked by uid 89); 27 Oct 2005 01:21:34 -0000 Received: from ool-43552092.dyn.optonline.net (HELO venti) (brian@aljex.com@67.85.32.146) by s1tank.virtdom.com with SMTP; 27 Oct 2005 01:21:34 -0000 Message-ID: <032e01c5da91$04ff9920$6600000a@venti> From: "Brian K. White" To: "Loren M. Lang" References: <20051023095137.GC18930@alzatex.com> <041301c5d8d4$62749100$6600000a@venti> <20051025075602.GB4759@alzatex.com> Date: Wed, 26 Oct 2005 20:54:17 -0400 Organization: Aljex Software MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Cc: freebsd-usb@freebsd.org Subject: Re: LibUSB fails to enumerate all devices 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: Thu, 27 Oct 2005 00:54:47 -0000 ----- Original Message ----- From: "Loren M. Lang" To: "Brian K. White" Cc: "Loren M. Lang" ; Sent: Tuesday, October 25, 2005 3:56 AM Subject: Re: LibUSB fails to enumerate all devices > On Mon, Oct 24, 2005 at 03:51:27PM -0400, Brian K. White wrote: > > > > ----- Original Message ----- > > From: "Loren M. Lang" > > To: > > Sent: Sunday, October 23, 2005 5:51 AM > > Subject: LibUSB fails to enumerate all devices > > > > > I am developing a USB device which has two interfaces, one interface > > > uses a standard HID protocol, the other is completely custom at the > > > moment. FreeBSD attaches appropriately to the HID interface and works > > > correctly. For the custom interface, I was going to write a device > > > driver in userspace using libusb, but I can't seem to find it. I > > > wrote > > > a program to enumerate all devices on all busses, but the only device > > > I > > > see is the one device I don't have any driver loaded for. Does > > > FreeBSD > > > not allow a userspace to access an interface of a usb device when any > > > of > > > it's interfaces are grabbed by a kernel driver even though the > > > interface > > > I want is not grabbed? > > > > I am not a kernel or usb developer at all. But what you describe sounds > > like it might be related to a problem I have. > > I have a wireless usb keyboard with 3 devices that share the single usb > > receiver. The keyboard, the touchpad mouse built in to it, and a > > seperate > > wireless mouse. > > On linux ever since 2.6., it all works out of the box. suse > > 9.3, 10.0, and knoppix 4.0 all work for example. Suse 9.2 almost worked, > > the touchpad worked but not the button on the touch pad. > > > > On freebsd, _only_ the keyboard works. > > This is not the same problem, but I also have it as well. I have a usb > keyboard and mouse combo. The keyboard also has extra keys on it for > extra functions. Nothing besides the basic keyboard works out of the > box. I was able to get the mouse and extra keys to work by creating a C > program to read events from /dev/uhid0 and do the appropriate action. > Both the keyboard, basic and extra keys; and the mouse work fine now > that I have this program running. I believe the problem is that the > keyboard I have sends all hid event for everything through the same > interface, just with different hid report numbers and only the hid to > keyboard translator was able to conect to the interface. Other > mouse/keyboard combos may use two interfaces for each and should work > fine. If I get some free time, I might work on fixing freebsd to avoid > this program. I can provide you with the program I wrote, but it would > need to be tweaked for your keyboard. There should be some fine like > /dev/uhid0 that you can cat to test with. It may not be 0, do an ls > /dev/uhid* to list all uhid devices. > > BTW, this program I wrote works for both 5.4 and 6.0, otherwise neither > version will work with my keyboard. I would love to give it a try. Also, as I hinted at, I'm currently using it on linux and everything works, so I can capture stuff like /proc/bus/usb and maybe that will mean something to someone who's familiar with FreeBSD's usb system. > Once someone here asked me to try catting /dev/uhid0 (the only device to > appear in dmesg besides the keyboard) while moving the mouse/touchpad and > pressing mouse/touchpad buttons. The result was no output at all. > > Someone else said that is was because multiple devices needed to use the > same usb receiver and there was an enhancement in 6.0 (I was using 5.4) > that allowed for it. > I have 6.0 now and it made no difference. > > I hope you are hitting the same thing I'm hitting, and that it becomes a > more common problem, and that someone then finally firgures it out so I > can > use my $150 keyboard without having to host a copy of knoppix on on my > freebsd box just so my diskless thin client can pxe boot it. > > What I don't get is, why don't all devices that need to share a single > physical port just make themselves look like hubs? I have a different usb > keyboard that has two usb ports on it (ie a built in 2 port usb hub) and I > can plug a usb mouse into that keyboard, and the keyboard into the pc, and > it all works fine even back on 5.4 . Answering myself... maybe to look like a hub, you effectively need another chip that actually impliments a hub, and maybe you can get the functionality with less hardware by making it all look like one device with a lot of functions. Brian K. White -- brian@aljex.com -- http://www.aljex.com/bkw/ +++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++. filePro BBx Linux SCO FreeBSD #callahans Satriani Filk!