PDA

View Full Version : HID rfid reader



slavisac
24th October 2019, 22:54
Hello

I want to make qt widget app to read code from rfid reader but the problem is becouse my app need read in backround. The user will use computer for other job, reader is for background process

the reader is conected on USB port and detected in windows as HID keyboard device.

First problem is how to use only in qt app but not use in other app

Sorry on my bad englisch

d_stranz
25th October 2019, 22:31
First problem is how to use only in qt app but not use in other app

See this article (https://github.com/libusb/libusb/issues/335)from github discussing libusb. Like the device described in this post, if your RFID reader emulates a keyboard, you will probably have to replace its driver with one that allows exclusive access (winusb) and use libusb to control it. There is probably no Qt-level direct support for USB like there is for serial ports.


my app need read in background

You can either write a Windows service or implement a normal program with a hidden interface. You can use Qt's QLocalSocket to connect your client and server apps to transmit RFID information.