i am currently using your patch for developing an android app where I had a problem with your definition of the keyboard event structure:
You are saying that the keyboard event is an array of 8 bytes. So I though the following command should also work for writing the letter "a" to the device:
This didn't work for me, so after some hours (!) of searching for any problems in my Java code, which executes this command, I used your (precompiled) example program hid-gadget-test to verify the actual output by directing the output into some file:
echo a | ./hid-gadget-test /mnt/sdcard/test.txt keyboard
which actually writes the following byte sequence into the file (hexdump):
0000 0400 0000 0000 0000 0000 0000 0000
So these are 16 bytes instead of the expected 8. If I change my echo command to output 16 bytes instead of 8 it works perfectly.
Tested on Nexus 7 2012 with self compiled kernel. I didn't use the mouse events, but I would assume the same problem there.
Hey,
i am currently using your patch for developing an android app where I had a problem with your definition of the keyboard event structure:
You are saying that the keyboard event is an array of 8 bytes. So I though the following command should also work for writing the letter "a" to the device:
This didn't work for me, so after some hours (!) of searching for any problems in my Java code, which executes this command, I used your (precompiled) example program hid-gadget-test to verify the actual output by directing the output into some file:
which actually writes the following byte sequence into the file (hexdump):
So these are 16 bytes instead of the expected 8. If I change my echo command to output 16 bytes instead of 8 it works perfectly.
Tested on Nexus 7 2012 with self compiled kernel. I didn't use the mouse events, but I would assume the same problem there.