This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Windows 10 Driver Error when connecting HID device

Hi,

I'm having some issues when trying to make a HID device work with Windows 10. It says 'Connected' but then changes to 'Device Error' a few seconds later. I get 'Error code 10' mentioned in Device Manager, and 'Problem 0xA, Problem Status 0xC000000D' (which could be 'invalid parameters') from mshidumdf.

  • it works fine on Mac OS and Android
  • if I try and pair the same device, but without the HID service, then it stays 'Connected' and never goes to 'Driver error'.
  • The example code (ble_app_hids_keyboard_pca10040_s132.hex) works fine

To test, you can just load the following file onto the nRF52 devkit: www.espruino.com/.../espruino_1v87_nrf52832.hex (here: espruino_1v87_nrf52832.hex)

And then connect to serial at 9600 baud with a terminal and copy/paste the following:

report = new Uint8Array([
0x05,0x01,0x09,0x06,0xA1,0x01,0x05,0x07,0x19,0xe0,0x29,0xe7,0x15,0x00,0x25,0x01,0x75,
0x01,0x95,0x08,0x81,0x02,0x95,0x01,0x75,0x08,0x81,0x01,0x95,0x05,0x75,0x01,0x05,0x08,
0x19,0x01,0x29,0x05,0x91,0x02,0x95,0x01,0x75,0x03,0x91,0x01,0x95,0x06,0x75,0x08,0x15,
0x00,0x25,0x65,0x05,0x07,0x19,0x00,0x29,0x65,0x81,0x00,0x09,0x05,0x15,0x00,0x26,0xFF,
0x00,0x75,0x08,0x95,0x02,0xB1,0x02,0xC0]);

NRF.setServices(undefined, { hid : report, uart: false });
Serial1.setConsole(1); // force console to stay on serial

function pressA() {
  NRF.sendHIDReport([0,0,4,0,0,0,0,0], function() {
    NRF.sendHIDReport([0,0,0,0,0,0,0,0]);
  });
}

I've removed comments from the HID report, but it is identical to the one from the HID example. Apart from making it scriptable via JavaScript the underlying code is pretty much identical (and works on other platforms).

The only thing that isn't is that I'm not using peer manager, or bonding. Could that be the issue? Seems strange that it works fine on other devices though.

Apart from sniffing the connection (which I haven't had much success with to date), is there any way to find out why Windows has problems with it?

thanks!

Parents
  • FormerMember
    0 FormerMember

    I have tested the .hex file and connected it to a windows 10 PC, here is what I got: a:101658_devzone_sniffer_trace.pcapng

    For some reason, the copy-pasting into the terminal did not work. I means that the sniffer log is from a connection between the pc and the nRF52-DK, without any other interaction.

    As you can see in the sniffer log, there are two connections:

    In the first one (line/no. 257) , the master (the PC) sends a pairing request, and the slave (nRF52-DK) responds with "no bonding, no MITM". After that the master sends a "pairing failed packet", and shortly later terminate the connection.

    The second connection is initiated shortly after the disconnection. This time, the master doesn't send any pairing request, but it performs a service discovery, and the devices stay connected transmitting empty PDUs.

Reply
  • FormerMember
    0 FormerMember

    I have tested the .hex file and connected it to a windows 10 PC, here is what I got: a:101658_devzone_sniffer_trace.pcapng

    For some reason, the copy-pasting into the terminal did not work. I means that the sniffer log is from a connection between the pc and the nRF52-DK, without any other interaction.

    As you can see in the sniffer log, there are two connections:

    In the first one (line/no. 257) , the master (the PC) sends a pairing request, and the slave (nRF52-DK) responds with "no bonding, no MITM". After that the master sends a "pairing failed packet", and shortly later terminate the connection.

    The second connection is initiated shortly after the disconnection. This time, the master doesn't send any pairing request, but it performs a service discovery, and the devices stay connected transmitting empty PDUs.

Children
Related