-
Notifications
You must be signed in to change notification settings - Fork 474
Unable to read data from the RFID HID USB desktop reader in Windows, in Linux, everything works fine. #491
Hi!
I can't read any data from the RFID HID USB desktop reader in Windows 10, in Linux, everything works fine.
I have tried with C++ code and with the hidapitester tool. I have tried with vendor and product ids, with path, without success in both tries.
Results from Windows:
hidapitester.exe --open-path "\\?\hid#vid_0483&pid_5750#6&1dbe0b37&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}" --send-output 0x40,0x02,0x02,0xbc --read-input --close Opening device. path: \\?\hid#vid_0483&pid_5750#6&1dbe0b37&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030} Writing output report of 64-bytes...wrote 65 bytes: 40 02 02 BC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Reading 64-byte input report 0, 250 msec timeout...read 0 bytes: Closing device
hidapitester.exe --vidpid 0483 --open --send-output 0x40,0x02,0x02,0xbc --read-input --close Opening device, vid/pid:0x0483/0x0000, usagePage/usage: 0/0 Device opened Writing output report of 64-bytes...wrote 65 bytes: 40 02 02 BC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Reading 64-byte input report 0, 250 msec timeout...read 0 bytes: Closing device
The same command executed in the Linux system returns the correct data:
hidapitester --vidpid 0483 --open --send-output 0x40,0x02,0x02,0xbc --read-input --close Opening device, vid/pid:0x0483/0x0000, usagePage/usage: 0/0 Device opened Writing output report of 64-bytes...wrote 64 bytes: 40 02 02 BC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Reading 64-byte input report 0, 250 msec timeout...read 64 bytes: F0 06 02 00 01 01 08 FE 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Closing device
Thank you in advance for any help!
All reactions
Replies: 2 comments 3 replies
Please share your HID Report Descriptor
All reactions
WinHIDdump:
80EE:0021: VirtualBox - USB Tablet
PATH:\?\hid#vid_80ee&pid_0021#6&c0114fe&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
DESCRIPTOR:
05 01 09 02 A1 01 09 01 A1 00 05 09 19 01 29 05
15 00 25 01 35 00 45 01 65 00 55 00 75 01 95 05
81 02 95 03 81 03 05 01 09 38 25 7F 45 00 75 08
95 01 81 06 05 0C 0A 38 02 81 06 15 00 25 01 45
01 75 01 95 08 81 03 05 01 09 30 26 FF 7F 46 FF
7F 75 10 95 01 81 02 09 31 81 02 C1 00 C1 00
(95 bytes)
0483:5750: RFID_HID - By:Wantrue
PATH:\?\hid#vid_0483&pid_5750#6&1dbe0b37&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
DESCRIPTOR:
05 8C 09 01 A1 01 09 03 15 00 35 00 45 00 65 00
55 00 75 08 95 40 81 02 09 04 91 02 C1 00
(30 bytes)
Is that enough? This is from the VirtualBox based Windows 10 instance, but I have the same results on the laptop with Windows 10 OS.
All reactions
Would be best if you could also share the Descriptor taken on Linux.
All reactions
Sure, sorry. Below you can find the descriptor taken on Linux.
001:048:000:DESCRIPTOR 1671707649.397144
05 8C 09 01 A1 01 09 03 15 00 26 00 FF 75 08 95
40 81 02 09 04 15 00 26 00 FF 75 08 95 40 91 02
C0
All reactions
PATH:?\hid#vid_80ee&pid_0021#6&c0114fe&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
DESCRIPTOR:
05 01 09 02 A1 01 09 01 A1 00 05 09 19 01 29 05
15 00 25 01 35 00 45 01 65 00 55 00 75 01 95 05
81 02 95 03 81 03 05 01 09 38 25 7F 45 00 75 08
95 01 81 06 05 0C 0A 38 02 81 06 15 00 25 01 45
01 75 01 95 08 81 03 05 01 09 30 26 FF 7F 46 FF
7F 75 10 95 01 81 02 09 31 81 02 C1 00 C1 00
That is a "Mouse/pointer" - HIDAPI cannot open "special" devices like Kyeboards/Mouses on Windows because OS doesn't allow to use for it any API except WinAPI-specific for Input.
The other device is a "Bar Code Scanner". I'm not sure if WinAPI would allow to open it with HIDAPI at all. It might be under the same restriction as Mouses and Keyboards.
You might need to use some higher-level API like https://learn.microsoft.com/en-us/uwp/api/windows.devices.pointofservice.barcodescanner?view=winrt-22621
Or some Keyboard/WM_INPUT hooks.
That is not a limitation if HIDAPI implementation - that is a WinAPI limitation.