I plug USB RUBER DUKY to teensy4.1 , the hid keystokes are recognized as rawhid data!

lihaha

New member
Hi,all! I am doing a USB project, which connect a USB RUBBER DUKY and a windows coputer by teensy4.1.
But, when I plug the DUCK to USB HOST(teensy), it injects keystokes, otherwise, the teensy receives rawhid datas. why it happens:confused::confused::
Here is my code: https://github.com/lihaiyangx/teensy4.1-usb-rubber-duky-.git
here is the USBHDBG info:

port change: 10001803
connect
begin reset
port change: 10001805
port enabled
end recovery
new_Device: 12 Mbit/sec
new_Pipe
enumeration:
enumeration:
enumeration:
Device Descriptor:
12 01 00 02 00 00 00 40 6D 04 1C C3 00 02 01 02 03 01
VendorID = 046D, ProductID = C31C, Version = 0200
Class/Subclass/Protocol = 0 / 0 / 0
Number of Configurations = 1
enumeration:
enumeration:
Manufacturer: HAK5␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀
enumeration:
Product: DUCKY␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀␀
enumeration:
Serial Number: 1337␀␀␀␀␀␀␀␀
enumeration:
Config data length = 57
enumeration:
Configuration Descriptor:
09 02 39 00 02 01 00 C0 32
NumInterfaces = 2
ConfigurationValue = 1
09 04 00 00 02 08 06 50 00
Interface = 0
Number of endpoints = 2
Class/Subclass/Protocol = 8(Mass Storage) / 6(SCSI) / 80(Bulk Only)
07 05 81 02 40 00 00
Endpoint = 1 IN
Type = Bulk
Max Size = 64
Polling Interval = 0
07 05 02 02 40 00 00
Endpoint = 2 OUT
Type = Bulk
Max Size = 64
Polling Interval = 0
09 04 01 00 01 03 00 01 00
Interface = 1
Number of endpoints = 1
Class/Subclass/Protocol = 3(HID) / 0 / 1
09 21 11 01 00 01 22 3B 00
HID, 1 report descriptor
07 05 83 03 08 00 02
Endpoint = 3 IN
Type = Interrupt
Max Size = 8
Polling Interval = 2
enumeration:
HIDParser claim this=20006480
USBHub memory usage = 960
USBHub claim_device this=20008D00
USBHub memory usage = 960
USBHub claim_device this=200090C0
USBHub memory usage = 960
USBHub claim_device this=20009480
USBHub memory usage = 960
USBHub claim_device this=20009840
KeyboardController claim this=20009C00
KeyboardController claim this=20009EA0
HIDParser claim this=20006B40
HIDParser claim this=20007200
HIDParser claim this=200078C0
HIDParser claim this=20007F80
HIDParser claim this=20008640
Descriptor 4 = INTERFACE
HIDParser claim this=20006480
KeyboardController claim this=20009C00
09 04 00 00 02 08 06 50 00 07 05 81 02 40 00 00 07 05 02 02 40 00 00 09 04 01 00 01 03 00 01 00 09 21 11 01 00 01 22 3B 00 07 05 83 03 08 00 02
KeyboardController claim this=20009EA0
09 04 00 00 02 08 06 50 00 07 05 81 02 40 00 00 07 05 02 02 40 00 00 09 04 01 00 01 03 00 01 00 09 21 11 01 00 01 22 3B 00 07 05 83 03 08 00 02
HIDParser claim this=20006B40
HIDParser claim this=20007200
HIDParser claim this=200078C0
HIDParser claim this=20007F80
HIDParser claim this=20008640
Descriptor 5 = ENDPOINT
Descriptor 5 = ENDPOINT
Descriptor 4 = INTERFACE
HIDParser claim this=20006480
bInterfaceNumber = 1
bInterfaceClass = 3
bInterfaceSubClass = 0
bInterfaceProtocol = 1
HID Parser Claim: 09 04 01 00 01 03 00 01 00 09 21 11 01 00 01 22 3B 00 07 05 83 03 08 00 02
report descriptor size = 59
Single endpoint HID:
endpoint = 83
size = 8
interval = 2
new_Pipe
allocate_interrupt_pipe_bandwidth
best_bandwidth = 3, at offset = 0, shift= 0
Descriptor 33 = HID
Descriptor 5 = ENDPOINT
*** Device HID1 46d:c31c - connected ***
manufacturer: HAK5
product: DUCKY
control callback (hid)
05 01 09 06 A1 01 05 07 19 E0 29 E7 15 00 25 01 75 01 95 08 81 02 81 01 19 00 29 65 15 00 25 65 75 08 95 06 81 00 05 08 19 01 29 05 15 00 25 01 75 01 95 05 91 02 95 03 91 01 C0
mesg = 22000681
got report descriptor
Found top level collection 10006
find_driver
driver 20009C0C
driver 20009EAC
driver 2000B5F8
driver 2000B654
driver 2000A140
Rawhid Claim: 46d:c31c usage: 10006
*** Device RAWHID1 46d:c31c - connected ***
manufacturer: HAK5
product: DUCKY
RawHIDController::hid_process_in_data: 10006
rawhid data(dev->t4.1): size:0x8 usage:10006
rawhid data(dev->t4.1):
08 00 00 00 00 00 00 00 : ........
RawHIDController::hid_process_in_data: 10006
rawhid data(dev->t4.1): size:0x8 usage:10006
rawhid data(dev->t4.1):
08 00 15 00 00 00 00 00 : ........

thanks!
 
Back
Top