1

I can't believe I am stumped by this, but this is my issue and I can't see any other solution for this anywhere.

I have an official Arduino Leonardo loaded up with the following code:

void setup() {
  Keyboard.begin();
}

void loop() {
  char keyToPress = random('A', 'Z'); // choose a random letter between 'A' and 'Z'
  delay(1900);
  Keyboard.press(keyToPress); 
  delay(100);
  Keyboard.release(keyToPress); // overall loop time is ~2s, with a 100mS keypress length
}

On OSX and Linux, I get a predictable output - random capital letters typed by a keyboard, two seconds apart: FWTDXJP etc.

However, on Windows 7(x64), I get... nothing. I have the Leonardo appear correctly as a CDC COM port, drivers were installed from the latest 1.6.5 installer on their website. I have tried uninstalling the Leonardo in device manager while checking the "remove software" box so as to be sure that the driver I install is the one being used.

Has anyone seen this before? A search of the Arduino forum reveals some people having the same issue, a bit of a discussion and then usually "I don't know what I did but the problem has gone now".

This is the output from USB Device Tree Viewer, which seems to correctly show the USB HID descriptor:

    =========================== USB Port2 ===========================

Connection Status        : 0x01 (Device is connected)
Port Chain               : 1-2

      ======================== USB Device ========================

        +++++++++++++++++ Device Information ++++++++++++++++++
Friendly Name            : Arduino Leonardo (COM3)
Device Description       : Arduino Leonardo
Device Path              : \\?\usb#vid_2341&pid_8036#5&18f54cb7&0&2#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
Device ID                : USB\VID_2341&PID_8036\5&18F54CB7&0&2
Driver KeyName           : {4d36e978-e325-11ce-bfc1-08002be10318}\0001 (GUID_DEVCLASS_PORTS)
Driver                   : C:\Windows\system32\DRIVERS\usbser.sys (Version: 6.1.7601.18247  Date: 2013-08-29)
Driver Inf               : C:\Windows\inf\oem6.inf
Legacy BusType           : PNPBus
Class                    : Ports
Service                  : usbser
Enumerator               : USB
Location Info            : Port_#0002.Hub_#0001
Location IDs             : PCIROOT(0)#PCI(0600)#USBROOT(0)#USB(2)
Container ID             : {2d5fa232-297c-11e5-9565-080027ccdb00}
Manufacturer Info        : Arduino LLC (www.arduino.cc)
Capabilities             : 0x84 (Removable, SurpriseRemovalOK)
Address                  : 2
Problem Code             : 0
Power State              : D0 (supported: D0, D3, wake from D0)
COM-Port                 : COM3 (\Device\USBPDO-3)

        ---------------- Connection Information ---------------
Connection Index         : 0x02 (2)
Connection Status        : 0x01 (DeviceConnected)
Current Config Value     : 0x01
Device Address           : 0x02 (2)
Is Hub                   : 0x00 (no)
Number Of Open Pipes     : 0x04 (4)
Device Bus Speed         : 0x01 (Full-Speed)
Pipe0ScheduleOffset      : 0x04 (4)
Pipe1ScheduleOffset      : 0x00 (0)
Pipe2ScheduleOffset      : 0x00 (0)
Pipe3ScheduleOffset      : 0x00 (0)

        ------------------ Device Descriptor ------------------
bLength                  : 0x12 (18 bytes)
bDescriptorType          : 0x01 (Device Descriptor)
bcdUSB                   : 0x200 (USB Version 2.00)
bDeviceClass             : 0x02 (Communications and CDC Control)
bDeviceSubClass          : 0x00
bDeviceProtocol          : 0x00
bMaxPacketSize0          : 0x40 (64 bytes)
idVendor                 : 0x2341
idProduct                : 0x8036
bcdDevice                : 0x100
iManufacturer            : 0x01 (String Descriptor 1)
 Language 0x0409         : "Arduino LLC"
iProduct                 : 0x02 (String Descriptor 2)
 Language 0x0409         : "Arduino Leonardo"
iSerialNumber            : 0x00 (No String Descriptor)
bNumConfigurations       : 0x01

        ------------------ String Descriptors -----------------
             ------ String Descriptor 0 ------
