Author Topic: Does rearranging an HID Report Descr merit bcdDevice change?  (Read 9363 times)

grantb5

  • Member
  • ***
  • Posts: 34
Does rearranging an HID Report Descr merit bcdDevice change?
« on: February 08, 2016, 02:41:25 pm »
I tweaked an HID Report Descriptor to mollify an HID parsing error in one of the testing tools.  Mostly it was rearranging.  I thought pretty minor stuff. One of my users in the field reported issues unless he uninstalled the driver from Device Manager and replugged the device (which of course reloaded the driver).  I can show full details, but I was wondering what merits a bump of the bcdDevice?  And if I had bumped it before sending it to this user, would it have made a difference?

Before
Code: [Select]
  0x05, 0x01,       // usage page (generic desktop)
  0x09, 0x06,       // usage (keyboard)
  0xA1, 0x01,       // collection (application)

  0x05, 0x07,       // usage page( key codes)
  0x19, 0xE0,       // usage minimum (224)
  0x29, 0xE7,       // usage maximum (231)
  0x15, 0x00,       // logical minimum (0)
  0x25, 0x01,       // logical maximum (1)
  0x75, 0x01,       // report size (1 bit)
  0x95, 0x08,       // report count (8 bytes)
  0x81, 0x02,       // input report (data, variable, absolute) - Modifier bytes

  0x95, 0x01,       // report count (1 byte)
  0x75, 0x08,       // report size (8 bits)
  0x81, 0x01,       // input report (constant) - Input Report padding.

  0x95, 0x06,       // report count (6)
  0x75, 0x08,       // report size (8)
  0x15, 0x00,       // logical minimum (0)
  0x26, 0x93, 0x00, // logical maximum (147).
  0x05, 0x07,       // usage page (key codes)
  0x19, 0x00,       // usage minimum (0)                         
  0x2A, 0x93, 0x00, // usage maximum (147) 
  0x81, 0x00,       // input report (data, array) - Keyboard report

  0x95, 0x05,       // report count (5)
  0x75, 0x01,       // report size (1)
  0x05, 0x08,       // usage page (LEDs)
  0x19, 0x01,       // usage minimum (1)
  0x29, 0x05,       // usage maximum (5)
  0x91, 0x02,       // output report (data, variable, absolute) - LED report
 
  0x95, 0x01,       // report count (1)
  0x75, 0x03,       // report size (3)
  0x91, 0x01,       // output report (constant) - LED padding


  0x09, 0x03,       // Usage (vendor defined)
  0x75, 0x08,       // Report size (8 bits)
  0x95, 0x05,       // Report count (5 fields)
  0xB1, 0x02,       // NEW Feature Report (Data, Variable, Absolute)


  0xC0              // end collection

After:
Code: [Select]
  0x05, 0x01,       // usage page (generic desktop)
  0x09, 0x06,       // usage (keyboard)
  0xA1, 0x01,       // collection (application)

  0x05, 0x07,       // usage page( key codes)
  0x19, 0xE0,       // usage minimum (224)
  0x29, 0xE7,       // usage maximum (231)
  0x15, 0x00,       // logical minimum (0)
  0x25, 0x01,       // logical maximum (1)
  0x75, 0x01,       // report size (1 bit)
  0x95, 0x08,       // report count (8 bytes)
  0x81, 0x02,       // input report (data, variable, absolute) - Modifier bytes

  0x95, 0x01,       // report count (1 byte)
  0x75, 0x08,       // report size (8 bits)
  0x81, 0x01,       // input report (constant) - Input Report padding.

  0x95, 0x03, //0x05,  // report count (5)  [*]
  0x75, 0x01,       // report size (1)
  0x05, 0x08,       // usage page (LEDs)
  0x19, 0x01,       // usage minimum (1)
  0x29, 0x03, //0x05,  // usage maximum (5) [*]
  0x91, 0x02,       // output report (data, variable, absolute) - LED report
 
  0x95, 0x01,       // report count (1)
  0x75, 0x05, //0x03,  // report size (3)   [*]
  0x91, 0x01,       // output report (constant) - LED padding

  0x95, 0x06,       // report count (6)
  0x75, 0x08,       // report size (8)
  0x15, 0x00,       // logical minimum (0)
  0x26, 0xFF, 0x00, // logical maximum (255)  [*]
  0x05, 0x07,       // usage page (key codes)
  0x19, 0x00,       // usage minimum (0)                         
  0x2A, 0xFF, 0x00, // usage maximum (255)    [*]
  0x81, 0x00,       // input report (data, array) - Keyboard report


  0x09, 0x03,       // Usage (vendor defined)
  0x75, 0x08,       // Report size (8 bits)
  0x95, 0x05,       // Report count (5 fields)
  0xB1, 0x02,       // NEW Feature Report (Data, Variable, Absolute)


  0xC0              // end collection

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Does rearranging an HID Report Descr merit bcdDevice change?
« Reply #1 on: February 08, 2016, 02:46:04 pm »
Windows caches descriptors so if you change something you need to either change the Product ID or version number or remove and reinstall the device as your user did.

grantb5

  • Member
  • ***
  • Posts: 34
Re: Does rearranging an HID Report Descr merit bcdDevice change?
« Reply #2 on: February 08, 2016, 03:04:25 pm »
Thanks again!