USB HID Report Descriptor for simulating a Trackpad

Hello good people,

I have a question regarding USB HID protocol for describing usb devices. I am following and example for ble_hids on how to report all sorts of inputs and outputs from the devkit to the host (pc or mac) through ble.

I got all the connectivity down to point and even managed to build a report for a mouse and pointer with successful and good results for simulating pointer movement and clicks.

Now, I try to add a trackpad and here is my report descriptor for it:

// Report ID 3: Touch Pad click and movement
    0x05, 0x0D,                     // Usage Page (Digitizers)
    0x09, 0x05,                     // Usage (Touch Pad)
    0xA1, 0x01,                     // Collection (Application)
    0x85, INPUT_REP_REF_TOUCHPAD_ID,//  Report Id 3
    0x27, 0xFF, 0xFF, 0x00, 0x00,   //  Logical Maximum (65535)
    0x09, 0x56,                     //  Usage (Relative Scan Time)
    0x75, 0x10,                     //  Report Size (16)
    0x95, 0x01,                     //  Report Count (1)
    0x81, 0x02,                     //  Input (Data, Var, Abs)
    0x25, 0x01,                     //  Logical Maximum (1)
    0x75, 0x01,                     //  Report Size (1)
    0x09, 0x57,                     //  Usage (Surface Switch)
    0xB1, 0x02,                     //  Feature (Data, Var, Abs)
    0x26, 0xFF, 0x7F,               //  Logical Maximum (32767)
    0x75, 0x0F,                     //  Report Size (15)
    0x09, 0xA1,                     //  Usage (Report Rate)
    0xB1, 0x02,                     //  Feature (Data, Var, Abs)
    0x05, 0x09,                     //  Usage Page (Buttons)
    0x25, 0x01,                     //  Logical Maximum (1)
    0x19, 0x01,                     //  Usage Minimum (Button 1)
    0x29, 0x02,                     //  Usage Maximum (Button 2)
    0x95, 0x02,                     //  Report Count (2)
    0x75, 0x01,                     //  Report Size (1)
    0x81, 0x02,                     //  Input (Data, Var, Abs)
    0x95, 0x06,                     //  Report Count (6)
    0x81, 0x01,                     //  Input (Cnst, Ary, Abs)
    0x05, 0x0D,                     //  Usage Page (Digitizers)
    0x09, 0x22,                     //  Usage (Finger) finger 1
    0xA1, 0x00,                     //  Collection (Physical)
    0x25, 0x01,                     //   Logical Maximum (1)
    0x09, 0x42,                     //   Usage (Tip Switch)
    0x09, 0x47,                     //   Usage (Confidence)
    0x75, 0x01,                     //   Report Size (1)
    0x95, 0x02,                     //   Report Count (2)
    0x81, 0x02,                     //   Input (Data, Var, Abs)
    0x09, 0x38,                     //   Usage (Tansducer Index)
    0x25, 0x05,                     //   Logical Maximum (5)
    0x75, 0x06,                     //   Report Size (6)
    0x95, 0x01,                     //   Report Count (1)
    0x81, 0x02,                     //   Input (Data, Var, Abs)
    0x05, 0x01,                     //   Usage Page (Generic Desktop)
    0x46, 0x99, 0x03,               //   Physical Maximum (921)
    0x26, 0x51, 0x04,               //   Logical Maximum (1105)
    0x75, 0x0C,                     //   Report Size (12)
    0x09, 0x30,                     //   Usage (X)
    0x81, 0x02,                     //   Input (Data, Var, Abs)
    0x46, 0xFA, 0x01,               //   Physical Maximum (506)
    0x26, 0x5F, 0x02,               //   Logical Maximum (607)
    0x09, 0x31,                     //   Usage (Y)
    0x81, 0x02,                     //   Input (Data, Var, Abs)
    0xC0,                           //  End Collection (Physical)
    0xC0,                           // End Collection (Application)

as of now I only want to simulate the movement of 1 finger across the trackpad, thing is I am trying to send the data through ble_hids_inp_rep_send function, the one that worked for the mouse pointer and click, without success.

The simulation was like this:
1. The finger starts at the left middle part of the trackpad
2. Finger then moves towards the middle part of the trackpad
3. Finger then moves a little towards the top of the trackpad
4. Click the trackpad trying to simulate a left click
5. release the finger

This process was unsuccessful and no mouse movement and click registered on the pc or mac for this simulation process.

I am not trying to build a windows precision touchpad in which they need a lot of requirements for it to register as a windows touchpad.

This trial and error is to try and simulate the old but gold Logitech T650 trackpad hid to try and replace the movement and click of the mouse pointer already built.

As I know that the HID topic is very complicated I would appreciate any help given.

I am using the nRF52832 DK programming on Segger Embedded Studio and using nrf connect sdk v1.6.1

Best regards

Parents Reply Children
No Data
Related