Author Topic: Read foot control click  (Read 15751 times)

marcoapolinario

  • Member
  • ***
  • Posts: 3
Read foot control click
« on: July 07, 2011, 03:18:25 pm »
Hi guys!

My name is Marco i'm delphi developer.

I did download of 2 programs in site http://www.lvr.com/hidpage.htm, both are sample
about HID, SimpleHIDWrite3 and HIDTestSource.

At SimpleHIDWrite when i click on foot control(VEC) it return
the codes in HEX:
RD 00 02 00
RD 00 01 00
RD 00 04 00

How can i do to get this information? because the SimpleHIDWrite hasn't code
avaliable

Thanks

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Read foot control click
« Reply #1 on: July 07, 2011, 10:09:39 pm »
If you're asking how to request the data in code, the data is in Input reports. I believe Robert Marquardt's code shows how to request Input reports in Delphi. The report descriptor defines the contents of the reports.

Jan

marcoapolinario

  • Member
  • ***
  • Posts: 3
Re: Read foot control click
« Reply #2 on: July 08, 2011, 08:10:00 am »
Jan thanks for answer.

But, how i did say before the software SimpleHIDWrite hasn't source available.
see the application's print (user: medicoweb password: medico5683)

http://201.71.228.118/download/usb.jpg


The other code HidTest that has source, but i'm able to get the Input reports like
the image above, i tried but didn't get,see the application's print (user: medicoweb password: medico5683)

http://201.71.228.118/download/usb_code.jpg
« Last Edit: July 08, 2011, 10:10:59 am by Jan Axelson »

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Read foot control click
« Reply #3 on: July 08, 2011, 10:13:12 am »
It looks like the device has multiple HID interfaces. After finding the first HID, continue to search for additional HIDs. Each will use a different handle.

(I changed your hyperlinks to plain text so the password box appears only if you click the link.)

Jan

marcoapolinario

  • Member
  • ***
  • Posts: 3
Re: Read foot control click
« Reply #4 on: July 08, 2011, 10:38:32 am »
Have you same sample about? in Delphi?

I'm try the code without success

procedure THidViewMainForm.HidCtlDeviceData(HidDev: TJvHidDevice;
  ReportID: Byte; const Data: Pointer; Size: Word);
Var
   i  : Integer;
   Str,teste,teste2,teste3: String;

Begin
   For I := 1 To Size - 1 Do
       Str := Str + Char( Cardinal( PChar( Data )[ I ] ) );
   teste:=ConvStr(Data,8);
   teste2:=ByteToHex(ReportID);

   Memo1.Lines.Add( 'RECIBIDO : ' + Str +''+ teste+''+teste2);
   beep;
  CopyMemory(@ReceivedData, Data, Size);
  teste3:=bintostr(ReceivedData);
  Memo1.Lines.Add('Got Data!');

End;

I'm really lost... :'(



Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Read foot control click
« Reply #5 on: July 08, 2011, 10:57:04 am »
Maybe you could start with Robert's HidTest application (my site has the source code for that) and modify it to do what you need.

I haven't used Delphi in a very long time so can't be of much help on Delphi programming.

Jan