bLength                  : 0x04 (4 bytes)
bDescriptorType          : 0x03 (String Descriptor)
Language ID[0]           : 0x0409 (English - United States)
             ------ String Descriptor 1 ------
bLength                  : 0x18 (24 bytes)
bDescriptorType          : 0x03 (String Descriptor)
Language 0x0409          : "Arduino LLC"
             ------ String Descriptor 2 ------
bLength                  : 0x22 (34 bytes)
bDescriptorType          : 0x03 (String Descriptor)
Language 0x0409          : "Arduino Leonardo"

        -------------- Configuration Descriptor ---------------
bLength                  : 0x09 (9 bytes)
bDescriptorType          : 0x02 (Configuration Descriptor)
wTotalLength             : 0x0064 (100 bytes)
bNumInterfaces           : 0x03
bConfigurationValue      : 0x01
iConfiguration           : 0x00 (No String Descriptor)
bmAttributes             : 0x80
 D7: Reserved, set 1     : 0x01
 D6: Self Powered        : 0x00 (no)
 D5: Remote Wakeup       : 0x00 (no)
 D4..0: Reserved, set 0  : 0x00
MaxPower                 : 0xFA (500 mA)

        ------------------- IAD Descriptor --------------------
bLength                  : 0x08 (8 bytes)
bDescriptorType          : 0x0B
bFirstInterface          : 0x00
bInterfaceCount          : 0x02
bFunctionClass           : 0x02 (Communications and CDC Control)
bFunctionSubClass        : 0x02
bFunctionProtocol        : 0x01
iFunction                : 0x00 (No String Descriptor)

        ---------------- Interface Descriptor -----------------
bLength                  : 0x09 (9 bytes)
bDescriptorType          : 0x04 (Interface Descriptor)
bInterfaceNumber         : 0x00
bAlternateSetting        : 0x00
bNumEndpoints            : 0x01 (1 Endpoint)
bInterfaceClass          : 0x02 (Communications and CDC Control)
bInterfaceSubClass       : 0x02
bInterfaceProtocol       : 0x00
iInterface               : 0x00 (No String Descriptor)

        -------------- CDC Interface Descriptor ---------------
bFunctionLength          : 0x05 (5 bytes)
bDescriptorType          : 0x24 (Interface)
bDescriptorSubType       : 0x00 (Header Functional Descriptor)
bcdCDC                   : 0x110 (CDC Version 1.10)

        -------------- CDC Interface Descriptor ---------------
bFunctionLength          : 0x05 (5 bytes)
bDescriptorType          : 0x24 (Interface)
bDescriptorSubType       : 0x01 (Call Management Functional Descriptor)
bmCapabilities           : 0x01
bDataInterface           : 0x01

        -------------- CDC Interface Descriptor ---------------
bFunctionLength          : 0x04 (4 bytes)
bDescriptorType          : 0x24 (Interface)
bDescriptorSubType       : 0x02 (Abstract Control Management Functional Descriptor)
bmCapabilities           : 0x06

        -------------- CDC Interface Descriptor ---------------
bFunctionLength          : 0x05 (5 bytes)
bDescriptorType          : 0x24 (Interface)
bDescriptorSubType       : 0x06 (Union Functional Descriptor)
bControlInterface        : 0x00
bSubordinateInterface[0] : 0x01

        ----------------- Endpoint Descriptor -----------------
bLength                  : 0x07 (7 bytes)
bDescriptorType          : 0x05 (Endpoint Descriptor)
bEndpointAddress         : 0x81 (Direction=IN  EndpointID=1)
bmAttributes             : 0x03 (TransferType=Interrupt)
wMaxPacketSize           : 0x0010 (16 bytes) (16 bytes)
bInterval                : 0x40 (64 ms)

        ---------------- Interface Descriptor -----------------
bLength                  : 0x09 (9 bytes)
bDescriptorType          : 0x04 (Interface Descriptor)
bInterfaceNumber         : 0x01
bAlternateSetting        : 0x00
bNumEndpoints            : 0x02 (2 Endpoints)
bInterfaceClass          : 0x0A (CDC-Data)
bInterfaceSubClass       : 0x00
bInterfaceProtocol       : 0x00
iInterface               : 0x00 (No String Descriptor)

        ----------------- Endpoint Descriptor -----------------
