Questions tagged [usb-hid]
24 questions
5
votes
0 answers
How to read barcode scanner input in background process?
I am using a barcode scanner connected to Windows PC. It is configured to work as USB HID device, and it is the most reliable mode for this scanner to work. I have developed some software to register input from it. The thing is that I want to have…

Ivan P.
- 832
- 2
- 9
- 26
3
votes
2 answers
How to use ioctl + nix macros to get a variable size buffer
This is related to How to use nix's ioctl? but it is not the same question.
I want to retrieve a variable size buffer. There is another ioctl that tells me that I need to read X bytes. The C header tells me the following too:
#define…

Juan Leni
- 6,982
- 5
- 55
- 87
2
votes
1 answer
Android USB - Understanding controlTransfer method
I am about to start a new project that works with a USB HID device. I know to send a command to a HID device, you use the following method:
controlTransfer(int requestType, int request, int value, int index, byte[] buffer, int length, int…

Pink Jazz
- 784
- 4
- 13
- 34
2
votes
0 answers
Does Linux support Runtime autosuspend feature for USB 1.1 character devices like keyboards?
I had to debug a keyboard lag issue that i faced in a logitech wireless USB keyboard and i found that it had runtime autosuspend and it was causing the keyboard to suspend after 2 seconds.
The specifications of my usb 2.0 USB keyboard are
Bus 003…

Aravind Prakash
- 21
- 1
- 6
1
vote
1 answer
How to write things to USB HID in Linux?
I'm working with a AMOLED screen. The vendor exposes the screen's brightness control to USB HID, and only give me an example webpage that uses Chrome's navigator.hid. I read the JavaScript code and find I need to do following things:
find a USB HID…

jiandingzhe
- 1,881
- 15
- 35
1
vote
1 answer
Read data from USB RFID reader using Python
I'm trying to read data from USB RFID reader using Python script. The data was write into a RFID sticker using NFC tool on my phone. So when I scan the RFID sticker at the RFID reader, Python script should display the data that I write into the RFID…

Danialyusri
- 11
- 1
- 4
1
vote
1 answer
WebHID API: How do I parse data from inputReport event?
I'm trying to grab sensor input from my digitizer ( X Tilt, Y Tilt, Tip Pressure, Tip Switch, Eraser, Pen, Puck .etc) using the WebHID API. This is what I've gotten so far:
index.js:
page_log = text => {
let p = document.createElement("p");
…

bobajeff
- 131
- 6
1
vote
0 answers
writing a linux kernel module / driver for an old keyboard / hid device
I have an old Compaq keyboard that has a set of keys on top that do not work.
I have tried xev, evtest, evemu-record and libinput debug-events and every other key except those keys is recognized.
However when I turn on a wireshark usb recorder I get…

cheshire
- 1,109
- 3
- 15
- 37
1
vote
1 answer
Talk to an USB HID device from within GNU Octave
I need to control a measurement instrument from within GNU Octave. The instrument has an USB HID interface. I just need to read or change the settings of the instrument. It's not about getting measurement data from the instrument.
What options are…

mbrennwa
- 581
- 1
- 3
- 11
0
votes
0 answers
how do i get usb_hid on micropython
So there is a module named usb_hid on CircuitPython but its not on MicroPython. Is there a way to get usb_hid on MicroPython?
It isnt in the lib folder of CircuitPython. I even tried displaying all the modules in MicroPython but usb_hid wasnt there.…
0
votes
1 answer
Can not compile usbmouse.c : too few arguments to function 'usb_maxpacket'
I am trying to modify and compile usbmouse.c
While compiling it is saying that the function usb_maxpackets requires 3 arguments but the code I copied from the torvald git is passing only 2 arguments to this function
the code can be found…

aTechieSmile
- 139
- 1
- 1
- 11
0
votes
0 answers
Why usbkbd driver in Linux only deal with single endpoint interface?
I am reading the source code of Linux driver about usbhid and usbkbd:
if (interface->desc.bNumEndpoints != 1)
return -ENODEV;
endpoint = &interface->endpoint[0].desc;
if (!usb_endpoint_is_int_in(endpoint))
return -ENODEV;
Here you can see…

Ma Paul
- 19
- 2
0
votes
1 answer
Having error: -22 while developing usb hid device
Hello we're trying to get an usb-hid device working on linux system.(Currently Rpi-2B Buildroot 64bit)
But dmesg shows an error on device plugged in, while other keyboards/mouse work fine.
The error -22 isn't found with googling so I am stucking…

y3k00000
- 11
- 1
- 3
0
votes
2 answers
WebHID API How to get Input Report without sending Output Report
Is there a way to just ask for an Input Report using the WebHID API? The API seems to have a function to read a Feature Report directly, but I don't understand why I have to wait for an event to listen to the Input Report. From what I understood…

Patratacus
- 1,651
- 1
- 16
- 19
0
votes
3 answers
I can't find the pip of this library usb_hid
I am doing a school project, which involves making a program that with the help of a Rasbperry pi pico and some push buttons, make a mouse. But apparently I need the usb_hid library to host my usb but I can't find it.
I've been looking for the…

Jeremias Davison
- 9
- 3