Question about XHC-HB04 pendant plugin.

If you have a question about the software please ask it here.

Question about XHC-HB04 pendant plugin.

Postby kig23 » Thu May 10, 2018 3:32 pm

I'm working on a new project and have to deal with HID/USB device. I'm wondering if somebody knows which library is used to write the XHC-HB04 plugin or maybe is used P/Invoke.

Thanks in advance
kig23
 
Posts: 161
Joined: Sat Mar 31, 2018 6:58 am
Location: Italy

Re: Question about XHC-HB04 pendant plugin.

Postby Haik » Thu May 10, 2018 4:27 pm

For that Xamarin "OpenTK.Input" is used. Check out https://developer.xamarin.com/api/namespace/OpenTK.Input/

Keep in mind it's not .Net 2 compatible. Hope this helps. :)

- Haik
Haik
 
Posts: 35
Joined: Fri Sep 08, 2017 6:01 pm

Re: Question about XHC-HB04 pendant plugin.

Postby kig23 » Thu May 10, 2018 4:45 pm

Thanks Haik. Maybe Balazs can answer this question. But i think that they didn't use openTK.input, because of the fact that openTK.input doesn't work with .Net Framework 2.0 like you told me. UCCNC ver. 1.2047 requiers .NetFramework 2.0 and the XHC-HB04 plugin is written by cncdrive (i think), so the plugin should work with .NetFramework 2.0.
kig23
 
Posts: 161
Joined: Sat Mar 31, 2018 6:58 am
Location: Italy

Re: Question about XHC-HB04 pendant plugin.

Postby Robertspark » Thu May 10, 2018 6:20 pm

You won't get much info out of cncdrive on the xhc-hb04, because it took them a fair bit of time to reverse engineer the pendant which is fair enough.

If you search you may find some discussions on it and other pendants (I had a go at one a long time ago dabble)

If you have a look at the shuttle Xpress pendant I attempted (it works, never quite finished) I listed how I tried to do it and I think listed the source code etc.
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: Question about XHC-HB04 pendant plugin.

Postby kig23 » Thu May 10, 2018 7:16 pm

Thanks Rob.
kig23
 
Posts: 161
Joined: Sat Mar 31, 2018 6:58 am
Location: Italy

Re: Question about XHC-HB04 pendant plugin.

Postby cncdrive » Thu May 10, 2018 9:51 pm

Hi,

Yes, Rob is right. We do not give out the source of the pendant plugin, because it took us lots of time to make it work and concurency then might use our code if it will go public.
That pendant has an API too made by the manufacturer of the pendant which you could use to communicate with the pendant, you can find the API posted somewhere. (I don't recall now where did we find it)
But the issue with that API library is that it is pretty buggy. So finally we did not use it, but we sniffed the USB packets between the API and the pendant and wrote our own HID library for it.
As said this took us an awful amount of time is why we don't want to make the source code public.
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: Question about XHC-HB04 pendant plugin.

Postby kig23 » Fri May 11, 2018 5:57 am

Hi Balazs,
thanks, but i think you misunderstood me. I'm not interested in the souce code of the pendant. I asked only which library is used to write the plugin. Thanks again.
kig23
 
Posts: 161
Joined: Sat Mar 31, 2018 6:58 am
Location: Italy

Re: Question about XHC-HB04 pendant plugin.

Postby Robertspark » Fri May 11, 2018 6:01 am

I expect it used a few libraries

What do you want the library to do?

Which bit are you having problems with?

Is it the usb communication side of things you are asking about?
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: Question about XHC-HB04 pendant plugin.

Postby cncdrive » Fri May 11, 2018 6:09 am

Hi,

We did not use any premade library, we implemented our own HID device using the hid.dll Windows API and sent and received data via data stream using user32.dll and setupapi.dll and kernel32.dll Windows API functions.
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: Question about XHC-HB04 pendant plugin.

Postby Robertspark » Fri May 11, 2018 6:40 am

DLL = dynamic link library... So you did use "premade" libraries, and a few of them, just they were the inbuilt Microsoft API ones and not created by others with licencing / credit /copyright acknowledgement required
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Next

Return to Ask a question from support here

Who is online

Users browsing this forum: No registered users and 29 guests