Missing characters when 2D datamatrix barcode is scanned
-
Hi All,
I am facing an issue with scanned 2D datamatrix barcode where I see different characters missing on scans. This issue is happening only on Linux. GD4500 Datamatrix Scanner works as keyboard wedge here and I use event filter installed on qApp (QGuiApplicaiton) to read the scanned data. I see that data is missing when I put qDebug inside event filter.
bool USBPortReader::eventFilter(QObject *obj, QEvent *event) { Q_UNUSED(obj); if (event->type() == QEvent::KeyPress) { QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event); qDebug() << "Recieved data : " << keyEvent->text();
I tested, using evtest applicaiton to see if we recieve all data from the driver and it prints all data in barcode everytime I scan.
I tried changed the USB Keyboard speed of the barcode scanner from 1 ms to 10 ms and it improves the scans (fewer characters are missing afterwards). Cannot increase more than 10 ms as it is the max supported by scanner.
I wanted to try setting keyboardInputInterval property but it is only available for QApplication and not for QGuiApplication. Can someone help me on how I can adjust the setting on QGuiApplicaiton ? I cannot set this directly on X11 as our embedded applicaiton uses eglfs/framebuffer.
Any leads or support is highly appreciated. Thank you in advance.
-
This post is deleted!