-
Notifications
You must be signed in to change notification settings - Fork 793
Description
Hello!
I got the host shield working correctly (characters get printed in Serial Monitor) with a USB keyboard using USBHIDBootKbd sketch example from the library, but I am having issues when connecting a USB Badge reader that's supposed to operate just like a keyboard.
Whenever I scan a card on the badge reader, it is supposed to print a 7 digit number and then a new line character. Badge reader works correctly when connected to a computer (tested on Mac, Windows and Raspberry Pi without any special drivers) but does not produce any output when connected over USB Host Shield to ESP8266. So, whenever I scan a card, badge reader beeps and flashes green LED (indicating that the card was read), but there is nothing printed in serial monitor.
I am wondering if you have any advice on how I could debug this issue? Details below.
Thanks for all the help!
Badge reader I use: http://www.rfideas-shop.com/en/pcprox-enroll-hid-iclass-pearl-usb-reader.html
Following are some details/pictures of my setup: #263 (comment)
Output of running USB_desc sketch:
01
--
Device descriptor:
Descriptor Length: 12
Descriptor type: 01
USB version: 0110
Device class: 00
Device Subclass: 00
Device Protocol: 00
Max.packet size: 08
Vendor ID: 0C27
Product ID: 3BFA
Revision ID: 0942
Mfg.string index: 01
Prod.string index: 02
Serial number index: 00
Number of conf.: 01
Configuration descriptor:
Total length: 0022
Num.intf: 01
Conf.value: 01
Conf.string: 00
Attr.: 80
Max.pwr: 32
Interface descriptor:
Intf.number: 00
Alt.: 00
Endpoints: 01
Intf. Class: 03
Intf. Subclass: 01
Intf. Protocol: 01
Intf.string: 00
Unknown descriptor:
Length: 09
Type: 21
Contents: 10010001224B000705
Endpoint descriptor:
Endpoint address: 81
Attr.: 03
Max.pkt size: 0008
Polling interval: 0A
Addr:1(0.0.1)
Outputs I am getting printed out when uploading sketches to the board after setting "#define ENABLE_UHS_DEBUGGING 1". The information gets printed to serial (after the "Start" log) on connecting the USB device card reader device. Nothing gets printed when I scan a key card on the card reader.
Output when using https://github.com/felis/USB_Host_Shield_2.0/blob/master/examples/HID/USBHIDBootKbd/USBHIDBootKbd.ino sketch:
Start
BM Init
Addr:01
NC:01
HID_PROTOCOL_KEYBOARD
bNumEP:02
Cnf:01
bIfaceNum:00
bNumIface:00
Interface:00
PROTOCOL SET HID_BOOT rcode:00
SET_IDLE rcode:00
RPIPE rcode:00
BM configured
Full output from Serial is here: https://pastebin.com/NCgEGfC7
Output when using https://github.com/felis/USB_Host_Shield_2.0/blob/master/examples/HID/USBHIDMultimediaKbd/USBHIDMultimediaKbd.ino sketch:
Start
HU Init
Addr:01
NC:01
Cnf:01
NumIface:01
SetIdle:00
HU configured
Output when using https://github.com/felis/USB_Host_Shield_2.0/blob/master/examples/HID/USBHIDBootKbdAndMouse/USBHIDBootKbdAndMouse.ino. sketch:
Start
BM Init
Addr:01
NC:01
HID_PROTOCOL_KEYBOARD AND MOUSE
bNumEP:02
D1
BM Init
Addr:01
NC:01
HID_PROTOCOL_KEYBOARD
bNumEP:02
Cnf:01
bIfaceNum:00
bNumIface:00
Interface:00
PROTOCOL SET HID_BOOT rcode:00
SET_IDLE rcode:00
RPIPE rcode:00
BM configured