bLength                  : 0x07 (7 bytes)
bDescriptorType          : 0x05 (Endpoint Descriptor)
bEndpointAddress         : 0x02 (Direction=OUT  EndpointID=2)
bmAttributes             : 0x02 (TransferType=Bulk)
wMaxPacketSize           : 0x0040 (64 bytes) (64 bytes)
bInterval                : 0x00 (ignored)

        ----------------- Endpoint Descriptor -----------------
bLength                  : 0x07 (7 bytes)
bDescriptorType          : 0x05 (Endpoint Descriptor)
bEndpointAddress         : 0x83 (Direction=IN  EndpointID=3)
bmAttributes             : 0x02 (TransferType=Bulk)
wMaxPacketSize           : 0x0040 (64 bytes) (64 bytes)
bInterval                : 0x00 (ignored)

        ---------------- Interface Descriptor -----------------
bLength                  : 0x09 (9 bytes)
bDescriptorType          : 0x04 (Interface Descriptor)
bInterfaceNumber         : 0x02
bAlternateSetting        : 0x00
bNumEndpoints            : 0x01 (1 Endpoint)
bInterfaceClass          : 0x03 (HID - Human Interface Device)
bInterfaceSubClass       : 0x00 (None)
bInterfaceProtocol       : 0x00 (None)
iInterface               : 0x00 (No String Descriptor)

        ------------------- HID Descriptor --------------------
bLength                  : 0x09 (9 bytes)
bDescriptorType          : 0x21 (HID Descriptor)
bcdHID                   : 0x0101 (HID Version 1.01)
bCountryCode             : 0x00 (00 = not localized)
bNumDescriptors          : 0x01
Descriptor 1:
bDescriptorType          : 0x22 (Class=Report)
wDescriptorLength        : 0x0065 (101 bytes)
  05 01             Usage Page (Generic Desktop Controls)
  09 02             Usage (Mouse)
  A1 01             Collection (Application)
  09 01               Usage (Pointer)
  A1 00               Collection (Physical)
  85 01                 Report ID (0x01)
  05 09                 Usage Page (Buttons)
  19 01                 Usage Minimum (1)
  29 03                 Usage Maximum (3)
  15 00                 Logical Minimum (0)
  25 01                 Logical Maximum (1)
  95 03                 Report Count (3)
  75 01                 Report Size (1)
  81 02                 Input (Var)
  95 01                 Report Count (1)
  75 05                 Report Size (5)
  81 03                 Input (Const, Var)
  05 01                 Usage Page (Generic Desktop Controls)
  09 30                 Usage (Direction-X)
  09 31                 Usage (Direction-Y)
  09 38                 Usage (Wheel)
  15 81                 Logical Minimum (-127)
  25 7F                 Logical Maximum (127)
  75 08                 Report Size (8)
  95 03                 Report Count (3)
  81 06                 Input (Var, Rel)
  C0                  End Collection
  C0                End Collection
  05 01             Usage Page (Generic Desktop Controls)
  09 06             Usage (Keyboard)
  A1 01             Collection (Application)
  85 02               Report ID (0x02)
  05 07               Usage Page (Keyboard)
  19 E0               Usage Minimum (-32)
  29 E7               Usage Maximum (-25)
  15 00               Logical Minimum (0)
  25 01               Logical Maximum (1)
  75 01               Report Size (1)
  95 08               Report Count (8)
  81 02               Input (Var)
  95 01               Report Count (1)
  75 08               Report Size (8)
  81 03               Input (Const, Var)
  95 06               Report Count (6)
  75 08               Report Size (8)
  15 00               Logical Minimum (0)
  25 65               Logical Maximum (101)
  05 07               Usage Page (Keyboard)
  19 00               Usage Minimum (0)
  29 65               Usage Maximum (101)
  81 00               Input ()
  C0                End Collection

        ----------------- Endpoint Descriptor -----------------
