PyUsb USB Barcode Scanner

前端 未结 2 593
没有蜡笔的小新
没有蜡笔的小新 2021-02-01 11:04

I\'m trying to output a string from a barcode or qrcode using a Honeywell USB 3310g scanner in Ubuntu. I have libusb and a library called metro-usb (http://gitorious.org/other/m

2条回答
  •  庸人自扰
    2021-02-01 11:41

    Grab a Quick Start Guide, scan "USB Serial"-mode barcode, then "Save" barcode to make this setting permanent. Now your 3310g is in serail emulation mode, note new /dev/ttyACM0 or /dev/ttyUSB0 device. Read serial port with simple file operations from python:

    f = open('/dev/ttyACM0')
    print f.read(13)
    

提交回复
热议问题