Skip to content
English
  • There are no suggestions because the search field is empty.

USB-HID-Transport

Customer Support

Neonode® Touch Sensor Module User's Guide : USB HID Transport

When connected via USB, the Touch Sensor Module communicates in Full Speed (12 Mbit/s) in two modes: Raw HID mode (also called HID Pipe) and HID Touch Digitizer mode. HID Touch Digitizer mode is initiated automatically as soon as the sensor module is plugged in. In order to use Raw HID mode, the module's operation mode must be changed. For more information, refer to Initializing Sensor Modules.

HID Touch Digitizer Mode

The Touch Sensor Module acts as a HID Input device and communicates directly with the OS, and is completely plug and play.

Ubuntu 17.10 - 18.04

The sensor module is not recognized as a touch screen in the Ubuntu versions 17.10 - 18.04. This has been fixed and works fine in Ubuntu 18.10.

Raw HID Mode / HID Pipe

This mode uses two HID Feature Reports to communicate with the host.

  • Send data to the sensor module by writing to Feature Report 1.
  • Read data from the sensor module by reading from Feature Report 2.

Refer to zForce Message Specification for examples of requests, responses and notifications.

USB Communication in Different Operating Systems

Depending on the system and programming language you are using to write and read from a feature report, the implementation differs. For example, in Windows, this is abstracted and the hid.dll offers a function to get and set feature reports, while in for example a UNIX based OS, you might have to implement your own function to get and set a feature report.

The communication heading below describes how to implement your own get and set feature report functions, using a control transfer.

USB Permission

Depending on operating system you might need explicit permission for your program to have access to the HID device.

How to Implement Custom Functions for Raw HID Communication

In order to communicate with the sensor module the data flow type called control transfer should be used. The control transfer usually takes the following parameters:

  • Request Type (int)
  • Request (int)
  • Value (int)
  • Index (int)
  • Data (byte array)
  • Length (int)
  • Timeout (int)

Writing to Feature Report 1

When writing to the sensor module, a full 257 bytes need to be sent no matter how long the actual message is. Take a look at the code snippet below, to see how this could be done.

uint8_t operationMode[] = { 0x01, 0x17, 0xEE, 0x15, 0x40, 0x02, 0x02, 0x00, 							0x67, 0x0F, 0x80, 0x01, 0xFF, 0x81, 0x01, 0x00, 							0x82, 0x01, 0x00, 0x83, 0x01, 0x00, 0x84, 0x01, 0x00 }; // The first two bytes are the header. First byte is feature report, second byte is length of the following data.uint8_t data[257];memcpy(data, operationMode, sizeof(operationMode));int requestType = 0x00 | (0x01 << 5) | 0x01; // USB_HOST_TO_DEVICE | USB_TYPE_CLASS | USB_RECIPIENT_INTERFACEint request = 0x09; // SET_CONFIGURATION = 0x09int value = 0x0301; // 0x03 for feature report, 0x01 for feature report 1int index = 0x0000; int length = sizeof(data);int timeout = 0; connection.controlTransfer(            requestType,            request,            value,            index, data, length, timeout);

Reading from Feature Report 2

When reading from feature report 2, the message is always 258 bytes long.

uint8_t data[258];int requestType = 0x80 | (0x01 << 5) | 0x01; // USB_DEVICE_TO_HOST | USB_TYPE_CLASS | USB_RECIPIENT_INTERFACEint request = 0x01; // CLEAR_FEATURE = 0x01int value = 0x0302; // 0x03 for feature report, 0x02 for feature report 2int index = 0x0000;int length = sizeof(data);int timeout = 0;connection.controlTransfer(            requestType,            request,            value,            index, data, length, timeout);
HID Report Descriptor 

HID Report Descriptor

The HID Report Descriptor is subject to change. The descriptor below is from firmware version 1.47.

Item Data
Collection (Application) A1 01 
Collection (Application) A1 01 
    Collection (Logical) A1 02 
    Collection (Logical) A1 02 
    Collection (Logical) A1 02 
    Collection (Logical) A1 02 
    Collection (Logical) A1 02 
    Collection (Logical) A1 02 
    End Collection C0 
    End Collection C0 
    End Collection C0 
    End Collection C0 
    End Collection C0 
    End Collection C0 
End Collection C0 
End Collection C0 
    Feature (Cnst,Var,Abs,NWrp,Lin,Pref,NNul,NVol,Bit) B1 03 
    Feature (Cnst,Var,Abs,NWrp,Lin,Pref,NNul,NVol,Bit) B1 03 
    Feature (Data,Var,Abs,NWrp,Lin,Pref,NNul,NVol,Bit) B1 02 
    Feature (Data,Var,Abs,NWrp,Lin,Pref,NNul,NVol,Bit) B1 02 
    Feature (Data,Var,Abs,NWrp,Lin,Pref,NNul,NVol,Bit) B1 02 
    Feature (Data,Var,Abs,NWrp,Lin,Pref,NNul,Vol,Buf) B2 82 01 
    Feature (Data,Var,Abs,NWrp,Lin,Pref,NNul,Vol,Buf) B2 82 01 
    Input (Cnst,Ary,Abs) 81 01 
    Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
    Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
    Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit) 81 02 
        Logical Maximum (1) 25 01 
        Logical Maximum (1) 25 01 
        Logical Maximum (1) 25 01 
        Logical Maximum (1) 25 01 
        Logical Maximum (1) 25 01 
        Logical Maximum (1) 25 01 
    Logical Maximum (1) 25 01 
        Logical Maximum (127) 25 7F 
        Logical Maximum (127) 25 7F 
        Logical Maximum (127) 25 7F 
        Logical Maximum (127) 25 7F 
        Logical Maximum (127) 25 7F 
        Logical Maximum (127) 25 7F 
    Logical Maximum (65535) 27 FF FF 00 00 
        Logical Maximum (65535) 27 FF FF 00 00 
        Logical Maximum (65535) 27 FF FF 00 00 
        Logical Maximum (65535) 27 FF FF 00 00 
        Logical Maximum (65535) 27 FF FF 00 00 
        Logical Maximum (65535) 27 FF FF 00 00 
        Logical Maximum (65535) 27 FF FF 00 00 
    Logical Maximum (-1) 25 FF 
    Logical Maximum (-1) 25 FF 
    Logical Minimum (0) 15 00 
    Logical Minimum (0) 15 00 
    Report Count (1) 95 01 
        Report Count (1) 95 01 
        Report Count (1) 95 01 
        Report Count (1) 95 01 
        Report Count (1) 95 01 
        Report Count (1) 95 01 
        Report Count (1) 95 01 
        Report Count (1) 95 01 
        Report Count (1) 95 01 
        Report Count (1) 95 01 
        Report Count (1) 95 01 
        Report Count (1) 95 01 
        Report Count (1) 95 01 
        Report Count (1) 95 01 
        Report Count (1) 95 01 
        Report Count (1) 95 01 
        Report Count (1) 95 01 
        Report Count (1) 95 01 
        Report Count (1) 95 01 
    Report Count (1) 95 01 
    Report Count (1) 95 01 
    Report Count (1) 95 01 
        Report Count (2) 95 02 
        Report Count (2) 95 02 
        Report Count (2) 95 02 
        Report Count (2) 95 02 
        Report Count (2) 95 02 
        Report Count (2) 95 02 
    Report Count (255) 95 FF 
    Report Count (255) 95 FF 
    Report ID (1) 85 01 
    Report ID (2) 85 02 
    Report ID (3) 85 03 
    Report ID (4) 85 04 
    Report ID (128) 85 80 
    Report ID (130) 85 82 
        Report Size (1) 75 01 
        Report Size (1) 75 01 
        Report Size (1) 75 01 
        Report Size (1) 75 01 
        Report Size (1) 75 01 
        Report Size (1) 75 01 
    Report Size (1) 75 01 
        Report Size (7) 75 07 
        Report Size (7) 75 07 
        Report Size (7) 75 07 
        Report Size (7) 75 07 
        Report Size (7) 75 07 
        Report Size (7) 75 07 
    Report Size (7) 75 07 
    Report Size (8) 75 08 
    Report Size (8) 75 08 
    Report Size (8) 75 08 
    Report Size (16) 75 10 
        Report Size (16) 75 10 
        Report Size (16) 75 10 
        Report Size (16) 75 10 
        Report Size (16) 75 10 
        Report Size (16) 75 10 
        Report Size (16) 75 10 
        Unit (SI Lin: Length (cm)) 65 11 
        Unit (SI Lin: Length (cm)) 65 11 
        Unit (SI Lin: Length (cm)) 65 11 
        Unit (SI Lin: Length (cm)) 65 11 
        Unit (SI Lin: Length (cm)) 65 11 
        Unit (SI Lin: Length (cm)) 65 11 
    Unit (SI Lin: Time (s)) 66 01 10 
        Unit Exponent (-2) 55 0E 
        Unit Exponent (-2) 55 0E 
        Unit Exponent (-2) 55 0E 
        Unit Exponent (-2) 55 0E 
        Unit Exponent (-2) 55 0E 
        Unit Exponent (-2) 55 0E 
    Unit Exponent (-4) 55 0C 
    Usage (Contact Count Maximum) 09 55 
    Usage (Contact Count) 09 54 
        Usage (Contact Identifier) 09 51 
        Usage (Contact Identifier) 09 51 
        Usage (Contact Identifier) 09 51 
        Usage (Contact Identifier) 09 51 
        Usage (Contact Identifier) 09 51 
        Usage (Contact Identifier) 09 51 
    Usage (Finger) 09 22 
    Usage (Finger) 09 22 
    Usage (Finger) 09 22 
    Usage (Finger) 09 22 
    Usage (Finger) 09 22 
    Usage (Finger) 09 22 
        Usage (Height) 09 49 
        Usage (Height) 09 49 
        Usage (Height) 09 49 
        Usage (Height) 09 49 
        Usage (Height) 09 49 
        Usage (Height) 09 49 
    Usage (Scan Time) 09 56 
        Usage (Tip Switch) 09 42 
        Usage (Tip Switch) 09 42 
        Usage (Tip Switch) 09 42 
        Usage (Tip Switch) 09 42 
        Usage (Tip Switch) 09 42 
        Usage (Tip Switch) 09 42 