bLength                  : 0x07 (7 bytes)
bDescriptorType          : 0x05 (Endpoint Descriptor)
bEndpointAddress         : 0x84 (Direction=IN  EndpointID=4)
bmAttributes             : 0x03 (TransferType=Interrupt)
wMaxPacketSize           : 0x0040 (64 bytes) (64 bytes)
bInterval                : 0x01 (1 ms)

And this is a screenshot from Device Manager, showing just one HID device (my keyboard / trackpad on my laptop):

Device Manager screenshot

Any ideas? I have obviously tried the example USB keyboard code from the Arduino IDE too - my code was just to get a minimum system to simplify testing. All help gratefully received.

  • What does Device Manager have to say about it? – Ignacio Vazquez-Abrams Aug 13 '15 at 15:55
  • @IgnacioVazquez-Abrams I have added a Device Manager screenshot - Leonardo shows up as CDC, nothing new in HID. – stefandz Aug 13 '15 at 15:59
  • @stefandz Can you please confirm a few things for me. 1. Have you tried the same board on a different win7 machine? 2. Have you had all of your updates installed? 3. Were the current drivers installed automatically or are they from arduino? – evolutionizer Aug 16 '15 at 17:26
  • 1. Yup, and a Windows 8.1 machine 2. Yes, on both machines 3. They were installed by the Arduino installer and then picked up automatically by Windows – stefandz Aug 16 '15 at 17:30
  • So you are saying that it didnt work on any windows machine correct? Have you also tried re uploading the bootloader (doubt it is the issue tho) – evolutionizer Aug 16 '15 at 18:18
2
+50

Let me try to help. This isn't a definitive "answer" but I need to post screenshots etc., so I am making it an answer.

I tried your code with my Arduino Micro. I believe it is the same as the Leonardo except for a byte difference in the bootloader identification (for the USB device).

First the good bad news. It worked under Windows 7. And let me tell you something: It is incredibly annoying to try to use the Windows 7 device manager when something is typing a key every two seconds! I recompiled it to type a key every minute to save my sanity.

I don't usually use Windows 7 (I use Ubuntu normally) so the device driver was not installed. It offered to install it, I told it to skip going to Windows Update, and it installed it thus:

USB installation

Note that I did not use the device drivers (if any) supplied with the Arduino installation. I never got asked that question.


Locating the device in the Device Manager I see I got Windows drivers:

Driver names


It showed up under Human Interface Devices as a USB Input Device:

USB input device


These were the hardware IDs:

Hardware IDs


It also showed up as a Composite Device:

USB composite device


This was the report from the program you linked:

    =========================== USB Port1 ===========================

Connection Status        : 0x01 (Device is connected)
Port Chain               : 1-1-3-1

      ======================== USB Device ========================

        +++++++++++++++++ Device Information ++++++++++++++++++
Device Description       : USB Composite Device
Device Path              : \\?\usb#vid_2341&pid_8037#7&171b751b&0&1#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
Device ID                : USB\VID_2341&PID_8037\7&171B751B&0&1
Driver KeyName           : {36fc9e60-c465-11cf-8056-444553540000}\0026 (GUID_DEVCLASS_USB)
Driver                   : C:\Windows\system32\DRIVERS\usbccgp.sys (Version: 6.1.7601.18328  Date: 2013-11-27)
Driver Inf               : C:\Windows\inf\usb.inf
Legacy BusType           : PNPBus
Class                    : USB
Service                  : usbccgp
Enumerator               : USB
Location Info            : Port_#0001.Hub_#0005
Location IDs             : PCIROOT(0)#PCI(1D00)#USBROOT(0)#USB(1)#USB(3)#USB(1)
Container ID             : {821d8eeb-43cd-11e5-b4e1-10c37b50593b}
Manufacturer Info        : (Standard USB Host Controller)
Capabilities             : 0x84 (Removable, SurpriseRemovalOK)
Address                  : 1
Problem Code             : 0
Power State              : D0 (supported: D0, D2, D3, wake from D0, wake from D2)
 Child Device 1          : Arduino Micro
  Device ID              : USB\VID_2341&PID_8037&MI_00\8&6467A9E&0&0000
  Class                  : Ports
  COM-Port               : COM8 (\Device\USBSER000)
 Child Device 2          : USB Input Device
  Device ID              : USB\VID_2341&PID_8037&MI_02\8&6467A9E&0&0002
  Class                  : HIDClass
   Child Device 1        : HID-compliant mouse
    Device ID            : HID\VID_2341&PID_8037&MI_02&COL01\9&F900E83&0&0000
    Class                : Mouse
   Child Device 2        : HID Keyboard Device
    Device ID            : HID\VID_2341&PID_8037&MI_02&COL02\9&F900E83&0&0001
    Class                : Keyboard

        ---------------- Connection Information ---------------
