|
From: Krakora, R. V <rob...@de...> - 2007-06-26 20:58:03
|
Stephan: >From kb832430: "Requests on the default control endpoint are limited to 4 KB for compatibility with earlier versions of drivers. The USB specification limits other control transfers to 64 KB. However, there is no specific limitation in the USB driver stack for non-control endpoints. The results of specifying a transfer that is larger than 64 KB on a non-control endpoint are undefined." http://aech.net/Driver/USB%E7%A8%8B%E5%BA%8F%E7%9A%84%E5%8A%A0%E8%BD%BD. doc=20 http://support.microsoft.com/kb/832430=20 http://support.microsoft.com/kb/200977/=20 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. Best Regards, Rob Krakora Software Engineer Delphi Electronics & Safety e-mail: rob...@de...=20 phone: 765-451-8574 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 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 ***************************************************************************= ************* |