summaryrefslogtreecommitdiff
path: root/cmds/hid/src/com
Commit message (Collapse)AuthorAgeFilesLines
* Add onDeviceSetReport to HID command toolChris Ye2021-02-241-2/+14
| | | | | | | | | When UHID device receives UHID_SET_REPORT event, call onDeviceSetReprot callback function to set the report output. Bug: 161633625 Test: atest android.hardware.input.cts.tests.SonyDualshock3UsbTest#testLights Change-Id: I02923203ddf5a2f2090a11434db19925bbaeaf05
* Add SET_REPORT data output to hid commandline tool.Chris Ye2021-02-191-3/+4
| | | | | | | | | Linux HID driver could use SET_REPORT to communicate with HID low level driver, capture the SET_REPORT output data in hid command line tool. Bug: 161633625 Test: Manual tests. Change-Id: Iea30b57078660c516f1b2756552884eebbc15e0e
* Add support to hid commandline tool for hid device output.Chris Ye2020-09-031-1/+32
| | | | | | | | | | Add support to hid commandline tool for hid device output in JSON format. Hid Device output requests will be generated to allow hid based CTS tests to verify the results. Bug: 136215622 Test: atest CtsHardwareTestCases Change-Id: Ideaa1fcd023f1f3af2cade92e05418df6f9f8e6f
* Added ability to set bus used for hid device testsFarid Chahla2020-02-193-4/+38
| | | | | | | | | | | | | | | When testing HID devices, it was assumed that the bus used would always be bluetooth. This caused USB hid tests to fail. This patch fixes this issue by adding a "busType" parameter to the test register file. This can be either "bluetooth" or "usb" at this time. This will break any hid test that does not specify a busType. Cherry picked from pa/1549664. Bug: 136263708 Test: atest CtsHarwareTestCases Change-Id: I44cda52505110227fa5262994d0cfe59ecb8763d
* Add UHID_OUTPUT handling to hid commandSiarhei Vishniakou2019-12-103-19/+102
| | | | | | | | | | | | | | Some joysticks may send UHID_OUTPUT requests during probe. They expect to receive a report in response. Provide a facility to specify the expected outputs from the driver, and a way to respond to each of these requests. Typically, this would be something like "driver: please use full report mode", "joystick: ACK". If the ACK is not received by the driver, the probe would fail, and input device would never get registered. Bug: 135136477 Test: atest NintendoSwitchProTest Change-Id: Ic2c7a73d3d4bf759a1a104324687cd01646f256e
* Add support for UHID_GET_REPORT requestsKim Low2018-12-063-3/+89
| | | | | | | | | | | | | | | | | | | | | | Updated to support UHID_GET_REPORT requests mainly for CTS use. All feature reports are assumed to be static and should be specified along with the register json. For example, in sony_dualshock4_register.json, add the following. "feature_reports": [ { "id": 5, "data": [0x05, 0x1e, 0x00, 0x05, 0x00, 0xe2, 0xff, 0xf2, 0x22, 0xbe, 0x22, 0x8d, 0x22, 0x4f, 0xdd, 0x4d, 0xdd, 0x39, 0xdd, 0x1c, 0x02, 0x1c, 0x02, 0xe3, 0x1f, 0x8b, 0xdf, 0x8c, 0x1e, 0xb4, 0xde, 0x30, 0x20, 0x71, 0xe0, 0x10, 0x00, 0xca, 0xfc, 0x64, 0x4d] } ] Test: Make sure build has hid-sony driver that's backported from >4.10. Run Dualshock4 CTS > atest cts/tests/tests/hardware/src/android/hardware/input/cts/tests/SonyDualshock4TestCase.java Change-Id: Ib0d534d47c6aa6fcc11af68b913c3db1cfa72752
* Fix GamepadTestCase#testButtonA CTS testSiarhei Vishniakou2017-05-122-22/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hid command, JNI layer: - Removed dependency of the hid device on libandroid_runtime and libutils. Using ALooper from libandroid to process callbacks from /dev/uhid file descriptor. - Switched to using "CREATE2" and "INPUT2" constructs in uhid driver Hid command, Java layer: - Removed delay workarounds, user now responsible for waiting for onInputDeviceChanged notification prior to using the hid commands. UiAutomation: - Added a new executeShellCommandRw function that allows bidirectional communication to shell command platform.xml: - Added uhid permissions to bluetooth stack for /dev/uhid access - CTS test now consistently passes Bug: 34052337 Test: CTS test case invoked with the following command: run cts -t android.hardware.input.cts.tests.GamepadTestCase -m CtsHardwareTestCases --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker Change-Id: Ic916c513b7e652b1e25675f0f38f0f1f3a65d214
* Add new `hid` command.Michael Wright2015-06-123-0/+551
This allows the shell user to inject HID events. Change-Id: I37faff576299ff14092b61ed39f2a1c086f672a5