[Libusbx-devel] New to libusbx ... possibly idiot question
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 all installed correctly. I run xdev face:feed (our VID/PID) and all device info gets reported correctly. I then do the following (error checking omitted): libusb_device_handle* handle = libusb_open_device_with_vid_pid(NULL,VID,PID); libusb_set_configuration(handle,1); libusb_claim_interface(handle,0); libusb_bulk_transfer(handle,EP_OUT,(unsigned char*)&usbcb, sizeof(usbcb),&written, 5000); When libusb_open_device is called the console displays this error message: [ 4.425253] [25f0] libusbx: error [cache_config_descriptors] could not access configuration descriptor (dummy) for '\\.\USB#VID_05E3&PID_0608#8&85A6673&0&4' : [31] A device attached to the system is not functioning. Can anyone tell me why? Is this caused during device inspection/inquiry or what? Many thanks Jerry. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel
Re: [Libusbx-devel] New to libusbx ... possibly idiot question
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 for debug/logging/programming. > n my experience Windows isn't so helpful about error messages when > something doesn't work the way it wants. 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. Thx++ Jerry. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel
Re: [Libusbx-devel] New to libusbx ... possibly idiot question
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 for debug/logging/programming. > n my experience Windows isn't so helpful about error messages when > something doesn't work the way it wants. 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. Thx++ Jerry. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel
Re: [Libusbx-devel] New to libusbx ... possibly idiot question
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 not showing up as borked in Windows. I'll ignore it. Thx Jerry -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel
Re: [Libusbx-devel] New to libusbx ... possibly idiot question
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 for a few hours, not yet noticed the ability to set logging levels. BTW if there is anything you'd like checked out that requires custom hardware, let me know. The BF can be set up as a custom bulk or isoch device pretty easily. ATB Jerry -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel
Re: [Libusbx-devel] libusbx, xusb and ST-Link V2
>> 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. > Allow me to be of assistance. Blackfin : installed and running courtesy of Zadig. Jerry. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel
Re: [Libusbx-devel] New to libusbx ... possibly idiot question
Hello Pete, > please be aware that the Windows driver we use at the > moment doesn't support isoch (see "Known Restrictions" for WinUSB at > [1]), Indeed. Why on earth make WinUSB without isoch support. > though we're planning to add drivers that support isoch in the future. Has anyone started working on this? Thx++ Jerry. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel
Re: [Libusbx-devel] New to libusbx ... possibly idiot question
Hello Pete > Sure, and there is an implementation, but the implementation needed > further work before being added into the Windows backend and the > author didn't work with Pete on that. > > My http://git.stuge.se/?p=libusb-stuge.git;a=shortlog;h=libusb0 branch > has two snapshots of the downstream "fork" of libusb which includes > the code for the Windows backend to use the libusb0.sys kernel driver. > > This is not the cleanest code you have seen, otherwise it would of > course be in libusb and thus also libusbx already. YMMV, but it's a > start, and the author does use it in his application. > > For further work it's also a problem that there are so many unrelated > changed in the commits, but well, nothing much to do about that > except to clean it up. I've inserted a commit to remove the unrelated > changes and have pushed that into a libusb0-cleanup branch, this > makes it easier to get an overview of the changes against master, but > forward porting the code of course still remains, and in that process > I think some refactoring is required for the duplicated code. > Sweet. I assume this is going to be OK on x64 (perhaps eventually :). Is there a plan for code signing? -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel
Re: [Libusbx-devel] New to libusbx ... possibly idiot question
Hello Pete > > Note that the code pointed out by Peter is _NOT_ the one that is going > to be used by libusbx. > > The reasons are: > 1. It is too old (more than 2 years) and hasn't been updated at all > 2. It doesn't support libusbK, only libusb0 > 3. The author didn't address some shortcomings and indicated that he > wouldn't support his code > 4. We have had a better (simpler) informal patch, with libusb0 and > libusbK, which is what we plan to use for libusbx. OK. > > The libusb0 and libusbK drivers are signed and work fine on x64. > Yes. Might I ask how this all ties in (if at all) with Zadig? I have been using this to great effect for firmware testing (thanks!). ATB Jerry -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel
Re: [Libusbx-devel] New to libusbx ... possibly idiot question
Hello Tim On 25/05/2012 18:25, Tim Roberts wrote: > > When news of this limitation first came out 5 or 6 years ago, the USB > team at Microsoft sent out a blast saying "We will add this if you have > a legitimate use case for it. Let us know." No one has let them know, > or at least no one that matters. > Err. No. There absolutely was and still is a perfect use case: any low latency audio pipeline. Hence ASIO. Incidentally we've done this one to death in both NTDev and WDM. ATB Jerry. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel
Re: [Libusbx-devel] device instance string
Hello Sandor On 29/05/2012 13:35, Sandor Otvos wrote: > Hi > Someone can advise a beginner like me... > How can i obtain device instance string > ( \\.\USB#VID_413C&PID_8158#7&1C3A6C5&0&2 ) with libusb ? > I tried xusb, and libusbx can print it, if some problem occured. So this > string is internally stored. > To clarify, you are using multiple devices with the same VID/PID? -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel
[Libusbx-devel] libusbx and Zadig?
Quick question: Assuming I need a user-mode interface to a custom USB Bulk class device: 1. Can I use Zadig to install a WinUSB driver for the VID/PID? 2. If Zadig installs the driver correctly, can I then simply open the device using the libusbx version of libusb-1.0.dll? 3. If no to 1. what package does the team recommend for the kernel driver installation? Apologies but the profusion of libusb varieties and their inter-dependencies is getting a little confusing. Thanks. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel
Re: [Libusbx-devel] libusbx and Zadig ...?
Hello Pete, On 13/06/2012 10:38, Pete Batard wrote: > > Absolutely. This is what Zadig was designed for. > Does Zadig have its own list? Wondering about Zadig .INF files and Nullsoft/Inno style installers. >> 2. If Zadig installs the driver correctly, can I then simply open the >> device using the libusbx version of libusb-1.0.dll? > > Yes. As long as your target device uses WinUSB for its driver on > Windows, libusbx should be able to access it. Working exactly as desired. Splendid. Thanks to all. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel
[Libusbx-devel] Handles for Windows WaitForXXX API?
My USB handler thread(s) listen on other synchronization handles for clean shutdown etc. Once I have opened a device using LibUsbX, is there a synchronization handle I can pend on whilst waiting for the peripheral device to write back to the host? i.e. // open device etc. libusb_open_device_with_vid_pid(NULL,m_args.VID,m_args.PID); while (!done) { DWORD dw = WaitForMultipleObjects(handles.size(),&handles[0],FALSE,10); // data waiting to be read from device if (dw == WAIT_OBJECT_0 + 0) { // do the read ... result = libusb_bulk_transfer(m_pDevice,m_epIn,...); } // } Many thanks, Jerry. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel
Re: [Libusbx-devel] Handles for Windows WaitForXXX API?
Peter, On 09/08/2012 02:53, Peter Stuge wrote: > g...@novadsp.com wrote: > > Another point is that the code is absolutely unportable, which kindof > misses one big point of using the portable libusb-1.0 API. Indeed. Not an issue here. > No good since there can be no data from device until you initiate a > transfer. ? err, no. My device might well start to write back down the pipe as soon as it has been configured. Jerry -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel
Re: [Libusbx-devel] Handles for Windows WaitForXXX API?
Hello Pete On 09/08/2012 15:33, Peter Stuge wrote: >> >> ? err, no. My device might well start to write back down the pipe as >> soon as it has been configured. > > That would be a violation of the USB protocol. > My bad. Sloppy phrasing. Configured as in 'told what to do'. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel
[Libusbx-devel] DFU - dual mode devices without composite support
Blackfin based firmware gets closer to release. I'm out of time to add composite device support to the ADI driver stack, so by default it is a mass storage device. Now, it would be really cool to be able to persuade the gadget to disconnect, reconfigure and reconnect with a different PID, i.e. HID test mode or somesuch. I have a vague recollection that this is close to DFU - but don't get how you persuade the in-box (Windows) class driver to unload itself. I had considered the notion of always starting enumeration with the test mode VID/PID first, then restarting with an MSD configuration if SET_CONFIGURATION was not received in a timely manner - worried that this is a) hackish, unprofessional and a quicksand b) may spook Windows users with 'Device failed to install' type error messages. All I really need to do is send a few bytes of configuration data over the control endpoint but can see no way of doing that with the Windows stack in the way .. Does anyone have any clever ideas they would like to share? Thx++ Jerry. -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev ___ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel
Re: [Libusbx-devel] DFU - dual mode devices without composite support
Peter On 12/10/2012 18:38, Peter Stuge wrote: > g...@novadsp.com wrote: >> All I really need to do is send a few bytes of configuration data over >> the control endpoint but can see no way of doing that with the Windows >> stack in the way .. > > Use bDeviceClass 0xff (vendor specific) and install the winusb kernel > driver using libwdi in any part of your software. Then the libusb-1.0 > API can very easily do type vendor recipient device control requests. > > Or if you only care about Windows then why not use HID. It's quite > popular. You would then use HIDAPI, and not use the libusb-1.0 API > at all. > > I guess you already know everything that is documented here: > > https://libusb.org/wiki/FAQ#CanIcreateadriverlessdeviceusingHIDclass > > > //Peter > Extremely helpful. I will experiment. Jag tackar. -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev ___ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel
Re: [Libusbx-devel] DFU - dual mode devices without composite support
Hello Pete On 12/10/2012 20:00, Pete Batard wrote: > On 2012.10.12 18:59, g...@novadsp.com wrote: >> On 12/10/2012 18:38, Peter Stuge wrote: >>> https://libusb.org/wiki/FAQ#CanIcreateadriverlessdeviceusingHIDclass > > The *proper* link is: > https://github.com/libusbx/libusbx/wiki/FAQ#wiki-What_about_USB_HID_device_support > > Peter, you have been warned once about posting to the libusb FAQ on the > libusbx mailing list when you should point to the libusbx one, as it > provides different information. > > For instance, unlike libusb, libusbx does provide support for HID > devices on Windows, which, if a developer chooses so, removes the need > to use another 3rd party library. > > I'm also wondering if using the libusb-win32 filter driver, on top of > the Mass Storage driver could also be a solution (with a note that > libusb-win32 support is still not feature complete in libusbx, > especially with regards to the filter driver). > > Regards, > > /Pete > OK - the link provided by the OP also has an invalid SSL cert ... I am afraid I don't understand the driver topology here. The 'test' mode is obviously not for consumer desktop release but if anyone has a working example/documentation I would be most grateful. Thx++. -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev ___ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel
Re: [Libusbx-devel] DFU - dual mode devices without composite support
Hello Xiaofan On 13/10/2012 11:33, Xiaofan Chen wrote: > It may not be as difficult as you think to make your firmware a > USB composite device. In you case, you need to add a second > interface (say Interface 1) without any endpoint associated > (basically just using the control endpoint). > > In this case, you can use winusb/libusbx with this Interface 1 > and USB Mass Storage with Interface 0. In that case, you > use interface 1 for your intended configuration data communication > through the control endpoint. > > Reference: > http://www.osronline.com/showthread.cfm?link=191818 > > What you need to change in your firmware are like the following. > 1) descriptor change to add Interface 1 > 2) in your firmware sections which deals with set-interface standard > request, you need to take care of both interface 0 and 1. > 3) For the vendor specific request (through control transfer), you > can deal it just like there is no interface 1. > > This is not a full-blown composite device framework but you > do not need that anyway. > > Ah - now that sounds very promising. What I still do not get is how the WinUSB driver co-exists with the in-box mass storage stack? Can you load the WinUSB driver for the same VID/PID but use the 2nd interface while mass storage is loaded too? -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev ___ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel
Re: [Libusbx-devel] DFU - dual mode devices without composite support
Hello Xiaofan On 15/10/2012 10:15, Xiaofan Chen wrote: >> >> Ah - now that sounds very promising. What I still do not get is how the >> WinUSB driver co-exists with the in-box mass storage stack? Can you load the >> WinUSB driver for the same VID/PID but use the 2nd interface while mass >> storage is loaded too? > > Yes. The USB Composite Generic Parent driver will load usb mass storage > driver for interface 0 and the winusb driver for the interfac 1. > http://msdn.microsoft.com/en-us/library/windows/hardware/ff537109(v=vs.85).aspx > Superb help. _Many_ thanks. I will report back when I have modified the Blackfin firmware. -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev ___ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel
Re: [Libusbx-devel] DFU - dual mode devices without composite support
Hello Xiaofan On 15/10/2012 10:15, Xiaofan Chen wrote: > > Yes. The USB Composite Generic Parent driver will load usb mass storage > driver for interface 0 and the winusb driver for the interfac 1. > http://msdn.microsoft.com/en-us/library/windows/hardware/ff537109(v=vs.85).aspx > Fantastic! Thank you. For anyone else trying to do this here is a listing of my device descriptor - ID expunged to protect the innocent. 2 things to bear in mind - 1. if you have used the VID/PID before you will either need to remove existing driver(s) or change the PID else Windows seems to load up the device in its previous configuration 2. Once the device loads you will need to use Zadig or something similar to install the WinUSB driver for Interface #2. - Device Qualifier Descriptor - bLength : 0x12 (18 bytes) bDescriptorType : 0x01 (Device Qualifier Descriptor) bcdUSB : 0x200 (USB Version 2.00) bDeviceClass : 0x00 (defined by the interface descriptors) bDeviceSubClass : 0x00 bDeviceProtocol : 0x00 bMaxPacketSize0 : 0x40 (64 bytes) idVendor : 0x idProduct: 0xA00A bcdDevice: 0x100 iManufacturer: 0x01 Language 0x0409 : "XX XXX, XXX." iProduct : 0x02 Language 0x0409 : " USB Device" iSerialNumber: 0x03 Language 0x0409 : "123456789012" bNumConfigurations : 0x01 -- Configuration Descriptor --- bLength : 0x09 (9 bytes) bDescriptorType : 0x02 (Configuration Descriptor) wTotalLength : 0x0029 (41 bytes) bNumInterfaces : 0x02 bConfigurationValue : 0x01 iConfiguration : 0x00 bmAttributes : 0x80 (Bus Powered) MaxPower : 0x32 (100 mA) Interface Descriptor - bLength : 0x09 (9 bytes) bDescriptorType : 0x04 (Interface Descriptor) bInterfaceNumber : 0x00 bAlternateSetting: 0x00 bNumEndpoints: 0x02 bInterfaceClass : 0x08 (Mass Storage) bInterfaceSubClass : 0x06 (SCSI transparent command set) bInterfaceProtocol : 0x50 (BulkÂOnly Transport) iInterface : 0x00 - Endpoint Descriptor - bLength : 0x07 (7 bytes) bDescriptorType : 0x05 (Endpoint Descriptor) bEndpointAddress : 0x85 (Direction=IN EndpointID=5) bmAttributes : 0x02 (TransferType=Bulk) wMaxPacketSize : 0x200 (max 512 bytes) bInterval: 0x00 (never NAKs) - Endpoint Descriptor - bLength : 0x07 (7 bytes) bDescriptorType : 0x05 (Endpoint Descriptor) bEndpointAddress : 0x06 (Direction=OUT EndpointID=6) bmAttributes : 0x02 (TransferType=Bulk) wMaxPacketSize : 0x200 (max 512 bytes) bInterval: 0x00 (never NAKs) Interface Descriptor - bLength : 0x09 (9 bytes) bDescriptorType : 0x04 (Interface Descriptor) bInterfaceNumber : 0x01 bAlternateSetting: 0x00 bNumEndpoints: 0x00 bInterfaceClass : 0x00 (defined by the interface descriptors) bInterfaceSubClass : 0x00 bInterfaceProtocol : 0x00 iInterface : 0x00 -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev ___ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel
[Libusbx-devel] Selecting a composite device interface?
As suggested by Xiaofan firmware has two interfaces, with the second exposing no data endpoints of its own. Opening the device using libusb_open_device_with_vid_pid and then enumerating the device using libusbx functions gets me the expected: ProductID: 0xA00A Interfaces: 2 Number of alternate settings: 1 Interface Number: 0 Number of endpoints: 2 Descriptor Type: 5 EP Address: 133 Descriptor Type: 5 EP Address: 6 Number of alternate settings: 1 Interface Number: 1 Number of endpoints: 0 What I don't get is how to write to the second interface. Using anything other than an index of 1 for libusb_claim_interface() returns LIBUSB_ERROR_NOT_SUPPORTED. I'm missing something crashingly obvious - can anyone point out what? Thx++ Jerry. -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct ___ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel