Re: [Libusbx-devel] Proposed topology API and USB Location ID

2012-05-22 Thread Yves Arrouye
Thanks for your long response, Peter. > > It would be great if libusbx offered a uint32_t > > get_usb_location_id(libusb_device *dev) [...] > > Well, unless we use the hash, which is something we could factorize as a > common unique device ID across all backends (and which we may very well > have

Re: [Libusbx-devel] Proposed topology API and USB Location ID

2012-05-22 Thread Yves Arrouye
The identification is a topological identification. So more than an OS-specific value, I would call it a setup-specific value (as in: if I add a hub between my computer and my device, the location ID will change, just like the device path would). The value I see in using the platform's location ID

Re: [Libusbx-devel] Proposed topology API and USB Location ID

2012-05-22 Thread Pete Batard
Hi Yves, On 2012.05.22 19:06, Yves Arrouye wrote: > I stumbled upon libusbx when researching whether libusb would support > exposing the concept of a USB Location ID (which I am not sure is part > of a standard, but seems to be widely understood as available on > Darwin/OS X and Windows, and may b

Re: [Libusbx-devel] New to libusbx ... possibly idiot question

2012-05-22 Thread Pete Batard
Fix to reduce the severity of the log message above has now been pushed to git. Regards, /Pete -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has

Re: [Libusbx-devel] Proposed topology API and USB Location ID

2012-05-22 Thread Peter Stuge
Hi Yves, Yves Arrouye wrote: > It seems to me that location ID is worth being part of the topology > information, and offers a reliable way to identify a device on both > the libusbx side of things and the native OS side too. What about the portability of the information? I mean: with platform-sp

Re: [Libusbx-devel] libusbx, xusb and ST-Link V2

2012-05-22 Thread g...@novadsp.com
>> However, if Windows always considers a device with 0:0 in the device >> descriptor an error, then the Windows backend should discard them. > > I don't think the Windows USB stack does any such thing, although if I > were a real man I would have burned a device with / to test this. > Al

[Libusbx-devel] Proposed topology API and USB Location ID

2012-05-22 Thread Yves Arrouye
Hi, I stumbled upon libusbx when researching whether libusb would support exposing the concept of a USB Location ID (which I am not sure is part of a standard, but seems to be widely understood as available on Darwin/OS X and Windows, and may be available or constructed on Linux). It seems that th

Re: [Libusbx-devel] libusbx, xusb and ST-Link V2

2012-05-22 Thread Tim Roberts
Peter Stuge wrote: > Xiaofan Chen wrote: >> I think the warning message is a bit miss-leading. If libusbx found >> /, then it should probably warn against unrecognized device. > If Windows says that there is a 0:0 device when there is actually an > error, and if this case is indistinguishab

Re: [Libusbx-devel] New to libusbx ... possibly idiot question

2012-05-22 Thread Pete Batard
On 2012.05.22 16:36, g...@novadsp.com wrote: > Thanks, your call. I've only been using the library for a few hours, not > yet noticed the ability to set logging levels. Yes, basically all of the messages generated by libusbx (if logging is enabled) are tagged with a severity, and when calling on

Re: [Libusbx-devel] New to libusbx ... possibly idiot question

2012-05-22 Thread g...@novadsp.com
Hello Pete On 22/05/2012 16:21, Pete Batard wrote: > > Unless there are objections, I'll produce a patch to do just that. > Currently, I think I'll go with info, but if anyone has a strong > preference for another severity level, let me know. > Thanks, your call. I've only been using the library

Re: [Libusbx-devel] New to libusbx ... possibly idiot question

2012-05-22 Thread Pete Batard
On 2012.05.22 15:25, g...@novadsp.com wrote: >> That seems to be a USB hub. Is it? >> http://www.ixitools.com/hwcat/_b8139c20-cf94-11d5-aef7-0002b30625c5_vid_05e3_pid_0608/devinfo19476.html > > Good call. It is a hub but it is not showing up as borked in Windows. > I'll ignore it. We've been seein

Re: [Libusbx-devel] New to libusbx ... possibly idiot question

2012-05-22 Thread g...@novadsp.com
Hello Xioafan On 22/05/2012 15:15, Xiaofan Chen wrote: > On Tue, May 22, 2012 at 9:52 PM, g...@novadsp.com wrote: > > That seems to be a USB hub. Is it? > http://www.ixitools.com/hwcat/_b8139c20-cf94-11d5-aef7-0002b30625c5_vid_05e3_pid_0608/devinfo19476.html > Good call. It is a hub but it is no

Re: [Libusbx-devel] New to libusbx ... possibly idiot question

2012-05-22 Thread Xiaofan Chen
On Tue, May 22, 2012 at 9:52 PM, g...@novadsp.com wrote: > Agreed. However the complaint is not about my device - the VID/PID is > for something else. What I'm trying to establish is which slice in the > stack is sending the warning. In that case, that is just a warning about another device and

Re: [Libusbx-devel] New to libusbx ... possibly idiot question

2012-05-22 Thread g...@novadsp.com
Hello Pete. >> Fun! Did you already verify the USB part of the firmware, or is this >> part of what you are doing right now? Err. Yes :) Blackfin not my favourite for this kind of gig! USB firmware all good. I want to use libusbx for the bulk pipe in what will be a composite device. Essentially

Re: [Libusbx-devel] New to libusbx ... possibly idiot question

2012-05-22 Thread g...@novadsp.com
Hello Pete. >> Fun! Did you already verify the USB part of the firmware, or is this >> part of what you are doing right now? Err. Yes :) Blackfin not my favourite for this kind of gig! USB firmware all good. I want to use libusbx for the bulk pipe in what will be a composite device. Essentially

