Direct support for USB HID devices
-
- New User
- Posts: 7
- Joined: Sat Sep 05, 2009 11:08 pm
Direct support for USB HID devices
It would be great if PureBasic offered functions to access USB HID (Human Interface Devices) directly. HID drivers are included with Windows and other operating systems (they are used by mouse and keyboard, for example), but they are non-trivial to use and they are not cross-platform.
So if PureBasic offered a command layer (preferably platform-independent) that made accessing such devices easy, that would really boost the range of possible applications, especially for people who build their own USB devices (which is rather easy with modern microcontrollers such as PIC).
Adding the serial port library to PureBasic was a step in the right direction, but the serial port is being increasingly replaced by USB ...
So if PureBasic offered a command layer (preferably platform-independent) that made accessing such devices easy, that would really boost the range of possible applications, especially for people who build their own USB devices (which is rather easy with modern microcontrollers such as PIC).
Adding the serial port library to PureBasic was a step in the right direction, but the serial port is being increasingly replaced by USB ...
-
- Enthusiast
- Posts: 469
- Joined: Sun Mar 16, 2008 9:18 am
Re: Direct support for USB HID devices
Did you mean for webcams and stuff? There's examples here on how to access webcams, so maybe that code will point you in the right direction?
-
- New User
- Posts: 7
- Joined: Sat Sep 05, 2009 11:08 pm
I would be surprised if webcams use the HID class, most of them come with their own drivers, I think (correct me if I'm wrong). HID is a generic USB access method that does not require special device drivers, because everything is included with the operating system. But it is not easy to use the HID DLLs (and, of course, tehy are Windows only), so it would be great if PureBasic could encapsulate HID access in a set of easy-to-use commands.
For me it is mainly interesting to use HID for self-built devices based on PIC microcontrollers. I found a way to access them using a third-party library (mcHID.dll), but this is not an elegant solution, and not platform-independent.
For me it is mainly interesting to use HID for self-built devices based on PIC microcontrollers. I found a way to access them using a third-party library (mcHID.dll), but this is not an elegant solution, and not platform-independent.
- DoubleDutch
- Addict
- Posts: 3219
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
Re: Direct support for USB HID devices
I agree, support for USB HID would be good.
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
Re: Direct support for USB HID devices
I would like USB HID and USB CDC.
http://davehouston.org
Mac Mini (Intel) 10.6.8 - iMac G4 (PPC) 10.4.11
Dell Dimension 2400 W98SE,W2K,XP,Vista,W7,Debian,Ubuntu,Kubuntu,Xubuntu,Fedora,Mandriva,Mint
(on swappable HDDs)
Vizio VTAB1008 - Android 3.1
MK808 miniAndroidPC (Android 4.1)
Mac Mini (Intel) 10.6.8 - iMac G4 (PPC) 10.4.11
Dell Dimension 2400 W98SE,W2K,XP,Vista,W7,Debian,Ubuntu,Kubuntu,Xubuntu,Fedora,Mandriva,Mint
(on swappable HDDs)
Vizio VTAB1008 - Android 3.1
MK808 miniAndroidPC (Android 4.1)
Re: Direct support for USB HID devices
On Windows you can use DirectInput from DirectX or RawInput from Windows APIs.
raw http://msdn.microsoft.com/en-us/library ... 85%29.aspx
direct http://msdn.microsoft.com/en-us/library ... 85%29.aspx
raw http://msdn.microsoft.com/en-us/library ... 85%29.aspx
direct http://msdn.microsoft.com/en-us/library ... 85%29.aspx
-
- Addict
- Posts: 1443
- Joined: Wed Nov 12, 2008 5:01 pm
- Location: Russia
Re: Direct support for USB HID devices
There is a library, PureBasic for WindowsI agree, support for USB HID would be good.
http://www.purebasic.fr/english/viewtop ... 14&t=41729
Re: Direct support for USB HID devices
I've just found this post, so I'll deleted my last request about USB description...
It would be smart to have Unix/Windows/Mac same function's
And as I can see, this post has been viewed a lot of time
It would be smart to have Unix/Windows/Mac same function's
And as I can see, this post has been viewed a lot of time
Re: Direct support for USB HID devices
Is this request completed ? no way to know where it is ? it's 6 years ago...
- RSBasic
- Moderator
- Posts: 1218
- Joined: Thu Dec 31, 2009 11:05 pm
- Location: Gernsbach (Germany)
- Contact:
Re: Direct support for USB HID devices
If a wish is too old, then Fred doesn't look in because it is time consuming to check very old threads.
It makes more sense to recreate the wish later after many years.
+1 for USB HID devices support.
It makes more sense to recreate the wish later after many years.
+1 for USB HID devices support.
-
- Addict
- Posts: 1443
- Joined: Wed Nov 12, 2008 5:01 pm
- Location: Russia
Re: Direct support for USB HID devices
There is a cross-platform library HIDAPI. https://github.com/signal11/hidapi
Perhaps it can be used with PB.
Perhaps it can be used with PB.
Re: Direct support for USB HID devices
+1, that might be actual addition to PB in a "hardware" direction. All those widely-popular webcameras, gamepads or becoming popular fingerprint scanners, other scanners, etc, or even stuff like robots/drones, looks nice to access them directly out-of-the-box.
"W̷i̷s̷h̷i̷n̷g o̷n a s̷t̷a̷r"