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()
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
usb_scanner-0.0.4.tar.gz
(5.0 kB
view details)
Built Distribution
File details
Details for the file usb_scanner-0.0.4.tar.gz
.
File metadata
- Download URL: usb_scanner-0.0.4.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.5 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e4a78bc5f66e734b74c2a68dd647f41351b0859f309282c2eee197a9624640d |
|
MD5 | 7eef938adfb9e637926604c983464ae0 |
|
BLAKE2b-256 | 4d9d2bd2c792d6aef672162054c0b7143a1a59f986b94e20492c73ef17f77f60 |
File details
Details for the file usb_scanner-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: usb_scanner-0.0.4-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.5 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a93eb4702a058e325379db2203244469f2163e21105129be8a32fdda48a67ff5 |
|
MD5 | 9e60b5726d2be284a137ce12543ca2af |
|
BLAKE2b-256 | edcbf895abbb64e70e1fc7f026473e2e25f2213b7d17ef600b6008cb03a3a4fe |