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

    According to the HID over GATT profile specification, bonding (security mode 1, security level 2 or 3) is required. The HID over GATT profile specification can be found here

    Security mode 1, level 2: Unauthenticated pairing with encryption

    Security mode 1, level 3: Authenticated pairing with encryption

    (Bluetooth Core Specification, v. 4.2, vol 3, part C, chapter 10.2.1)

    From the sniffer log, it did look like the PC was doing a service discovery..

Reply
  • FormerMember
    0 FormerMember

    According to the HID over GATT profile specification, bonding (security mode 1, security level 2 or 3) is required. The HID over GATT profile specification can be found here

    Security mode 1, level 2: Unauthenticated pairing with encryption

    Security mode 1, level 3: Authenticated pairing with encryption

    (Bluetooth Core Specification, v. 4.2, vol 3, part C, chapter 10.2.1)

    From the sniffer log, it did look like the PC was doing a service discovery..

Children
  • This looks like it. I tried to add bonding to the existing application, and while it's currently failing a lot of the time with NRF_ERROR_INTERNAL (I've created another issue for this), when it does work, I can actually get the device to stay connected and to work as a HID device. It's just a shame there didn't appear to be any kind of error message from windows that indicated that bonding was the problem - it would have saved a lot of time!

Related