|
From: Xiaofan C. <xia...@gm...> - 2015-02-11 01:37:43
|
On Wed, Feb 11, 2015 at 12:01 AM, Maxime Blais <bla...@gm...> wrote: > Wow thanks for the fast help! > > libwdi's looks like a very nice project, exactly what I needed with the > InnoSetup example. > > I also tried 1.2.6 instead of my old 1.2.4 (provided by Windows Update for > some reason..) and had the same problem claiming interfaces. > So I will use WinUSB like you suggested. > > One thing that cause problem though.. I tested using WinUSB and some other > software can't recognize the stick after that (Ant Agent). Is there an > alternative option, like using a previous verison of libusb? I would like to > be able to use libusb0 drivers since most of my users have this driver > already installed and I don't want to mess with their system/cause problem > to other software. > > #define GARMIN_USB2_VID 0x0fcf > #define GARMIN_USB2_PID 0x1008 > #define GARMIN_OEM_PID 0x1009 Are you using the libusb0.sys as a filter driver so that the other software (which use the vendor driver) can recognize the device as well? In that case, you are out of luck, libusb Windows backend does not work well with libusb0.sys as a device driver, it is even worse with the libusb0.sys as a filter driver. So the only reliable way to use the ANT device with libusb Windows backend is to WinUSB to replace the existing vendor driver. The side effect is that the other software (eg: Garmin Express) will not be able to recognize the device any more since they rely on the original vendor driver for the USB ANT stick. What you can do is to write a driver switcher application using libwdi and let the user switch between vendor driver and the user driver. I believe this can be done using libwdi but I am not an expert of using libwdi. I know Microchip offers a driver switch application to switch between the original Microchip custom driver (to be used with legacy MPLAB IDE) and WinUSB (to be used with new MPLABX IDE). -- Xiaofan |