Hi. I will just enumerate some errors that i had trying to compile it with mingw:
I am using Codeblocks IDE which comes with mingw.
--- cannot find -lusb
libusb.a doesnt exists (at least not in my instalation) but seams like the problem is solved by removing -lusb
--- bzero is not defined (which should be in string.h)
From here : http://www.opengroup.org/onlinepubs/000 ... bzero.html
The solution is to define this macro.
#define bzero(b,len) (memset((b), '\0', (len)), (void) 0)
Hope it helps someone.
HID_data example has a number of errors in windows
-
- Rank 1
- Posts: 29
- Joined: Mon Oct 13, 2008 7:11 pm
-
- Rank 1
- Posts: 29
- Joined: Mon Oct 13, 2008 7:11 pm
After having compiled command-line tool in windows, it doesnt works.
It just doesnt find the device and i dont know where else to try:
checking HID path "\\?\hid#vid_16c0&pid_05df#6&357e0f0f&0&0000#4d1e55b2-f16f-11
cf-88cb-001111000030}"
opening failed: 5
error finding DataStore: The specified device was not found
But i tryed with libusb-win32 and it does works.
This requires to only install the file libusb-win32-filter-.....exe
And i edited the file hiddata.c replacing
#if defined(WIN32)
with this:
#define LIBUSB
#if !defined(LIBUSB) && defined(WIN32)
This will let me choose if i want or not compile with libusb or the windows API.
Just to learn more, i would like to know what can the problem be with the windows API.
I am using WinXP with the free DDK provided by mingw.
It just doesnt find the device and i dont know where else to try:
checking HID path "\\?\hid#vid_16c0&pid_05df#6&357e0f0f&0&0000#4d1e55b2-f16f-11
cf-88cb-001111000030}"
opening failed: 5
error finding DataStore: The specified device was not found
But i tryed with libusb-win32 and it does works.
This requires to only install the file libusb-win32-filter-.....exe
And i edited the file hiddata.c replacing
#if defined(WIN32)
with this:
#define LIBUSB
#if !defined(LIBUSB) && defined(WIN32)
This will let me choose if i want or not compile with libusb or the windows API.
Just to learn more, i would like to know what can the problem be with the windows API.
I am using WinXP with the free DDK provided by mingw.
-
- Rank 1
- Posts: 29
- Joined: Mon Oct 13, 2008 7:11 pm
Yes it works great with libusb under both OSes.
Im glad that it worked for you, then it is not a code problem. It could be that i have windows xp inside a virtual machine, but all other usb devices and libusb-win32 on the same OS works fine.
Anyway, using libusb was much easier than the instructions listed on his webpage. I have only installed the filter driver and compiled with libusb (commented the windows api part) and it worked perfectly.
Also i dont know if everybody thinks equal, but i find the windows api a total mess. I try to aboid it as much as i can.
Im glad that it worked for you, then it is not a code problem. It could be that i have windows xp inside a virtual machine, but all other usb devices and libusb-win32 on the same OS works fine.
Anyway, using libusb was much easier than the instructions listed on his webpage. I have only installed the filter driver and compiled with libusb (commented the windows api part) and it worked perfectly.
Also i dont know if everybody thinks equal, but i find the windows api a total mess. I try to aboid it as much as i can.