Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Is it possible to reconnect to input devices (/dev/input/eventX) without restarting the application?
I have a qml application running on a RaspberryPi 3.
At application startup the application "connects" to the different input devices (/dev/inpu/eventX) like touchscreen and barcode reader.
Sometimes I get the following error message:
evdevkeyboard: Could not read from input device (No such device)
Then it could be that the barcode reader is not longer available for the application. Maybe the barcode reader reconnects for some reasons.
Now my question: Is it possible to "connect" to input devices again, without resarting the application?
How are you "connecting" to that device in your application ?
that is the strange thing.
I am not actively connecting to input devices.
I think the application handels this on it's own by evdev. If I use QT_LOGGING_RULES, I can see that the application is searching for input devices and connecting to them at start up. But after that, if the input device is turned off or disconnected I get the above mentioned error message. Unfortunately after reconnecting the input device the application does not connect to it again.
How can I handle this situation?
The thing is, since the device is technically still opened, when you reconnect it, it likely has been given another id.
Can you verify that ?
@SGaist : I can see the system that the device is getting the same id after it "reconnects" to the system.
Then you will have to modify the evdev plugin to see if you can reconnect.