|
From: Stephan M. <ste...@we...> - 2007-06-26 17:09:10
|
> > 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/libusb1/ > > > > 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? > 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. > > 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. > > By the way, I am using Windows XP SP2. > > 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 > > XFCHEN@APSGSGPXFCHEN /c/Myprog/pickit/pk2-3.00-alpha10 > $ ./pk2.exe -on > > Fatal error> Could not find PICkit2 programmer-- > you might try lsusb to see if it's actually there. > > > 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) > found 5 busses > > Regards, > Xiaofan > > ------------------------------------------------------------------------- > 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 > _____________________________________________________________________ Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! http://smartsurfer.web.de/?mc=100071&distributionid=000000000066 |
|
From: Xiaofan C. <xia...@gm...> - 2007-06-26 21:18:58
|
On 6/26/07, Stephan Meyer <ste...@we...> wrote: > > 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. > Somehow this does not work yet. It fails to find PICKit 2 with this approach. If I "update" the HID driver to the libusb-win32 device driver, then it works. XFCHEN@APSGSGPXFCHEN /c/Myprog/pickit/pk2-3.00-alpha10 $ ./pk2.exe -on PK2 version 3.00 alpha 10 - 2007/06/10 Fatal error> Could not find PICkit2 programmer-- you might try lsusb to see if it's actually there. If I am using the libusb-win32 device driver, then it seems to work. XFCHEN@APSGSGPXFCHEN /c/Myprog/pickit/pk2-3.00-alpha10 $ ./pk2.exe -on PK2 version 3.00 alpha 10 - 2007/06/10 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 |
|
From: Xiaofan C. <xia...@gm...> - 2007-07-21 21:20:50
|
On 6/26/07, Stephan Meyer <ste...@we...> wrote:
> >
> > 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?
> >
>
> 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.
>
It fails for interrupt transfer write.
C:\Myprog\pickit\pk2-3.00-alpha10>testpk2hid.exe -v
Found Microchip PICkit 2(TM) as device 'dev0003' on USB bus /bus0
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
C:\Myprog\pickit\pk2-3.00-alpha10>pk2 -on
PK2 version 3.00 alpha 10 - 2007/06/10
pk2 -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 'dev0003' on USB bus /bus0
USB> 76
Fatal error> sendUSB() PICkit USB write failed
Regards,
Xiaofan
|