Re: [Libusbx-devel] New to libusbx ... possibly idiot question

2012-05-22 Thread Peter Stuge
g...@novadsp.com wrote: > I've got a custom USB bulk device (Blackfin based with my own firmware > for what it's worth). Fun! Did you already verify the USB part of the firmware, or is this part of what you are doing right now? > I run xdev face:feed (our VID/PID) and all device info gets repor

[Libusbx-devel] New to libusbx ... possibly idiot question

2012-05-22 Thread g...@novadsp.com
First item of business: Thanks. Looks great. UI've got a custom USB bulk device (Blackfin based with my own firmware for what it's worth). Used Zadig to install WinUSB drivers on W7x64. The DDK USBView shows the device connected with EP In 0x85 and EP Out 0x06. Device Manager confirms drivers a

Re: [Libusbx-devel] Windows: reinstate HID support

2012-05-22 Thread Pete Batard
On 2012.05.19 14:54, Xiaofan Chen wrote: >>> The other test I want to do is to see if I can use this works well >>> as the backend for HIDAPI or not. > > This turns out to be not as easy as I expected so I will not carry > out this test. That's fine with me. I'm still trying to find time to dig up

Re: [Libusbx-devel] libusbx, xusb and ST-Link V2

2012-05-22 Thread Pete Batard
On 2012.05.22 10:14, Xiaofan Chen wrote: >> However, if Windows always considers a device with 0:0 in the device >> descriptor an error, then the Windows backend should discard them. > > I believe that Windows always considers a device with 0:0 in the device > descriptor as an error. Yup. And the

Re: [Libusbx-devel] libusbx, xusb and ST-Link V2

2012-05-22 Thread Xiaofan Chen
On Tue, May 22, 2012 at 5:11 PM, Peter Stuge wrote: > Xiaofan Chen wrote: >> I think the warning message is a bit miss-leading. If libusbx found >> /, then it should probably warn against unrecognized device. > > If Windows says that there is a 0:0 device when there is actually an > error,

Re: [Libusbx-devel] libusbx, xusb and ST-Link V2

2012-05-22 Thread Peter Stuge
Xiaofan Chen wrote: > I think the warning message is a bit miss-leading. If libusbx found > /, then it should probably warn against unrecognized device. If Windows says that there is a 0:0 device when there is actually an error, and if this case is indistinguishable from an OK device with