我想使用用户空间库在Linux中写入和读取USB HID设备的响应。我在谷歌上搜索了一段时间,发现libhid可以解决这个问题。
因此,当我使用hid_interrupt_write和hid_interrupt_read发送和接收数据时,发生了以下错误:
error submitting URB: No such file or directory
但是,当我尝试使用hid_set_output_report和hid_get_input_report对设备进行写入和读取时,出现了以下错误:
error sending control message: Connection timed out.
我正在寻找相应的Linux,类似于Microsoft在此页面中提到的内容:
基本上与DataMovement相对应的函数:
Data Movement
The following list identifies HID API that an application can use to move data back and forth between the app and a selected device.
HidD_GetInputReport
HidD_SetFeature
HidD_SetOutputReport
ReadFile
WriteFile
我目前有两个方向:
-