It is currently Sun Dec 16, 2018 4:09 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: Direct support for USB HID devices
PostPosted: Sat Sep 05, 2009 11:21 pm 
Offline
New User
New User

Joined: Sat Sep 05, 2009 11:08 pm
Posts: 2
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 ...


Top
 Profile  
Reply with quote  
 Post subject: Re: Direct support for USB HID devices
PostPosted: Sun Sep 06, 2009 2:06 am 
Offline
Enthusiast
Enthusiast

Joined: Sun Mar 16, 2008 9:18 am
Posts: 469
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?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Sep 06, 2009 4:53 pm 
Offline
New User
New User

Joined: Sat Sep 05, 2009 11:08 pm
Posts: 2
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Direct support for USB HID devices
PostPosted: Thu Aug 25, 2011 7:41 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Aug 07, 2003 7:01 pm
Posts: 3088
Location: United Kingdom
I agree, support for USB HID would be good.

_________________
http://www.SinisterSoft.com <- My Business website
http://www.ReportComplete.com and http://www.ReportPlus.co.uk <- School end of term reports system


Top
 Profile  
Reply with quote  
 Post subject: Re: Direct support for USB HID devices
PostPosted: Thu Aug 25, 2011 9:25 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Tue Aug 21, 2007 2:44 pm
Posts: 430
Location: USA (Cincinnati)
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)


Top
 Profile  
Reply with quote  
 Post subject: Re: Direct support for USB HID devices
PostPosted: Thu Aug 25, 2011 9:41 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Jul 09, 2011 7:57 am
Posts: 276
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


Top
 Profile  
Reply with quote  
 Post subject: Re: Direct support for USB HID devices
PostPosted: Wed Oct 05, 2011 5:39 pm 
Offline
Addict
Addict

Joined: Wed Nov 12, 2008 5:01 pm
Posts: 1023
Location: Russia
Quote:
I agree, support for USB HID would be good.
There is a library, PureBasic for Windows
viewtopic.php?f=14&t=41729

_________________
Library XP_Menu_Lib - office menu; HID_Lib - USB Library
Torrent client - pbTorrent (source code); Create driver in PureBasic.


Top
 Profile  
Reply with quote  
 Post subject: Re: Direct support for USB HID devices
PostPosted: Tue Nov 06, 2012 4:45 pm 
Offline
User
User

Joined: Wed Mar 21, 2012 6:10 pm
Posts: 96
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 :wink:


Top
 Profile  
Reply with quote  
 Post subject: Re: Direct support for USB HID devices
PostPosted: Sat Nov 24, 2018 4:06 pm 
Offline
User
User

Joined: Wed Mar 21, 2012 6:10 pm
Posts: 96
Is this request completed ? no way to know where it is ? it's 6 years ago...


Top
 Profile  
Reply with quote  
 Post subject: Re: Direct support for USB HID devices
PostPosted: Sat Nov 24, 2018 10:10 pm 
Offline
Moderator
Moderator
User avatar

Joined: Thu Dec 31, 2009 11:05 pm
Posts: 710
Location: Berlin and Ibiza
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.

_________________
ImageImageImageImageImage


Top
 Profile  
Reply with quote  
 Post subject: Re: Direct support for USB HID devices
PostPosted: Sat Nov 24, 2018 11:01 pm 
Offline
Addict
Addict

Joined: Wed Nov 12, 2008 5:01 pm
Posts: 1023
Location: Russia
There is a cross-platform library HIDAPI. https://github.com/signal11/hidapi
Perhaps it can be used with PB.

_________________
Library XP_Menu_Lib - office menu; HID_Lib - USB Library
Torrent client - pbTorrent (source code); Create driver in PureBasic.


Top
 Profile  
Reply with quote  
 Post subject: Re: Direct support for USB HID devices
PostPosted: Thu Dec 06, 2018 2:58 am 
Offline
Addict
Addict
User avatar

Joined: Mon Oct 26, 2015 2:55 am
Posts: 895
Location: UA
+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.

_________________
Dreamness

Like a copyleft notify: all the source code created by me and posted on Purebasic official forums is free to use and modification in all possible (and several impossible) ways for anyone, without asking my permission


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye