none
Windows Sensor property: HID_USAGE_SENSOR_PROPERTY_SENSOR_SERIAL_NUMBER is blank RRS feed

  • General discussion

  • According to the "HID Sensors Usages Annotations for Windows HID Sensor Class Driver" document of June 14, 2013, the driver provides the serial number in the HID_USAGE_SENSOR_PROPERTY_SENSOR_SERIAL_NUMBER property. Using the Sensor Diagnostic Tool (SDT) the value is blank. (Correspondingly, my windows sensor client application also retrieves blanks.

    The document states the property is read-only but, from the document, is "The means by which a Sensor can specify an alternative to the default values for these properties generated by the Driver." I modified the device to set a serial number (using a single 16bit UTF-16 wide-character set field (value 0x0041 for 'A'), with a 16bit UTF-16 wide-character null terminator field for simplicity) in the feature report, along with setting the values of the report interval and a max/min for a data field.

    Using SDT, I was able to set the values of those properties but not the HID_USAGE_SENSOR_PROPERTY_SENSOR_SERIAL_NUMBER property.

    1. Will someone confirm that the device can set the serial number property?

    2. Will someone provide sample code, in case I'm missing something in setting the serial number in the feature report?

    Wednesday, June 25, 2014 12:30 PM

All replies

  • not all sensors have an intrinsic serial number

    gps is still provided over a serial port at 4800 bps and the sentences are very standardized to allow even an 8-bit CPU the ability to use it

    gravimetric sensors are also simple

    if the serial is blank, deal with that case and assign one for you needs


    Corsair Carbide 300R with window
    Corsair TX850V2 70A@12V
    Asus M5A99FX PRO R2.0 CFX/SLI
    AMD Phenom II 965 C3 Black Edition @ 4.0 GHz
    G.SKILL RipjawsX DDR3-2133 8 GB
    EVGA GTX 6600 Ti FTW Signature 2(Gk104 Kepler)
    Asus PA238QR IPS LED HDMI DP 1080p
    ST2000DM001 & Windows 8.1 Enterprise x64
    Microsoft Wireless Desktop 2000
    Wacom Bamboo CHT470M
    Place your rig specifics into your signature like I have, makes it 100x easier to understand!

    Hardcore Games Legendary is the Only Way to Play!

    Wednesday, June 25, 2014 12:34 PM
  • Further clarification:

    My HID Sensor uses the Bluetooth 4.0 HID profile, which is supported by Window 8 and exposes the Device Information Service, which provides the device's serial number.

    3. Does the Windows Sensor use the HID device information service?

    4. if not, what is the source for Windows Sensor for the HID_USAGE_SENSOR_PROPERTY_SENSOR_SERIAL_NUMBER property?

    Wednesday, June 25, 2014 6:38 PM
  • More:

    I've verified with Texas Instruments' BTool that the GATT serial number attribute does contain a serial number string for my sensor.  This string is not displayed in the HID_USAGE_SENSOR_PROPERTY_SENSOR_SERIAL_NUMBER property.

    Thursday, June 26, 2014 12:27 PM
  • Thanks for the info.  In this case, my sensor has a serial number string specified in its GATT attribute so I expected that string in the HID_USAGE_SENSOR_PROPERTY_SENSOR_SERIAL_NUMBER property. 

    Concerning assigning a serial number, I have not been successful in setting the HID_USAGE_SENSOR_PROPERTY_SENSOR_SERIAL_NUMBER property in the feature report from the sensor. 

    If I can't send the serial number to my Windows client via this property, I'll modify the input report map and send the serial number in the input report.

    At this point, I'm not sure if there is a problem with my setting the UTF16 characters in the serial number string or if the Windows Sensor Driver does not allow changes to the HID_USAGE_SENSOR_PROPERTY_SENSOR_SERIAL_NUMBER property.

    Thursday, June 26, 2014 12:38 PM
  • Problem solved.  I got caught by the classic big endian/little endian byte arrangement.  I am now able to successfully set the serial number string for the serial number property.
    Friday, June 27, 2014 7:46 PM
  • Problem solved.  I got caught by the classic big endian/little endian byte arrangement.  I am now able to successfully set the serial number string for the serial number property.
    That is rather unorthodox, I wonder if the device was designed for a different CPU architecture originally.

    Corsair Carbide 300R with window
    Corsair TX850V2 70A@12V
    Asus M5A99FX PRO R2.0 CFX/SLI
    AMD Phenom II 965 C3 Black Edition @ 4.0 GHz
    G.SKILL RipjawsX DDR3-2133 8 GB
    EVGA GTX 6600 Ti FTW Signature 2(Gk104 Kepler)
    Asus PA238QR IPS LED HDMI DP 1080p
    ST2000DM001 & Windows 8.1 Enterprise x64
    Microsoft Wireless Desktop 2000
    Wacom Bamboo CHT470M
    Place your rig specifics into your signature like I have, makes it 100x easier to understand!

    Hardcore Games Legendary is the Only Way to Play!

    Friday, June 27, 2014 7:55 PM