Application fails when used with a Raspberry Pi 4, yet works correctly with any other variant of Raspberry Pi. Debugging the code shows that calls to hid_read fail on the Pi 4. There are increasing reports of this on the forums. For example: https://www.raspberrypi.org/forums/viewtopic.php?t=254889