Test a custom virtual USB HID device with Vdevice and hidapitester
Create a vendor-defined HID fixture on Windows, read its exact 16-byte input report from an independent application and check the 16-byte return report.
Prepare the signed demo and the independent HID reader
- From the Vdevice Demo 1.0.6.0 release, download
VdeviceSetupConsole.exe,Vdevice-SDK-1.0.6.0.zipandSHA256SUMS.txt. Check the archive and driver catalog. - Use the demo setup as administrator. Follow its restart instructions and run
VdeviceSetupConsole.exe /diagnose. In the verified run the loaded image and the package SHA-256 matched and the driver API responded. - Extract the SDK under
Vdevice-SDK-1.0.6.0. Extract the x64 Windows archive from the hidapitester v0.7 release and puthidapitester.exebeside the downloaded C++ test.
Build the test with the demo SDK
Open the Visual Studio x64 Native Tools Command Prompt in the folder containing the C++ test and the extracted SDK. The /MT flag links the C++ runtime statically.
cl /nologo /W4 /WX /MT /std:c++17 /EHsc /utf-8 /permissive- /DUNICODE /D_UNICODE /I Vdevice-SDK-1.0.6.0\Vdevice vdevice-hid-test.cpp Vdevice-SDK-1.0.6.0\Vdevice\Vdevice.cpp /Fe:vdevice-hid-test.exe
The test creates a vendor-defined collection on usage page FF00 with development identity FFFF/0010. Its descriptors use interrupt IN 81, interrupt OUT 01 and reports without a report ID. It produces only the fixture's synthetic report bytes.
Check input, output and removal
In a second terminal, run .\hidapitester.exe --vidpid FFFF:0010 --usagePage 0xFF00 --list-usages before starting the fixture. Expect no matching HID. If another device already matches, stop and use a test machine without that fixture.
Start vdevice-hid-test.exe in an administrator terminal. When it prints READY, run the next two commands immediately in the second terminal. The fixture runs for 18 seconds after configuration.
.\hidapitester.exe --vidpid FFFF:0010 --usagePage 0xFF00 --open --length 16 --timeout 4000 --read-input --close
.\hidapitester.exe --vidpid FFFF:0010 --usagePage 0xFF00 --open --length 17 --send-output "0,72,73,68,65,17,34,51,68,85,102,119,136,153,170,187,204" --close
- Input read returns
54 43 53 41 10 20 30 40 50 60 70 80 90 A0 B0 C0. - The HID reader's write includes a leading
00for the report ID slot. The USB OUT endpoint receives the 16-byte payload, and the fixture printsExact 16-byte OUT report received on endpoint 0x01. - After
Device disconnected., the same--list-usagescommand returns no matching HID.
The published run exercises this descriptor and receiver on the signed demo under the stated Windows configuration. For a keyboard, mouse or controller, use the profile's example and verify it with the app you intend to support.