|
From: Krakora, R. V <rob...@de...> - 2007-06-27 19:16:01
|
Dan: Yes, I see your point. There are a couple of other filter drivers installed on my Windows XP SP2 PC. Could they possibly be causing problems for set_configuration()? I was trying to call set_configuration() originally from my driver and it had no effect. I saw that it was commented out in pnp.c, so I commented it back in, rebuilt the libusb0.sys driver, installed it, rebooted my PC and saw that none of my USB devices were working. When I set "MaximumTransferSize" to 65535 in pnp.c and repeated these steps my USB devices again functioned after the reboot. ??? I believe HDD's Device Monitoring Studio installed a filter driver. Stephan: I was able to get the latest source via SVN. Thanks for adding the composite device support!!! Best Regards, Rob Krakora Software Engineer Delphi Electronics & Safety e-mail: rob...@de... phone: 765-451-8574 -----Original Message----- From: lib...@li... [mailto:lib...@li...] On Behalf Of lib...@li... Sent: Wednesday, June 27, 2007 3:05 PM To: lib...@li... Subject: Libusb-win32-devel Digest, Vol 13, Issue 25 Send Libusb-win32-devel mailing list submissions to lib...@li... To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel or, via email, send a message with subject or body 'help' to lib...@li... You can reach the person managing the list at lib...@li... When replying, please edit your Subject line so it is more specific than "Re: Contents of Libusb-win32-devel digest..." Today's Topics: 1. Re: set_configuration() fixed (Stephan Meyer) (Dan Ellis) 2. Re: Libusb-win32-devel Digest, Vol 13, Issue 22 (Krakora, Robert V) ---------------------------------------------------------------------- Message: 1 Date: Wed, 27 Jun 2007 10:40:53 +0100 From: Dan Ellis <dan...@ne...> Subject: Re: [Libusb-win32-devel] set_configuration() fixed (Stephan Meyer) To: lib...@li... Message-ID: <468...@ne...> Content-Type: text/plain; charset=3DISO-8859-1; format=3Dflowed Krakora, Robert V wrote: > > You had select_configuration() commented out in pnp.c and if I > uncommented it as it was previously coded with 65536 as the maximum > transfer size, then none of my USB devices would function. With 65535 > as the maximum transfer size, my USB devices function properly. USB > devices being the mouse, keyboard, etc...this is on Windows XP SP2 > running on a Dell Precision M65. > It's not necessarily a good idea to call set_configuration automatically in pnp, since it should really be under control of the application, and it can fail if there is insufficient power. The application should choose which configuration to set (and be aware of what to do if there isn't enough power). Also if the device has multiple interfaces, then you really don't want libusb to be setting the configuration since it should already be set. Linux does set the configuration automatically... I don't understand why you are worried about the maximum transfer size setting, from MS website: http://msdn2.microsoft.com/en-us/library/ms790478.aspx In Windows 2000 *USBD_CreateConfigurationRequestEx* <http://msdn2.microsoft.com/en-us/library/ms790505.aspx> initializes *Pipes[i].MaximumTransferSize* to the default maximum transfer size for a single URB read/write request. The client driver can specify a different maximum transfer size in the *Pipes[i].MaximumTransferSize*. The USB stack ignores this value in Windows XP, Windows Server 2003 and later operating system. So according to that it shouldn't make any difference what it's set to on XP. More assertively: http://msdn2.microsoft.com/en-us/library/ms790486.aspx Windows XP, Windows Server 2003 and Later Operating Systems In Windows XP, Windows Server 2003 and later operating system, the *MaximumTransferSize* member of the USBD_PIPE_INFORMATION <http://msdn2.microsoft.com/en-us/library/ms793357.aspx> structure is obsolete. The USB stack ignores the value in *MaximumTransferSize* for both composite and non-composite devices. To regulate the bandwidth used by their devices, client drivers must either change the Alt settings for an interface or restrict the maximum packet size by setting *MaximumPacketSize* to some value less than or equal to the value of of /wMaxPacketSize /defined in device firmware for the current Alt settings. . Dan Ellis. ------------------------------ Message: 2 Date: Wed, 27 Jun 2007 11:37:40 -0400 From: "Krakora, Robert V" <rob...@de...> Subject: Re: [Libusb-win32-devel] Libusb-win32-devel Digest, Vol 13, Issue 22 To: <lib...@li...> Message-ID: =09 <3C7...@US... Auto.net> =09 Content-Type: text/plain; charset=3D"us-ascii" Rob Krakora Software Engineer Delphi Electronics & Safety e-mail: rob...@de... phone: 765-451-8574 -----Original Message----- From: lib...@li... [mailto:lib...@li...] On Behalf Of lib...@li... Sent: Tuesday, June 26, 2007 3:08 PM To: lib...@li... Subject: Libusb-win32-devel Digest, Vol 13, Issue 22 Send Libusb-win32-devel mailing list submissions to lib...@li... To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel or, via email, send a message with subject or body 'help' to lib...@li... You can reach the person managing the list at lib...@li... When replying, please edit your Subject line so it is more specific than "Re: Contents of Libusb-win32-devel digest..." Today's Topics: 1. Re: libusb-win32 SVN version and HID backend (Xiaofan Chen) 2. Re: Progress of Windows Vista support (Filippos Papadopoulos) 3. Re: Progress of Windows Vista support (Stephan Meyer) 4. Re: set_configuration() fixed (Stephan Meyer) 5. Re: libusb-win32 SVN version and HID backend (Stephan Meyer) ---------------------------------------------------------------------- Message: 1 Date: Mon, 25 Jun 2007 19:29:59 -0400 From: "Xiaofan Chen" <xia...@gm...> Subject: Re: [Libusb-win32-devel] libusb-win32 SVN version and HID backend To: lib...@li... Message-ID: <a27...@ma...> Content-Type: text/plain; charset=3DISO-8859-1; format=3Dflowed On 6/25/07, Xiaofan Chen <xia...@gm...> wrote: > On 6/25/07, Stephan Meyer <ste...@we...> wrote: > > > > The current version (0.1.12.1) works without any problems > > on vista-32bit but NOT on vista-64bit. > > Furture versions of the DLL will use vista's built-in winusb.sys > > driver and will therefore work on both platforms. If you're > > interrested in a pre-pre-alpha version then grab the latest sources > > from the SVN and try it out. > > http://libusb-win32.svn.sourceforge.net/viewvc/libusb-win32/trunk/libusb 1/ > > > > Stephan > > > > Nice to see that the new version will have three backend (libusb-win32, > HID and winusb). > > I built the new version with MinGW and it seems to run fine. I have two HID > device attached, a PICkit 2 USB programmer from Microchip and a Microsoft > Baisc Optical Mouse. Using the default system HID driver, I can still run the > test program. Can I assume that the HID backend is kind of working now? > > PICkit 2 does have two configurations, now it only display the first. Is this > normal? > > And if I want to try out a libusb based program ported from Linux, how do I > use the HID backend (without using the device driver)? > > By the way, I am using Windows XP SP2. > If I am using the libusb-win32 device driver, then I have the following results. XFCHEN@APSGSGPXFCHEN /c/Myprog/pickit/pk2-3.00-alpha10 $ ./pk2.exe -on PK2 version 3.00 alpha 10 - 2007/06/10 c:\Myprog\pickit\pk2-3.00-alpha10\pk2.exe -on Locating USB Microchip PICkit2 (vendor 0x04d8/product 0x0033) LIBUSB-DLL - trace: usb_init(): dll version: 1.0.0.0 Found USB PICkit as device 'dev0002' on USB bus /bus0 Communication established. PICkit2 firmware version is 2.2.0 $ ./testlibusb.exe -v Dev #3: Microsoft - Basic Optical Mouse wTotalLength: 34 bNumInterfaces: 1 bConfigurationValue: 1 iConfiguration: 0 bmAttributes: 80h MaxPower: 50 bInterfaceNumber: 0 bAlternateSetting: 0 bNumEndpoints: 1 bInterfaceClass: 3 bInterfaceSubClass: 0 bInterfaceProtocol: 0 iInterface: 0 bEndpointAddress: 81h bmAttributes: 03h wMaxPacketSize: 4 bInterval: 10 bRefresh: 0 bSynchAddress: 0 Dev #2: 4Microchip Technology Inc. - HPICkit 2 Microcontroller Programmer - Serial Number: PIC18F2550 wTotalLength: 41 bNumInterfaces: 1 bConfigurationValue: 1 iConfiguration: 2 bmAttributes: 80h MaxPower: 50 bInterfaceNumber: 0 bAlternateSetting: 0 bNumEndpoints: 2 bInterfaceClass: 3 bInterfaceSubClass: 0 bInterfaceProtocol: 0 iInterface: 0 bEndpointAddress: 81h bmAttributes: 03h wMaxPacketSize: 64 bInterval: 1 bRefresh: 0 bSynchAddress: 0 bEndpointAddress: 01h bmAttributes: 03h wMaxPacketSize: 64 bInterval: 1 bRefresh: 0 bSynchAddress: 0 wTotalLength: 32 bNumInterfaces: 1 bConfigurationValue: 2 iConfiguration: 4 bmAttributes: 80h MaxPower: 50 bInterfaceNumber: 0 bAlternateSetting: 0 bNumEndpoints: 2 bInterfaceClass: 255 bInterfaceSubClass: 0 bInterfaceProtocol: 0 iInterface: 0 bEndpointAddress: 81h bmAttributes: 03h wMaxPacketSize: 64 bInterval: 1 bRefresh: 0 bSynchAddress: 0 bEndpointAddress: 01h bmAttributes: 03h wMaxPacketSize: 64 bInterval: 1 bRefresh: 0 bSynchAddress: 0 Regards, Xiaofan ------------------------------ Message: 2 Date: Tue, 26 Jun 2007 10:23:51 +0300 From: "Filippos Papadopoulos" <psy...@gm...> Subject: Re: [Libusb-win32-devel] Progress of Windows Vista support To: lib...@li... Message-ID: <9f0...@ma...> Content-Type: text/plain; charset=3DUTF-8; format=3Dflowed Well it doesnt work for me. I have Vista Business 32-bit. When i install libusb-win32-filter-bin-0.1.12.1 all the USB devices stop to work. E.g the USB mouse. When i reboot more devices like the sound card dont work because windows cant load its drivers... See also http://sourceforge.net/tracker/index.php?func=3Ddetail&aid= =3D1742798&group_i d=3D78138&atid=3D552265 Thanks. On 6/25/07, Stephan Meyer <ste...@we...> wrote: > > The current version (0.1.12.1) works without any problems > on vista-32bit but NOT on vista-64bit. > Furture versions of the DLL will use vista's built-in winusb.sys > driver and will therefore work on both platforms. If you're > interrested in a pre-pre-alpha version then grab the latest sources > from the SVN and try it out. > http://libusb-win32.svn.sourceforge.net/viewvc/libusb-win32/trunk/libusb 1/ > > Stephan > > > > > > Hi, > > i would like to ask whats the progress of supporting Windows Vista. > > > > Thanks, > > Filip. > > > > ------------------------------------------------------------------------ - > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > _______________________________________________ > > Libusb-win32-devel mailing list > > Lib...@li... > > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel > > > > > ________________________________________________________________________ __ > Erweitern Sie FreeMail zu einem noch leistungsst?rkeren E-Mail-Postfach! > Mehr Infos unter http://produkte.web.de/club/?mc=3D021131 > > > ------------------------------------------------------------------------ - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Libusb-win32-devel mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel > ------------------------------ Message: 3 Date: Tue, 26 Jun 2007 09:27:09 +0200 From: Stephan Meyer <Ste...@ia...> Subject: Re: [Libusb-win32-devel] Progress of Windows Vista support To: lib...@li... Message-ID: =09 <OF8...@re...> Content-Type: text/plain; charset=3D"ISO-8859-1" Use libusb as a normal device driver (.inf file install). It will work then. Stephan > Well it doesnt work for me. I have Vista Business 32-bit. > When i install libusb-win32-filter-bin-0.1.12.1 all the USB devices > stop to work. E.g the USB mouse. When i reboot more devices like the > sound card dont work because windows cant load its drivers... > See also > http://sourceforge.net/tracker/index.php? > func=3Ddetail&aid=3D1742798&group_id=3D78138&atid=3D552265 >=20 >=20 > Thanks. >=20 >=20 > On 6/25/07, Stephan Meyer <ste...@we...> wrote: > > > > The current version (0.1.12.1) works without any problems > > on vista-32bit but NOT on vista-64bit. > > Furture versions of the DLL will use vista's built-in winusb.sys > > driver and will therefore work on both platforms. If you're > > interrested in a pre-pre-alpha version then grab the latest sources > > from the SVN and try it out. > >=20 http://libusb-win32.svn.sourceforge.net/viewvc/libusb-win32/trunk/libusb 1/ > > > > Stephan > > > > > > > > > > Hi, > > > i would like to ask whats the progress of supporting Windows Vista. > > > > > > Thanks, > > > Filip. > > > > > >=20 ------------------------------------------------------------------------ - > > > This SF.net email is sponsored by DB2 Express > > > Download DB2 Express C - the FREE version of DB2 express and take > > > control of your XML. No limits. Just data. Click to get it now. > > > http://sourceforge.net/powerbar/db2/ > > > _______________________________________________ > > > Libusb-win32-devel mailing list > > > Lib...@li... > > > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel > > > > > > > > >=20 ________________________________________________________________________ __ > > Erweitern Sie FreeMail zu einem noch leistungsst?rkeren=20 E-Mail-Postfach! > > Mehr Infos unter http://produkte.web.de/club/?mc=3D021131 > > > > > >=20 ------------------------------------------------------------------------ - > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > _______________________________________________ > > Libusb-win32-devel mailing list > > Lib...@li... > > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel > > >=20 ------------------------------------------------------------------------ - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Libusb-win32-devel mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel >=20 ------------------------------ Message: 4 Date: Tue, 26 Jun 2007 18:40:24 +0200 From: Stephan Meyer <ste...@we...> Subject: Re: [Libusb-win32-devel] set_configuration() fixed To: lib...@li... Message-ID: <206...@we...> Content-Type: text/plain; charset=3Diso-8859-15 Why do you think that a max transfer size of 65536 (0x10000) is wrong?=20 This number must be an integer multiple of common endpoint buffer sizes (8, 64, 512, 1024). If it would be 0x10000 - 1 then transfers >=3D 0x10000 bytes won't work any more. Stephan=20 >=20 >=20 > I fixed set_configuration() which I found to be broken. The > max transfer size on the pipes was being set to 65536 instead of 65535.=20 > Attached is the header file in which I changed a #define from 65536 to 65535.=20 > Also attached is a version of pnp.c with the set_configuration() call > uncommented. Please forgive the formatting on pnp.c. I had to format it with > by code beautifier in order to follow the code. I will be 40 next month and I > am starting to become near-sighted. >=20 >=20 > =20 >=20 >=20 > Best Regards, >=20 >=20 > =20 >=20 >=20 > Rob Krakora >=20 >=20 > Software Engineer >=20 >=20 > Delphi Electronics > & Safety >=20 >=20 > e-mail: rob...@de... >=20 >=20 > phone: 765-451-8574 >=20 >=20 > =20 >=20 > ----------------------------------------------------------------- > ------------------------------------------------------------------------ - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ >=20 > ----------------------------------------------------------------- > _______________________________________________ > Libusb-win32-devel mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel >=20 _____________________________________________________________________ Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! http://smartsurfer.web.de/?mc=3D100071&distributionid=3D000000000066 ------------------------------ Message: 5 Date: Tue, 26 Jun 2007 19:03:53 +0200 From: Stephan Meyer <ste...@we...> Subject: Re: [Libusb-win32-devel] libusb-win32 SVN version and HID backend To: lib...@li... Message-ID: <206...@we...> Content-Type: text/plain; charset=3Diso-8859-15 >=20 > On 6/25/07, Stephan Meyer <ste...@we...> wrote: > > > > The current version (0.1.12.1) works without any problems > > on vista-32bit but NOT on vista-64bit. > > Furture versions of the DLL will use vista's built-in winusb.sys > > driver and will therefore work on both platforms. If you're > > interrested in a pre-pre-alpha version then grab the latest sources > > from the SVN and try it out. > > http://libusb-win32.svn.sourceforge.net/viewvc/libusb-win32/trunk/libusb 1/ > > > > Stephan > > >=20 > Nice to see that the new version will have three backend (libusb-win32, > HID and winusb). >=20 > I built the new version with MinGW and it seems to run fine. I have two HID > device attached, a PICkit 2 USB programmer from Microchip and a Microsoft > Baisc Optical Mouse. Using the default system HID driver, I can still run the > test program. Can I assume that the HID backend is kind of working now? >=20 It's only working partially. The backend is fully coded but has not been tested very much and I don't know if real data transfers actually work. What's still missing are more unit-tests (see tests/src folder) and a test firmware that's 100% compliant with the HID spec (see tests/firmware folder). It would be really nice if someone with good HID expertise would contribute to this backend. > PICkit 2 does have two configurations, now it only display the first. Is this > normal? Yes that's normal. The descriptors you see when using Windows' HID driver are not read from the device (Windows doesn't provide any API for this). These descriptors are instead generated by the HID backend based on the information provided by Windows' HID API. Have a look at the source code and see how it works. The backend assumes that every HID device has only one configuration, one interface, and 1-2 interrupt endpoints. >=20 > And if I want to try out a libusb based program ported from Linux, how do I > use the HID backend (without using the device driver)? You can just use the libusb API as if the HID would be a 'normal' libusb based device.=20 >=20 > By the way, I am using Windows XP SP2. >=20 > XFCHEN@APSGSGPXFCHEN /c/Myprog/libusb-win32/libusb1 > $ ./testlibusb.exe -v > Dev #3: Microchip Technology Inc. - PICkit 2 Microcontroller Programmer > - Serial Number: PIC18F2550 > wTotalLength: 41 > bNumInterfaces: 1 > bConfigurationValue: 1 > iConfiguration: 0 > bmAttributes: 80h > MaxPower: 50 > bInterfaceNumber: 0 > bAlternateSetting: 0 > bNumEndpoints: 2 > bInterfaceClass: 3 > bInterfaceSubClass: 0 > bInterfaceProtocol: 0 > iInterface: 0 > bEndpointAddress: 81h > bmAttributes: 03h > wMaxPacketSize: 64 > bInterval: 10 > bRefresh: 0 > bSynchAddress: 0 > bEndpointAddress: 02h > bmAttributes: 03h > wMaxPacketSize: 64 > bInterval: 10 > bRefresh: 0 > bSynchAddress: 0 > Dev #2: Microsoft - Basic Optical Mouse > wTotalLength: 34 > bNumInterfaces: 1 > bConfigurationValue: 1 > iConfiguration: 0 > bmAttributes: 80h > MaxPower: 50 > bInterfaceNumber: 0 > bAlternateSetting: 0 > bNumEndpoints: 1 > bInterfaceClass: 3 > bInterfaceSubClass: 0 > bInterfaceProtocol: 0 > iInterface: 0 > bEndpointAddress: 81h > bmAttributes: 03h > wMaxPacketSize: 4 > bInterval: 10 > bRefresh: 0 > bSynchAddress: 0 >=20 > XFCHEN@APSGSGPXFCHEN /c/Myprog/pickit/pk2-3.00-alpha10 > $ ./pk2.exe -on >=20 > Fatal error> Could not find PICkit2 programmer-- > you might try lsusb to see if it's actually there. >=20 >=20 > PK2 version 3.00 alpha 10 - 2007/06/10 > c:\Myprog\pickit\pk2-3.00-alpha10\pk2.exe -on >=20 > Locating USB Microchip PICkit2 (vendor 0x04d8/product 0x0033) > found 5 busses >=20 > Regards, > Xiaofan >=20 > ------------------------------------------------------------------------ - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Libusb-win32-devel mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel >=20 _____________________________________________________________________ Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! http://smartsurfer.web.de/?mc=3D100071&distributionid=3D000000000066 ------------------------------ ------------------------------------------------------------------------ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ------------------------------ _______________________________________________ Libusb-win32-devel mailing list Lib...@li... https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel End of Libusb-win32-devel Digest, Vol 13, Issue 22 ************************************************** ************************************************************************ **************** Note: If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you.=20 ************************************************************************ **************** ------------------------------ ------------------------------------------------------------------------ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ------------------------------ _______________________________________________ Libusb-win32-devel mailing list Lib...@li... https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel End of Libusb-win32-devel Digest, Vol 13, Issue 25 ************************************************** ***************************************************************************= ************* Note: If the reader of this message is not the intended recipient, or an= employee or agent responsible for delivering this message to the intended= recipient, you are hereby notified that any dissemination, distribution or= copying of this communication is strictly prohibited. If you have received= this communication in error, please notify us immediately by replying to= the message and deleting it from your computer. Thank you.=20 ***************************************************************************= ************* |