Usage (Touch Screen) 09 04 
Usage (Vendor-Defined 1) 09 01 
    Usage (Vendor-Defined 1) 09 01 
    Usage (Vendor-Defined 1) 09 01 
    Usage (Vendor-Defined 1) 09 01 
    Usage (Vendor-Defined 1) 09 01 
    Usage (Vendor-Defined 2) 09 02 
    Usage (Vendor-Defined 2) 09 02 
    Usage (Vendor-Defined 3) 09 03 
        Usage (Width) 09 48 
        Usage (Width) 09 48 
        Usage (Width) 09 48 
        Usage (Width) 09 48 
        Usage (Width) 09 48 
        Usage (Width) 09 48 
        Usage (X) 09 30 
        Usage (X) 09 30 
        Usage (X) 09 30 
        Usage (X) 09 30 
        Usage (X) 09 30 
        Usage (X) 09 30 
        Usage (Y) 09 31 
        Usage (Y) 09 31 
        Usage (Y) 09 31 
        Usage (Y) 09 31 
        Usage (Y) 09 31 
        Usage (Y) 09 31 
Usage Page (Digitizer) 05 0D 
        Usage Page (Digitizer) 05 0D 
        Usage Page (Digitizer) 05 0D 
        Usage Page (Digitizer) 05 0D 
        Usage Page (Digitizer) 05 0D 
        Usage Page (Digitizer) 05 0D 
        Usage Page (Digitizer) 05 0D 
        Usage Page (Generic Desktop) 05 01 
        Usage Page (Generic Desktop) 05 01 
        Usage Page (Generic Desktop) 05 01 
        Usage Page (Generic Desktop) 05 01 
        Usage Page (Generic Desktop) 05 01 
        Usage Page (Generic Desktop) 05 01 
Usage Page (Vendor-Defined 1) 06 00 FF 

Parsed reports by Report ID

Input Report 2
Bit offset Bit count Description
0 1 Internal use
1 7 (Not used)
Input Report 3
Bit offset Bit count Description
0 8 Contact count
8 16 Scan Time
24 1 Tip Switch
25 7 Contact identifier
32 16 X
48 16 Y
64 16 Width
80 16 Height
96 1 Tip Switch
97 7 Contact identifier
104 16 X
120 16 Y
136 16 Width
152 16 Height
168 1 Tip Switch
169 7 Contact identifier
176 16 X
192 16 Y
208 16 Width
224 16 Height
240 1 Tip Switch
241 7 Contact identifier
248 16 X
264 16 Y
280 16 Width
296 16 Height
312 1 Tip Switch
313 7 Contact identifier
320 16 X
336 16 Y
352 16 Width
368 16 Height
384 1 Tip Switch
385 7 Contact identifier
392 16 X
408 16 Y
424 16 Width
440 16 Height
Feature Report 1 - Write
Bit offset Bit count Description
0 8 Payload size (bytes)
8 2040 Payload
Feature Report 2 - Read
Bit offset Bit count Description
0 8 Payload size (bytes)
8 2040 Payload
Feature Report 4
Bit offset Bit count Description
0 8 Contact count maximum
Feature Report 128
Bit offset Bit count Description
0 8 Internal use
Feature Report 130
Bit offset Bit count Description
0 8 Internal use

 

Document generated by Confluence on Sep 25, 2025 09:40