From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 8 23:47:54 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 59CF016A4CE for ; Fri, 8 Apr 2005 23:47:54 +0000 (GMT) Received: from mailgate1b.savvis.net (mailgate1b.savvis.net [216.91.182.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id D39C743D39 for ; Fri, 8 Apr 2005 23:47:53 +0000 (GMT) (envelope-from Maksim.Yevmenkin@savvis.net) Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgate1b.savvis.net (Postfix) with ESMTP id 38F6F3C140; Fri, 8 Apr 2005 18:47:53 -0500 (CDT) Received: from mailgate1b.savvis.net ([127.0.0.1]) by localhost (mailgate1b.savvis.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 29762-01-85; Fri, 8 Apr 2005 18:47:53 -0500 (CDT) Received: from out002.email.savvis.net (out002.apptix.savvis.net [216.91.32.45]) by mailgate1b.savvis.net (Postfix) with ESMTP id 0E7E93BEBB; Fri, 8 Apr 2005 18:47:53 -0500 (CDT) Received: from s228130hz1ew171.apptix-01.savvis.net ([10.146.4.29]) by out002.email.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Fri, 8 Apr 2005 18:47:50 -0500 Received: from [10.254.186.111] ([66.35.239.94]) by s228130hz1ew171.apptix-01.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Fri, 8 Apr 2005 18:47:44 -0500 Message-ID: <4257181F.1040904@savvis.net> Date: Fri, 08 Apr 2005 16:47:43 -0700 From: Maksim Yevmenkin User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20040822 X-Accept-Language: en-us, en MIME-Version: 1.0 To: ticso@cicely.de References: <16982.46075.115518.130213@canoe.dclg.ca> <4256B5EB.9080506@savvis.net> <16982.47024.135663.645297@canoe.dclg.ca> <20050408190514.GS96690@cicely12.cicely.de> <16983.465.572693.73195@canoe.dclg.ca> <20050408233301.GW96690@cicely12.cicely.de> In-Reply-To: <20050408233301.GW96690@cicely12.cicely.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 08 Apr 2005 23:47:45.0108 (UTC) FILETIME=[5C966140:01C53C95] X-Virus-Scanned: amavisd-new at savvis.net cc: freebsd-hackers@freebsd.org cc: David Gilbert Subject: Re: Tricky USB device. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Apr 2005 23:47:54 -0000 Bernd Walter wrote: > On Fri, Apr 08, 2005 at 06:12:33PM -0400, David Gilbert wrote: > >> Bernd> Has this device multiple interfaces? e.g. one HID and >> another Bernd> as described. I often thought about getting ugen >> working at Bernd> interface level too. >> >> Here's the output of udesc_dump on it. Right now, using the >> current version of libusb (not the version from ports), I can use >> usb_interrupt_write(dev, 1, "MK255", 5, 0) to send data to it --- >> and the data is sent --- at least lights on the USB hub flash. If >> I replace '1' with anything else, it doesn't accept it. However, >> it doesn't seem to have opened the relays. > > Yes - you must use 1 - there is only one out-endpoint. 0x81 is for > receiving data and endpoint 0 is the mandandory control endpoint. > Interrupt Endpoints are not variable in size. Both interrupt > endpoints are 8 Bytes, so you must read and write exact 8 Bytes per > transfer - 5 shouldn't work for USB compliant devices. hmmm... i was always confused about bMaxPacketSize. i was thinking that it limits the size of one usb transaction, and it could take several usb transactions to transfer one data packet. for example i have a bluetooth usb dongle that has Standard Endpoint Descriptor: bLength 7 bDescriptorType 05 bEndpointAddress 81 (in) bmAttributes 03 (Interruput) wMaxPacketSize 16 bInterval 1 and i certanly can receive data packets from this endpoint that are more (and less) then 16 bytes in size. so, i would guess (and i might be wrong) that it is ok to send/receive data packets that are not equal to bMaxPacketSize in size. max