From owner-freebsd-usb@FreeBSD.ORG Wed Jul 1 18:31:44 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 4CB1E1065672 for ; Wed, 1 Jul 2009 18:31:44 +0000 (UTC) (envelope-from bsdfan@nurfuerspam.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 91DFB8FC17 for ; Wed, 1 Jul 2009 18:31:43 +0000 (UTC) (envelope-from bsdfan@nurfuerspam.de) Received: (qmail invoked by alias); 01 Jul 2009 18:31:42 -0000 Received: from dslb-092-073-081-027.pools.arcor-ip.net (EHLO [192.168.1.100]) [92.73.81.27] by mail.gmx.net (mp011) with SMTP; 01 Jul 2009 20:31:42 +0200 X-Authenticated: #931807 X-Provags-ID: V01U2FsdGVkX1/W0BdlRbvWhFqUJPBAgR9B3AuF+3B7QessDw4fpr 2xuAjdgwu5QSid Message-ID: <4A4BAB8D.9000502@nurfuerspam.de> Date: Wed, 01 Jul 2009 20:31:41 +0200 From: Markus Dolze User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Hans Petter Selasky References: <4A4A5D7E.70708@nurfuerspam.de> <4A4A7183.2060700@nurfuerspam.de> <200907010913.08747.hselasky@c2i.net> In-Reply-To: <200907010913.08747.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.57 Cc: freebsd-usb@freebsd.org Subject: Re: Failing controls transfers in VMware 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: Wed, 01 Jul 2009 18:31:44 -0000 Hans Petter Selasky wrote: > On Tuesday 30 June 2009 22:11:47 Markus Dolze wrote: >> Markus Dolze wrote: >>> To repeat run the attached program: >>> >>> 1. Fill in some vendor / product ID of a device detected as ugen >>> device 2. Compile and run the code (devel/libusb must be installed). >>> > > You should use this function when reading strings: > > int usb_get_string_simple(usb_dev_handle * dev, int index, char *buf, > size_t buflen); > Yes, this is more easy, but I crafted the control transfers myself to show that actually the control transfer is failing. Libusb's usb_get_string_simple internally uses to control transfers to read a string. The first one to get a list of supported languages and the second one to actually retrieve the string. I found that the second control transfer always errors out. If I replace the usb_control_msg() in my test program with usb_get_string_simple() I get: root@freebsd7:./test Found AVR-USB device USB_control_msg result: -5 Warning: cannot query manufacturer for device: error sending control message: Input/output error USB_control_msg result: -5 Warning: cannot query product: error sending control message: Input/output error Thanks, Markus