How to send get index string command to HID on linux?
I go here first time today.
wish guys to give help to me.
Now, I is able to send get index string to hid on windows.
Use HidD_GetIndexedString function on windows.
for example:
I have to send bytes arrays to hid adapter.
use HidD_GetIndexedString to do this.
Index value is 0x99 (3rd byte), index length is 0x15(7rd byte)
SO.bytes array as below:
CTL 80 06 99 03 09 04 17 00 GET_DESCRIPTOR.
On windows , the Codes work well.
But , i need to port this function to linux.
Now coding like this:
if(open("/dev/hiddev0", O_RDWR|O_NDELAY) != -1)
{
string_descriptor.index = 0x99;
ioctl(handle, HIDIOCGSTRING, &string_descriptor);
}
In fact, On linux
The Bytes array is:
CTL 80 06 99 03 09 04 66 00
This means that I can not to change index string length,
The fixed length is 0x64.
How to change index string length to 0x15 on linux.
What function is used????
Thank a lot......
|