I'm trying to set up a Raspberry Pi Zero to work with a USB barcode scanner that functions as a keyboard input. The Pi is running Raspberry Pi OS Lite 32-bit. The barcode scanner is functioning as intended. I've tested it on other hardware OS combinations and it is sending the correct keystrokes followed by a newline.
When I connect it to the Raspberry Pi Zero and scan a barcode, it seems to randomly do one of two things: 1) output the first character of the barcode (with no newline following), or 2) output the full barcode with a newline following it. Option 1 happens about three quarters of the time, but it is not consistent. My guess is that the barcode scanner is sending input faster than the Pi is able to accept. I get the same results both taking input at the terminal and reading from /dev/hidraw0.
The barcode scanner is the NetumScan NSL3, a cheap scanner that does not seem to have an option available to slow down its output. Running lsusb -vv, I get the following:
Is there anything I can do on the Raspberry Pi end to address this issue, or is this a situation where the barcode scanner will not be able to work with the hardware? I have another (much more expensive) barcode scanner that functions just fine.
When I connect it to the Raspberry Pi Zero and scan a barcode, it seems to randomly do one of two things: 1) output the first character of the barcode (with no newline following), or 2) output the full barcode with a newline following it. Option 1 happens about three quarters of the time, but it is not consistent. My guess is that the barcode scanner is sending input faster than the Pi is able to accept. I get the same results both taking input at the terminal and reading from /dev/hidraw0.
The barcode scanner is the NetumScan NSL3, a cheap scanner that does not seem to have an option available to slow down its output. Running lsusb -vv, I get the following:
Code:
Bus 001 Device 003: ID 28e9:03da GDMicroelectronics USB KeyboardCouldn't open device, some information will be missingDevice Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x28e9 GDMicroelectronics idProduct 0x03da bcdDevice 3.00 iManufacturer 1 NETUMBS iProduct 2 USB Keyboard iSerial 3 C202101 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x0022 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xa0 (Bus Powered) Remote Wakeup MaxPower 200mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 1 Boot Interface Subclass bInterfaceProtocol 1 Keyboard iInterface 0 HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.11 bCountryCode 0 Not supported bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 63 Report Descriptors: ** UNAVAILABLE ** Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 2Statistics: Posted by paranat — Mon Jun 03, 2024 7:03 pm — Replies 0 — Views 31