For use USB barcode scanners
Project description
USB Scanner
Package allowing to read a barcode or QR-code from USB scanner listed below.
https://www.zebra.com/gb/en/products/scanners/general-purpose-scanners/handheld/ls1203.html
Instructions
- Install:
pip install usb-scanner
- Example of use:
from usb_scanner import Reader
# Initialize Reader object
r = Reader(keymap="UK")
# Waiting for a barcode to be read
r.read()
# If you want have a timeout for the reading
r.read(timeout=10)
Fix udev permissions
Create a Udev rule for the use of USB scanners (hidraw*)
$ sudo nano /etc/udev/rules.d/99-hidraw-permissions.rules
and add the following lines
SUBSYSTEM=="usb", ATTRS{idVendor}=="05e0", ATTRS{idProduct}=="1200", MODE="666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="080c", ATTRS{idProduct}=="0300", MODE="666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0c2e", ATTRS{idProduct}=="1001", MODE="666"
Finally reload the udev rules with the following command
$ sudo udevadm control --reload-rules && sudo udevadm trigger
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file usb_scanner-0.0.7.tar.gz.
File metadata
- Download URL: usb_scanner-0.0.7.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
210f2d802425cb9da9416ce5e3ea516975f34f16085eccc214c4945a97e32e28
|
|
| MD5 |
1e5b6672ecd69b16371002d8ddd05699
|
|
| BLAKE2b-256 |
a6266b5e8f7c0e0df98934686f0ad61992b7c1e246a6f8f2d0ac2a52964efda1
|
File details
Details for the file usb_scanner-0.0.7-py3-none-any.whl.
File metadata
- Download URL: usb_scanner-0.0.7-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a81b49d3ff1dfdaa6faa897b8bf2385d87a24a7d2f68f0c0717cd056ec50c5e
|
|
| MD5 |
c733434e6e8317576713e899dd299329
|
|
| BLAKE2b-256 |
c80c2dcc03ee49f84cdb2023b437ffb1be9f374b626cddd5a45506ac8cba5f0a
|