Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Mon Nov 18, 2019 12:57 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Best USB HID option
PostPosted: Thu Jan 06, 2011 6:22 pm 
Offline

Joined: Wed May 20, 2009 11:02 am
Posts: 423
Hi,

I am trying to get a Teensy 2.0++ board to communicate with a computer through the USB. This device is recognized as HID (which makes life easier) and I see three possibilities to handle the communication on the RB side: Using the MBS USB HID plugin, using mchid.dll (I found out this option in these forums) and using pure Windows API calls (I have a VB6 example).

Right now, I have the mchid.dll option working. I found a thread with all the necessary code there to make it work (http://forums.realsoftware.com/viewtopic.php?f=1&t=28549). The problem I see with this approach is the library I am using, which is as far as I could find out, not completely free to use. It belongs to Mecanique (http://www.mecanique.co.uk), if I am not wrong.

I have also tried the MBS plugin very briefly and I didn't manage to get it working. Anyway, if there is a free option (maybe mchid.dll and certainly the Windows API calls) that is not too difficult to implement, I prefer not to pay any extra money.

Finally, I have the pure Windows API calls option. I believe this would be the best option because it doesn't depend on any third party element that will cost extra money plus the user does not need to have any dll that does not come with Windows.

My questions:

Does anyone see other options to handle the communication in RB?

Do you know if mchid.dll can be used and redistributed freely?

Do you agree that the pure Windows API calls are the best option (at least if the mchid.dll is not free)?

Thank you for your opinions.

Pixe

_________________
Using RS2011r4.3 on Windows7.


Top
 Profile  
Reply with quote  
 Post subject: Re: Best USB HID option
PostPosted: Thu Jan 06, 2011 6:45 pm 
Offline

Joined: Wed May 20, 2009 11:02 am
Posts: 423
EDIT: It looks like the mchid.dll library is free. I am looking for the source of it and an EULA, if there is any, and I could find a few sites stating that it's free.

_________________
Using RS2011r4.3 on Windows7.


Top
 Profile  
Reply with quote  
 Post subject: Re: Best USB HID option
PostPosted: Thu Jan 06, 2011 7:16 pm 
Offline

Joined: Wed Jul 09, 2008 10:46 pm
Posts: 193
Location: Minneapolis
My vague understanding (it's been awhile since I was playing with this stuff) was that at one time their application EasyHID (which included the mchid.dll) could be downloaded by itself but now EasyHID is only included with their other software packages. Within EasyHID the license agreement states:
Quote:
However, you are welcome to distribute mcHID.dll with your software application without paying a fee to Mecanique UK if you are a private individual, commercial organisation or educational establishment.


Hope that helps,

_________________
http://www.miscjunk.org


Top
 Profile  
Reply with quote  
 Post subject: Re: Best USB HID option
PostPosted: Thu Jan 06, 2011 7:48 pm 
Offline

Joined: Wed May 20, 2009 11:02 am
Posts: 423
Yes, I have just downloaded and installed the software that includes EasyHID and indeed that's what the license agreement states currently. Thank you Indy.

This is a decisive piece of information for me and now I don't see why I would use any of the other two methods, unless someone sees any reason not to use mchid.dll.

Pixe

_________________
Using RS2011r4.3 on Windows7.


Top
 Profile  
Reply with quote  
 Post subject: Re: Best USB HID option
PostPosted: Fri Jan 07, 2011 3:37 am 
Offline
User avatar

Joined: Wed May 10, 2006 2:42 pm
Posts: 2985
Location: Germany
pixe656 wrote:
I have also tried the MBS plugin very briefly and I didn't manage to get it working.


What is the problem?

Greetings
Christian

_________________
See you in Orlando, Florida for Real World 2013
More details and registration here:
http://www.realsoftware.com/community/realworld.php


Top
 Profile  
Reply with quote  
 Post subject: Re: Best USB HID option
PostPosted: Fri Jan 07, 2011 3:50 am 
Offline

Joined: Wed May 20, 2009 11:02 am
Posts: 423
I don't have the HID device with me right now, so I can't test it to see what exactly the problem was when trying to use the MBS plugin. However, looking at the code again I think maybe it has to do with the product ID and the way I used to represent it String/integer, hexadecimal/decimal. I will check it this evening or during the weekend and let you know.

One related question, your "USB HID Devices Win" example found the device I am using, but there are three entries in the listbox for the device. Why is this? How can I know which one should be used for the communication?

Thank you.

Pixe

_________________
Using RS2011r4.3 on Windows7.


Top
 Profile  
Reply with quote  
 Post subject: Re: Best USB HID option
PostPosted: Fri Jan 07, 2011 3:53 am 
Offline
User avatar

Joined: Wed May 10, 2006 2:42 pm
Posts: 2985
Location: Germany
Well, some devices have multiple endpoints. I can't tell you which one is right as I don't know your device.

Greetings
Christian

_________________
See you in Orlando, Florida for Real World 2013
More details and registration here:
http://www.realsoftware.com/community/realworld.php


Top
 Profile  
Reply with quote  
 Post subject: Re: Best USB HID option
PostPosted: Wed Feb 02, 2011 7:30 pm 
Offline

Joined: Wed May 20, 2009 11:02 am
Posts: 423
Christian,

I got it working. I was using a wrong product ID to identify my USB device. Then, I also had to use the correct endpoint.

Thank you,

Pixe

_________________
Using RS2011r4.3 on Windows7.


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

All times are UTC - 5 hours


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 © 2000, 2002, 2005, 2007 phpBB Group