Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Feb 2018 21:02:36 +0100
From:      Hans Petter Selasky <hps@selasky.org>
To:        =?UTF-8?Q?Romain_Tarti=c3=a8re?= <romain@blogreen.org>
Cc:        usb@freebsd.org
Subject:   Re: Feedback for portable libusb code
Message-ID:  <c89da035-f6ae-11a7-e64b-dc1b69ba938d@selasky.org>
In-Reply-To: <20180205153559.GA19249@blogreen.org>
References:  <20180129184445.GB7783@blogreen.org> <9128056d-c916-597e-f866-48cf6051ee0e@selasky.org> <20180205153559.GA19249@blogreen.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 02/05/18 16:35, Romain Tartière wrote:
> Hi!
> 
> On Mon, Jan 29, 2018 at 08:10:06PM +0100, Hans Petter Selasky wrote:
>> Does the attached patch for FreeBSD's libusb solve your issue?
> 
> I have just patched, build and installed libusb.  I removed the
> libusb_open() / libusb_close() calls from usb_get_port_path() in
> libsigrok and tested.
> https://github.com/sigrokproject/libsigrok/blob/a9010323ddf4e479663e871386c05db05ea3522e/src/usb.c#L473-L491
> 
> 
> Unfortunately, the problem is still present.  On the first enumeration,
> libusb_get_port_numbers() returns 3 and the firmware is send to the
> device successfully.  Then, when lbsigrok attempt to re-enumerate
> devices, libusb_get_port_numbers() returns -12
> (LIBUSB_ERROR_NOT_SUPPORTED).
> 
> 
> 
> I am sure that the firmware is sent successfully because usbconfig(8)
> shows the following when I plug the device:
> | ugen0.10: <vendor 0x04b4 product 0x8613> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (100mA)
> and after the enumeration failure, I can see this instead:
> | ugen0.10: <sigrok fx2lafw> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (100mA)
> 

Can you run "ldd" on your binaries to see they really are using the 
libusb you installed?

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c89da035-f6ae-11a7-e64b-dc1b69ba938d>