Connection Index         : 0x01 (1)
Connection Status        : 0x01 (DeviceConnected)
Current Config Value     : 0x01
Device Address           : 0x08 (8)
Is Hub                   : 0x00 (no)
Number Of Open Pipes     : 0x04 (4)
Device Bus Speed         : 0x01 (Full-Speed)
Pipe0ScheduleOffset      : 0x01 (1)
Pipe1ScheduleOffset      : 0x00 (0)
Pipe2ScheduleOffset      : 0x00 (0)
Pipe3ScheduleOffset      : 0x00 (0)

        ------------------ Device Descriptor ------------------
bLength                  : 0x12 (18 bytes)
bDescriptorType          : 0x01 (Device Descriptor)
bcdUSB                   : 0x200 (USB Version 2.00)
bDeviceClass             : 0x00 (defined by the interface descriptors)
bDeviceSubClass          : 0x00
bDeviceProtocol          : 0x00
bMaxPacketSize0          : 0x40 (64 bytes)
idVendor                 : 0x2341
idProduct                : 0x8037
bcdDevice                : 0x100
iManufacturer            : 0x01 (String Descriptor 1)
 Language 0x0409         : "Arduino LLC"
iProduct                 : 0x02 (String Descriptor 2)
 Language 0x0409         : "Arduino Micro"
iSerialNumber            : 0x00 (No String Descriptor)
bNumConfigurations       : 0x01

        ------------------ String Descriptors -----------------
             ------ String Descriptor 0 ------
bLength                  : 0x04 (4 bytes)
bDescriptorType          : 0x03 (String Descriptor)
Language ID[0]           : 0x0409 (English - United States)
             ------ String Descriptor 1 ------
bLength                  : 0x18 (24 bytes)
bDescriptorType          : 0x03 (String Descriptor)
Language 0x0409          : "Arduino LLC"
             ------ String Descriptor 2 ------
bLength                  : 0x1C (28 bytes)
bDescriptorType          : 0x03 (String Descriptor)
Language 0x0409          : "Arduino Micro"

        -------------- Configuration Descriptor ---------------
bLength                  : 0x09 (9 bytes)
bDescriptorType          : 0x02 (Configuration Descriptor)
wTotalLength             : 0x0064 (100 bytes)
bNumInterfaces           : 0x03
bConfigurationValue      : 0x01
iConfiguration           : 0x00 (No String Descriptor)
bmAttributes             : 0x80
 D7: Reserved, set 1     : 0x01
 D6: Self Powered        : 0x00 (no)
 D5: Remote Wakeup       : 0x00 (no)
 D4..0: Reserved, set 0  : 0x00
MaxPower                 : 0xFA (500 mA)

        ------------------- IAD Descriptor --------------------
bLength                  : 0x08 (8 bytes)
bDescriptorType          : 0x0B
bFirstInterface          : 0x00
bInterfaceCount          : 0x02
bFunctionClass           : 0x02 (Communications and CDC Control)
bFunctionSubClass        : 0x02
bFunctionProtocol        : 0x01
iFunction                : 0x00 (No String Descriptor)

        ---------------- Interface Descriptor -----------------
bLength                  : 0x09 (9 bytes)
bDescriptorType          : 0x04 (Interface Descriptor)
bInterfaceNumber         : 0x00
bAlternateSetting        : 0x00
bNumEndpoints            : 0x01 (1 Endpoint)
bInterfaceClass          : 0x02 (Communications and CDC Control)
bInterfaceSubClass       : 0x02
bInterfaceProtocol       : 0x00
iInterface               : 0x00 (No String Descriptor)

        -------------- CDC Interface Descriptor ---------------
