Skip to main content

For use USB barcode scanners

Project description

USB Scanner

Package allowing to read a barcode or QR-code from USB scanner listed below.

https://sps.honeywell.com/fr/fr/products/productivity/barcode-scanners/general-purpose-handheld/voyager-xp-1470g-general-duty-scanner

https://www.zebra.com/gb/en/products/scanners/general-purpose-scanners/handheld/ls1203.html

Instructions

  1. Install:
pip install usb-scanner
  1. 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

usb_scanner-0.0.6.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

usb_scanner-0.0.6-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file usb_scanner-0.0.6.tar.gz.

File metadata

  • Download URL: usb_scanner-0.0.6.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

Hashes for usb_scanner-0.0.6.tar.gz
Algorithm Hash digest
SHA256 63b02d6d61546242a169c790d21499f24b89eceecde9f909f159e6f3813ae4a1
MD5 839789e94448356f338c742cda15df8d
BLAKE2b-256 b4dae3104e648e7b79a6bf81bbecfe935f3b575276d881c1271ad2e1e0fcca1a

See more details on using hashes here.

File details

Details for the file usb_scanner-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: usb_scanner-0.0.6-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

Hashes for usb_scanner-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 24b8020270567717c17d9af142fadfebfef820ae6fc01fe21cfefd81642fddd0
MD5 e1f0eaf18e574476036e334535fae932
BLAKE2b-256 9150fa364285731f3945dcadc784604e4b1269a0ee8acd3ad59527e90c6369f0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page