Socket
Socket
Sign inDemoInstall

usb-scanner

Package Overview
Dependencies
0
Maintainers
1
Alerts
File Explorer

Install Socket

Protect your apps from supply chain attacks

Install

usb-scanner

For use USB barcode scanners

    0.0.4

Maintainers
1

Readme

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()

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

FAQs


Did you know?

Socket installs a GitHub app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc