Reputation: 432
I have a barcode scanner, and currently, it is working as a keyboard so if the scanner successfully scans by pushing the trigger the scanned code goes to the computer as input.
Now, I want to write a python program on my Raspberry Pi 3B which connects to the scanner and start the scanning process without the need of pushing the trigger on the scanner. Meaning that I make a GUI where only by just clicking on a button the user starts the scanning process and the scanned code (if the scan was successful) gets outputted.
The question is: how to do it?
I have tried pyusb but it can't send a command to the scanner to scan (Or I don't know how).
Even worse if it turned out that there is nothing like Python-Scanner communication, only the primitive connected || not connected
type.
Upvotes: 1
Views: 1927
Reputation: 915
Depending on which operating system you use, you should look into the SDKs for the scanner you're using. It seems they provide some tools to control the scanner. They a re not very informative on what exactly they support though. ( for example: https://www.zebra.com/us/en/support-downloads/software/developer-tools/scanner-sdk-for-linux.html)
The reference manual for the serial interface I found here: https://www.zebra.com/content/dam/zebra_new_ia/en-us/manuals/barcode-scanners/Simple%20Serial%20Interface%20Programmer's%20Guide.pdf
Upvotes: 1