0

We have a QR scanner from ZKTECO (QR50BE), when plugged into my desktop (ubuntu), it works as intended, scanning a qr code prints the code to where ever my cursor is on my desktop, like a keyboard.

We want to use this output from the scanner in a python script like qr_code = input().

However, when the same QR scanner is plugged into a raspberry pi and I ssh into the pi and scan something, nothing happens. Initially I thought maybe the pi OS didnt support it, so I installed ubuntu on the Pi, but still nothing.

Writing some python using fp = open('/dev/hidraw0', 'rb') does give us some output that we could probably manipulate to get it in the desired form, but I would of course prefer to use it in the same way it works on my desktop.

Any one have any ideas what might be happening?

Could it be related to ssh? (ie if im ssh'd another 'keyboard' attached to the pi might not have it's STDOUT in my terminal, if that's the case how could I get around that such that it does input for into my python script?) (I can't connect the pi to a screen to test)

Or maybe it's some library that's not available to the ARM architecture?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.