bFunctionLength          : 0x05 (5 bytes)
bDescriptorType          : 0x24 (Interface)
bDescriptorSubType       : 0x00 (Header Functional Descriptor)
bcdCDC                   : 0x110 (CDC Version 1.10)

        -------------- CDC Interface Descriptor ---------------
bFunctionLength          : 0x05 (5 bytes)
bDescriptorType          : 0x24 (Interface)
bDescriptorSubType       : 0x01 (Call Management Functional Descriptor)
bmCapabilities           : 0x01
bDataInterface           : 0x01

        -------------- CDC Interface Descriptor ---------------
bFunctionLength          : 0x04 (4 bytes)
bDescriptorType          : 0x24 (Interface)
bDescriptorSubType       : 0x02 (Abstract Control Management Functional Descriptor)
bmCapabilities           : 0x06

        -------------- CDC Interface Descriptor ---------------
bFunctionLength          : 0x05 (5 bytes)
bDescriptorType          : 0x24 (Interface)
bDescriptorSubType       : 0x06 (Union Functional Descriptor)
bControlInterface        : 0x00
bSubordinateInterface[0] : 0x01

        ----------------- Endpoint Descriptor -----------------
bLength                  : 0x07 (7 bytes)
bDescriptorType          : 0x05 (Endpoint Descriptor)
bEndpointAddress         : 0x81 (Direction=IN  EndpointID=1)
bmAttributes             : 0x03 (TransferType=Interrupt)
wMaxPacketSize           : 0x0010 (16 bytes) (16 bytes)
bInterval                : 0x40 (64 ms)

        ---------------- Interface Descriptor -----------------
bLength                  : 0x09 (9 bytes)
bDescriptorType          : 0x04 (Interface Descriptor)
bInterfaceNumber         : 0x01
bAlternateSetting        : 0x00
bNumEndpoints            : 0x02 (2 Endpoints)
bInterfaceClass          : 0x0A (CDC-Data)
bInterfaceSubClass       : 0x00
bInterfaceProtocol       : 0x00
iInterface               : 0x00 (No String Descriptor)

        ----------------- Endpoint Descriptor -----------------
bLength                  : 0x07 (7 bytes)
bDescriptorType          : 0x05 (Endpoint Descriptor)
bEndpointAddress         : 0x02 (Direction=OUT  EndpointID=2)
bmAttributes             : 0x02 (TransferType=Bulk)
wMaxPacketSize           : 0x0040 (64 bytes) (64 bytes)
bInterval                : 0x00 (ignored)

        ----------------- Endpoint Descriptor -----------------
bLength                  : 0x07 (7 bytes)
bDescriptorType          : 0x05 (Endpoint Descriptor)
bEndpointAddress         : 0x83 (Direction=IN  EndpointID=3)
bmAttributes             : 0x02 (TransferType=Bulk)
wMaxPacketSize           : 0x0040 (64 bytes) (64 bytes)
bInterval                : 0x00 (ignored)

        ---------------- Interface Descriptor -----------------
bLength                  : 0x09 (9 bytes)
bDescriptorType          : 0x04 (Interface Descriptor)
bInterfaceNumber         : 0x02
bAlternateSetting        : 0x00
bNumEndpoints            : 0x01 (1 Endpoint)
bInterfaceClass          : 0x03 (HID - Human Interface Device)
bInterfaceSubClass       : 0x00 (None)
bInterfaceProtocol       : 0x00 (None)
iInterface               : 0x00 (No String Descriptor)

        ------------------- HID Descriptor --------------------
