PORTS Forum
Ports and Interfaces => USB => Topic started by: marcoapolinario 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
-
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
-
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
-
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
-
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... :'(
-
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