Author Topic: hidHandle issue  (Read 10270 times)

VBDude

  • Member
  • ***
  • Posts: 2
hidHandle issue
« on: May 12, 2016, 06:18:48 pm »
Hi all,
First of all thank you Jan for all the effort you have put into this site and USB knowledge.  I have been coming to your site a lot lately.

So I'm having a problem getting your examples to work.  I tried both your generic_hid_cs_62 and generic_hid_vb_50, I can not seem to get a valid hidHandle from either one.  If I remove the FileIo.GenericRead | FileIo.GenericWrite I am able to get a hidHandle, but then I get errors when trying to read.

The device I am trying to access is a USB Prox reader made by RFIdeas.  They have sent me their USB Protocol Specifications.  It looks very simple, since they use feature reports to read and configure the devices.
Using SimpleHIDWrite application found on your website, I am able to read and write to the devices with no problem.  Not sure what SimpleHIDWrite is doing differently than the generic_hid examples.

Any ideas?

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: hidHandle issue
« Reply #1 on: May 12, 2016, 06:29:42 pm »
What is the error message when you try to read a Feature report?

VBDude

  • Member
  • ***
  • Posts: 2
Re: hidHandle issue
« Reply #2 on: May 13, 2016, 09:46:36 am »
This topic can be deleted.  It was a misunderstanding on my part.  :(
I was leaving the 1st byte at 0 and setting 2nd byte to the cmd value I wanted to send.
I assumed the 1st byte was the ReportID.  This was incorrect.

Once I realized the 1st byte should be the cmd value, it worked perfectly on my Windows 7 and Windows 10 computers.
Now for the real test, I need this to run on Windows 10 IoT on the Raspberry Pi 2/3.  Sounds like a good weekend project (with beer in hand)

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: hidHandle issue
« Reply #3 on: May 13, 2016, 02:54:36 pm »
Thanks for reporting back!