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.8.tar.gz (5.2 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.8-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: usb_scanner-0.0.8.tar.gz
  • Upload date:
  • Size: 5.2 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.8.tar.gz
Algorithm Hash digest
SHA256 a2a6b6ff1a3b866a1323ddf67a95821851bb8697318bfd858c90675469405bf3
MD5 7b03024c86752e61f1c27cd21aaf7515
BLAKE2b-256 f411a47714634de5aa93cd7539501b036fa9b5e9b97eaf47d246473ad59bd70e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: usb_scanner-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 6.0 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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 e428d0a31d1b8d8e5fa897d9bab7a4d6506ec9497fb8b8043c054fc94ee3d29e
MD5 96466288679050c44727669493193c2d
BLAKE2b-256 87d8166d2cfd7432c5f192591d41620ddc0f698d89a62fabaf8ae5f70a973f83

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