| 
      
      
      From: Stephan M. <ste...@we...> - 2006-08-24 17:22:39
       | 
| Have you tried to install/update the driver by using the DLL's=20 (undocumented) usb=5Finstall=5Fdriver=5Fnp function=3F You can call it from the command line through its rundll interface: rundll32 libusb0.dll,usb=5Finstall=5Fdriver=5Fnp=5Frundll your=5Finf=5Ffile.inf Stephan > On 8/22/06, Xiaofan Chen <xia...@gm...> wrote: > > I have a little cute MCU programmer Microchip PICKit 2 and I beta > > tests alternative driving programs using libusb under Linux and Window= s. > > Under Windows I need to use libusb-win32 device driver. > > > > It runs fine for my home desktop under Windows XP professional > > SP2 in Singapore (along with various versions of Linux). For more > > detail, please refer to the following posts. > > http://forum.microchip.com/tm.aspx=3Fm=3D110205 > > > > Now I am under training in USA and I only has access to the corporate > > desktop running Windows XP SP2. I have one problem now. > > > > Normally PICkit 2 will appear under device manager as two > > device: "HID-compliant device" and "USB Human Interface Device". > > > > And it did appear as two device initially and I could also use the > > Microchip provided Windows program (using native Windows > > HID driver) to run it. > > > > Then I was trying to "update" the native HID driver to the device driv= er > > generated by libusb-win32 (1stly the 20060518 version and then > > the 0.1.10.1 version). Somehow it failed. This was working for my > > desktop at home. > > > > And then I have a major problem now: PICkit 2 only > > appears as a "HID-compliant device" inside device manager > > instead of both "HID-compliant device" and "USB Human Interface > > Device". The Microchip PC application still works. But I am not > > able to test the libusb based application since I am not able to > > install the libusb-win32 device driver. > > > > I know I can not use the filter driver due to the fact that this > > PICkit 2 has dual configurations (HID and custom). We had > > a discussion on this last year when I was trying to port the > > libusb based Linux application to Windows with libusb-win32. > > > > This is kind of stranger. Is there a reason why an HID device > > only has one entry in the device manager=3F > > > > Sorry for the long email. > > >=20 > Note I could only "update" the driver using the entry > "USB Human Interface Device" but not the entry > ""HID-compliant device" before. >=20 > As described in my Microchip Forum post, the procedure > to switch the driver to libusb-win32 device driver is the following. >=20 > ***************************** > Step 1: Go to Device Manager, verify that under > Human Interface Devices there are two PICkit 2 related device (HID-compi= lant > device and USB Human Interface Device). You know that through the detail= s > tab (Device Instance Id: VID=5F04D8&PID=5F0033\xxx). >=20 > Step 2: Right click "USB Human Interface Device" and select "Update Driv= er..." > Choose No to the Windows update question and click Next. > Choose "Install from a list of specific location Advanced" and click Nex= t. > Choose "Don't search. I will choose the driver to install" and choose Ne= xt. > Choose "Have Disk" and browse to the device driver directory > "C:\Program Files\libusb-win32-device-bin-0.1.10.1\bin" > and select pickit2.inf. Pickit2 should be in the Model text box. > Ignore the warning "This driver is not digitally signed". (MS will most = likely > not sign an LGPL/GPLed driver). Select Pickit 2 and click Next. >=20 > Windows will install the driver. >=20 > ******************************** >=20 > Regards, > Xiaofan >=20 > ------------------------------------------------------------------------= - > Using Tomcat but need to do more=3F Need to support web services, security= =3F > Get stuff done quickly with pre-integrated technology to make your job e= asier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geroni= mo > http://sel.as-us.falkag.net/sel=3Fcmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D121642= > =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F > Libusb-win32-devel mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= Erweitern Sie FreeMail zu einem noch leistungsst=E4rkeren E-Mail-Postfach! =09 Mehr Infos unter http://freemail.web.de/home/landingpad/=3Fmc=3D021131 | 
| 
      
      
      From: Stephan M. <ste...@we...> - 2006-08-27 13:37:07
       | 
| > Stephan Meyer wrote: > > Have you tried to install/update the driver by using the DLL's > > (undocumented) usb=5Finstall=5Fdriver=5Fnp function=3F >=20 > FWIW, this technique works fairly well for my HID devices. The only=20 > problem I've noticed is that if I install the driver, then unplug the=20 > device and plug in a different USB device (but one that still matches my= =20 > vendor/product spec) libusb does not get assigned to it. Instead the=20 > default MS driver is assigned until I either run usb=5Finstall=5Fdriver=5Fnp=20 > again or manually "update driver" via the DeviceManager GUI. I'm curious= =20 > why libusb does not get bound to all subsequent devices that match the=20 > spec. >=20 > --Adam >=20 This might be caused by the fact that Windows' HID driver is signed. Try this: rundll32 libusb0.dll,usb=5Ftouch=5Finf=5Ffile=5Fnp=5Frundll c:\windows\inf\input.inf= rundll32 libusb0.dll,usb=5Finstall=5Fdriver=5Fnp=5Frundll your=5Finf=5Ffile.inf Stephan >=20 > ------------------------------------------------------------------------= - > Using Tomcat but need to do more=3F Need to support web services, security= =3F > Get stuff done quickly with pre-integrated technology to make your job e= asier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geroni= mo > http://sel.as-us.falkag.net/sel=3Fcmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D121642= > =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F > Libusb-win32-devel mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F Viren-Scan f=FCr Ihren PC! Jetzt f=FCr jeden. Sofort, online und kostenlos. Gleich testen! http://www.pc-sicherheit.web.de/freescan/=3Fmc=3D022222 | 
| 
      
      
      From: Adam K. <akr...@ro...> - 2006-08-24 22:00:17
       | 