bLength                  : 0x09 (9 bytes)
bDescriptorType          : 0x21 (HID Descriptor)
bcdHID                   : 0x0101 (HID Version 1.01)
bCountryCode             : 0x00 (00 = not localized)
bNumDescriptors          : 0x01
Descriptor 1:
bDescriptorType          : 0x22 (Class=Report)
wDescriptorLength        : 0x0065 (101 bytes)
  05 01             Usage Page (Generic Desktop Controls)
  09 02             Usage (Mouse)
  A1 01             Collection (Application)
  09 01               Usage (Pointer)
  A1 00               Collection (Physical)
  85 01                 Report ID (0x01)
  05 09                 Usage Page (Buttons)
  19 01                 Usage Minimum (1)
  29 03                 Usage Maximum (3)
  15 00                 Logical Minimum (0)
  25 01                 Logical Maximum (1)
  95 03                 Report Count (3)
  75 01                 Report Size (1)
  81 02                 Input (Var)
  95 01                 Report Count (1)
  75 05                 Report Size (5)
  81 03                 Input (Const, Var)
  05 01                 Usage Page (Generic Desktop Controls)
  09 30                 Usage (Direction-X)
  09 31                 Usage (Direction-Y)
  09 38                 Usage (Wheel)
  15 81                 Logical Minimum (-127)
  25 7F                 Logical Maximum (127)
  75 08                 Report Size (8)
  95 03                 Report Count (3)
  81 06                 Input (Var, Rel)
  C0                  End Collection
  C0                End Collection
  05 01             Usage Page (Generic Desktop Controls)
  09 06             Usage (Keyboard)
  A1 01             Collection (Application)
  85 02               Report ID (0x02)
  05 07               Usage Page (Keyboard)
  19 E0               Usage Minimum (-32)
  29 E7               Usage Maximum (-25)
  15 00               Logical Minimum (0)
  25 01               Logical Maximum (1)
  75 01               Report Size (1)
  95 08               Report Count (8)
  81 02               Input (Var)
  95 01               Report Count (1)
  75 08               Report Size (8)
  81 03               Input (Const, Var)
  95 06               Report Count (6)
  75 08               Report Size (8)
  15 00               Logical Minimum (0)
  25 65               Logical Maximum (101)
  05 07               Usage Page (Keyboard)
  19 00               Usage Minimum (0)
  29 65               Usage Maximum (101)
  81 00               Input ()
  C0                End Collection

        ----------------- Endpoint Descriptor -----------------
bLength                  : 0x07 (7 bytes)
bDescriptorType          : 0x05 (Endpoint Descriptor)
bEndpointAddress         : 0x84 (Direction=IN  EndpointID=4)
bmAttributes             : 0x03 (TransferType=Interrupt)
wMaxPacketSize           : 0x0040 (64 bytes) (64 bytes)
bInterval                : 0x01 (1 ms)

Hopefully you can compare this to your situation and see what is different.


(Edited to add)

I tried today on my son's Windows 7 PC, which I don't think had Arduino ever installed on it. Also I used my Leonardo instead of the Micro, just to be sure. First Windows tried to install the device drivers:

Leonard device driver install


Then it only succeeded with the composite device and the keyboard:

Leonard device driver install - keyboard


However the keyboard worked (eg. in Notepad).

Input device description


It shows up in the Device Manager:

Peripheral ID

  • Thank you very much for this @nick - I'm going to dig into this. You're completely correct about the keypresses being irritating! May I ask - was Arduino installed on the Windows 7 machine before you plugged in the micro or not? Trying to work backwards to find the actual .inf / .cat file that was used by the OS. – stefandz Aug 16 '15 at 9:59
  • Yes, I had 1.0.6 installed for some reason. However as you know the device drivers themselves are triggered by inserting the USB device. If you can't resolve it with what I posted above, I'll try inserting the Micro into my son's Windows 7 machine and see what happens. I don't think that has Arduino on it. so as to be sure that the driver I install is the one being used. - when you wrote that, did you force the install of the Arduino driver, or let Windows install its one? – Nick Gammon Aug 16 '15 at 20:35
  • See further screen shots and testing in amended reply. – Nick Gammon Aug 16 '15 at 22:14
  • Very interesting indeed. So my next move is to Uninstall the device I have from Device Manager while checking the "remove software" box and see if that gets me to the same point you reached here. If it doesn't, I'll try a VM with a fresh Windows install. Thanks @Nick! – stefandz Aug 16 '15 at 22:18
  • thanks for all of your assistance. For whatever reason, I can't recreate the same results as on your son's computer, but I do now have a definitive way out of this thanks to all of your help. Effectively, you need to make sure you install a generic composite device driver for the Leonardo, which then breaks out the other Interface Descriptors (HID, CDC, Mouse, MIDI etc). I am going to screenshot all the steps and answer my own question, but without your assistance this would not have been possible! – stefandz Aug 18 '15 at 13:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.