| Stephan Meyer wrote: > Have you tried to install/update the driver by using the DLL's > (undocumented) usb_install_driver_np function? FWIW, this technique works fairly well for my HID devices. The only problem I've noticed is that if I install the driver, then unplug the device and plug in a different USB device (but one that still matches my vendor/product spec) libusb does not get assigned to it. Instead the default MS driver is assigned until I either run usb_install_driver_np again or manually "update driver" via the DeviceManager GUI. I'm curious why libusb does not get bound to all subsequent devices that match the spec. --Adam | 
| 
      
      
      From: Xiaofan C. <xia...@gm...> - 2006-08-24 23:36:54
       | 
| On 8/24/06, Adam Kropelin <akr...@ro...> wrote: > Stephan Meyer wrote: > > Have you tried to install/update the driver by using the DLL's > > (undocumented) usb_install_driver_np function? > > FWIW, this technique works fairly well for my HID devices. The only > problem I've noticed is that if I install the driver, then unplug the > device and plug in a different USB device (but one that still matches my > vendor/product spec) libusb does not get assigned to it. Instead the > default MS driver is assigned until I either run usb_install_driver_np > again or manually "update driver" via the DeviceManager GUI. I'm curious > why libusb does not get bound to all subsequent devices that match the > spec. > For PICkit 2, it works without a problem. If I unplug and plug in the same device, libusb-win32 device driver is still assigned to the device driver. If I unplug a PICkit 2 and plug in another PICkit 2, libusb-win32 device driver is still assigned. PICkit 2 device does not have unique serial number since it is not common for a user to have 2 PICkit 2 programmer. Your device might have different serail number assigned to them and this might be the reason. I am not sure though. And even better, after I "update" the libusb-win32 device driver to HID driver, PICKit 2 now appears as a normal HID device: 2 entries under "Human Interface Device" -- "HID-compliant device" and "USB Human Interface Device". This is great! I just wonder why Windows only list PICkit 2 as an "HID-compliant device" last time? That is strange. Regards, Xiaofan | 
| 
      
      
      From: Adam K. <akr...@ro...> - 2006-08-24 23:43:48
       | 
| Xiaofan Chen wrote: > On 8/24/06, Adam Kropelin <akr...@ro...> wrote: >> Stephan Meyer wrote: >>> Have you tried to install/update the driver by using the DLL's >>> (undocumented) usb_install_driver_np function? >> >> FWIW, this technique works fairly well for my HID devices. The only >> problem I've noticed is that if I install the driver, then unplug the >> device and plug in a different USB device (but one that still >> matches my vendor/product spec) libusb does not get assigned to it. >> Instead the default MS driver is assigned until I either run >> usb_install_driver_np again or manually "update driver" via the >> DeviceManager GUI. I'm curious why libusb does not get bound to all >> subsequent devices that match the spec. > > For PICkit 2, it works without a problem. If I unplug and plug > in the same device, libusb-win32 device driver is still assigned > to the device driver. If I unplug a PICkit 2 and plug in another > PICkit 2, libusb-win32 device driver is still assigned. > > PICkit 2 device does not have unique serial number since > it is not common for a user to have 2 PICkit 2 programmer. > > Your device might have different serail number assigned to > them and this might be the reason. I am not sure though. Yup, I have different serial numbers and I suspect you are right that is the reason for the behavior I am seeing. But I really know nothing about driver matching on Windows, so it's just a guess. --Adam | 
| 
      
      
      From: Xiaofan C. <xia...@gm...> - 2006-08-24 23:26:44
       | 
| On 8/24/06, Stephan Meyer <ste...@we...> wrote: > > Have you tried to install/update the driver by using the DLL's > (undocumented) usb_install_driver_np function? > > You can call it from the command line through its rundll interface: > > rundll32 libusb0.dll,usb_install_driver_np_rundll your_inf_file.inf > > > Stephan > Wow, it works! Now the libusb-win32 program can talk to PICkit 2 again. Thanks a lot! Maybe it is a good idea to document this in the libusb-win32 distribution. C:\Myprog\pickit\pk2-2.02-beta1>pk2 -device PK2 version 2.02 beta 1 - 2006/08/21 pk2 -device Locating USB Microchip PICkit2 (vendor 0x04d8/product 0x0033) found 5 busses Found USB PICkit as device '\\.\libusb0-0000--0x04d8-0x0033' on USB bus bus-0 Communication established. PICkit2 firmware version is 1.21.0 Device ID 0x1060 PIC16F628A Rev 4 found Family: Midrange Program size: 0x800 (2048) words, width 0x3fff Eeprom size: 0x80 (128) bytes ID location: 0x0 ID size: 0x4 (4) bytes Device ID 0x1060 Write burst 1 Program command P Program mode 1 Program timing N Data timing D Erase mode 0 CP mask 0x2100 Bandgap mask 0x0000 0x0000 Config mask 0x21ff Save osccal 0 Save bandgap 0 Command table 63 00 02 03 04 05 06 08 18 0a 09 0b ff ff ff ff Regards, Xiaofan |