自研触摸板上报数据系统没有反应

志鹏 叶 20 Reputation points
2023-08-07T10:30:49.5033333+00:00

Dear All,

这边做了一个触摸板,上报了数据系统无反应。

下面是hid设备描述符:

__ALIGN_BEGIN static uint8_t HID_MOUSE_ReportDesc[HID_MOUSE_REPORT_DESC_SIZE] __ALIGN_END =
{
    //TOUCH PAD input TLC
    0x05, 0x0d,                         // USAGE_PAGE (Digitizers)
    0x09, 0x05,                         // USAGE (Touch Pad)
    0xA1, 0x01,                         // COLLECTION (Application)
    0x85, REPORTID_TOUCHPAD,            //   REPORT_ID (Touch pad)

    0x05, 0x0D,        //   Usage Page (Digitizer)
    0x09, 0x22,        //   Usage (Finger)
    0xA1, 0x02,        //   Collection (Logical)
    0x09, 0x47,        //     USAGE (Confidence)
    0x09, 0x42,        //     Usage (Tip Switch)
    0x15, 0x00,        //     Logical Minimum (0)
    0x25, 0x01,        //     Logical Maximum (1)
    0x75, 0x01,        //     Report Size (1)
    0x95, 0x02,        //     Report Count (2)
    0x81, 0x02,        //     Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
    0x95, 0x02,        //     Report Count (2)
    0x81, 0x03,        //     Input (Const,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
    0x09, 0x51,        //     Usage (0x51)
    0x25, 0x0F,        //     Logical Maximum (15)
    0x75, 0x04,        //     Report Size (4)
    0x95, 0x01,        //     Report Count (1)
    0x81, 0x02,        //     Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
    0x05, 0x01,        //     Usage Page (Generic Desktop Ctrls)
    0x09, 0x30,        //     Usage (X)
    0x75, 0x10,        //     Report Size (16)
    0x55, 0x0E,        //     Unit Exponent (-2)
    0x65, 0x11,        //     Unit (System: SI Linear, Length: Centimeter)
    0x35, 0x00,        //     Physical Minimum (0)
    0x46, 0x9C, 0x04,  //     Physical Maximum (1180)
    0x27, 0x58, 0x06, 0x00, 0x00,  //     Logical Maximum (1623)
    0x81, 0x02,        //     Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
    0x09, 0x31,        //     Usage (Y)
    0x46, 0x80, 0x02,  //     Physical Maximum (640)
    0x27, 0x70, 0x03, 0x00, 0x00,  //     Logical Maximum (879)
    0x81, 0x02,        //     Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
    0xC0,              //   End Collection  //69
#if 1
    0x05, 0x0D,        //   Usage Page (Digitizer)
    0x09, 0x22,        //   Usage (Finger)
    0xA1, 0x02,        //   Collection (Logical)
    0x09, 0x47,        //     USAGE (Confidence)
    0x09, 0x42,        //     Usage (Tip Switch)
    0x15, 0x00,        //     Logical Minimum (0)
    0x25, 0x01,        //     Logical Maximum (1)
    0x75, 0x01,        //     Report Size (1)
    0x95, 0x02,        //     Report Count (2)
    0x81, 0x02,        //     Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
    0x95, 0x02,        //     Report Count (2)
    0x81, 0x03,        //     Input (Const,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
    0x09, 0x51,        //     Usage (0x51)
    0x25, 0x0F,        //     Logical Maximum (15)
    0x75, 0x04,        //     Report Size (4)
    0x95, 0x01,        //     Report Count (1)
    0x81, 0x02,        //     Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
    0x05, 0x01,        //     Usage Page (Generic Desktop Ctrls)
    0x09, 0x30,        //     Usage (X)
    0x75, 0x10,        //     Report Size (16)
    0x55, 0x0E,        //     Unit Exponent (-2)
    0x65, 0x11,        //     Unit (System: SI Linear, Length: Centimeter)
    0x35, 0x00,        //     Physical Minimum (0)
    0x46, 0x9C, 0x04,  //     Physical Maximum (1180)
    0x27, 0x58, 0x06, 0x00, 0x00,  //     Logical Maximum (1623)
    0x81, 0x02,        //     Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
    0x09, 0x31,        //     Usage (Y)
    0x46, 0x80, 0x02,  //     Physical Maximum (640)
    0x27, 0x70, 0x03, 0x00, 0x00,  //     Logical Maximum (879)
    0x81, 0x02,        //     Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
    0xC0,              //   End Collection

    0x05, 0x0D,        //   Usage Page (Digitizer)
    0x09, 0x22,        //   Usage (Finger)
    0xA1, 0x02,        //   Collection (Logical)
    0x09, 0x47,        //     USAGE (Confidence)
    0x09, 0x42,        //     Usage (Tip Switch)
    0x15, 0x00,        //     Logical Minimum (0)
    0x25, 0x01,        //     Logical Maximum (1)
    0x75, 0x01,        //     Report Size (1)
    0x95, 0x02,        //     Report Count (2)
    0x81, 0x02,        //     Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
    0x95, 0x02,        //     Report Count (2)
    0x81, 0x03,        //     Input (Const,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
    0x09, 0x51,        //     Usage (0x51)
    0x25, 0x0F,        //     Logical Maximum (15)
    0x75, 0x04,        //     Report Size (4)
    0x95, 0x01,        //     Report Count (1)
    0x81, 0x02,        //     Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
    0x05, 0x01,        //     Usage Page (Generic Desktop Ctrls)
    0x09, 0x30,        //     Usage (X)
    0x75, 0x10,        //     Report Size (16)
    0x55, 0x0E,        //     Unit Exponent (-2)
    0x65, 0x11,        //     Unit (System: SI Linear, Length: Centimeter)
    0x35, 0x00,        //     Physical Minimum (0)
    0x46, 0x9C, 0x04,  //     Physical Maximum (1180)
    0x27, 0x58, 0x06, 0x00, 0x00,  //     Logical Maximum (1623)
    0x81, 0x02,        //     Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
    0x09, 0x31,        //     Usage (Y)
    0x46, 0x80, 0x02,  //     Physical Maximum (640)
    0x27, 0x70, 0x03, 0x00, 0x00,  //     Logical Maximum (879)
    0x81, 0x02,        //     Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
    0xC0,              //   End Collection



    0x05, 0x0D,        //   Usage Page (Digitizer)
    0x09, 0x22,        //   Usage (Finger)
    0xA1, 0x02,        //   Collection (Logical)
    0x09, 0x47,        //     USAGE (Confidence)
    0x09, 0x42,        //     Usage (Tip Switch)
    0x15, 0x00,        //     Logical Minimum (0)
    0x25, 0x01,        //     Logical Maximum (1)
    0x75, 0x01,        //     Report Size (1)
    0x95, 0x02,        //     Report Count (2)
    0x81, 0x02,        //     Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
    0x95, 0x02,        //     Report Count (2)
    0x81, 0x03,        //     Input (Const,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
    0x09, 0x51,        //     Usage (0x51)
    0x25, 0x0F,        //     Logical Maximum (15)
    0x75, 0x04,        //     Report Size (4)
    0x95, 0x01,        //     Report Count (1)
    0x81, 0x02,        //     Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
    0x05, 0x01,        //     Usage Page (Generic Desktop Ctrls)
    0x09, 0x30,        //     Usage (X)
    0x75, 0x10,        //     Report Size (16)
    0x55, 0x0E,        //     Unit Exponent (-2)
    0x65, 0x11,        //     Unit (System: SI Linear, Length: Centimeter)
    0x35, 0x00,        //     Physical Minimum (0)
    0x46, 0x9C, 0x04,  //     Physical Maximum (1180)
    0x27, 0x58, 0x06, 0x00, 0x00,  //     Logical Maximum (1623)
    0x81, 0x02,        //     Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
    0x09, 0x31,        //     Usage (Y)
    0x46, 0x80, 0x02,  //     Physical Maximum (640)
    0x27, 0x70, 0x03, 0x00, 0x00,  //     Logical Maximum (879)
    0x81, 0x02,        //     Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
    0xC0,              //   End Collection



    0x05, 0x0D,        //   Usage Page (Digitizer)
    0x09, 0x22,        //   Usage (Finger)
    0xA1, 0x02,        //   Collection (Logical)
    0x09, 0x47,        //     USAGE (Confidence)
    0x09, 0x42,        //     Usage (Tip Switch)
    0x15, 0x00,        //     Logical Minimum (0)
    0x25, 0x01,        //     Logical Maximum (1)
    0x75, 0x01,        //     Report Size (1)
    0x95, 0x02,        //     Report Count (2)
    0x81, 0x02,        //     Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
    0x95, 0x02,        //     Report Count (2)
    0x81, 0x03,        //     Input (Const,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
    0x09, 0x51,        //     Usage (0x51)
    0x25, 0x0F,        //     Logical Maximum (15)
    0x75, 0x04,        //     Report Size (4)
    0x95, 0x01,        //     Report Count (1)
    0x81, 0x02,        //     Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
    0x05, 0x01,        //     Usage Page (Generic Desktop Ctrls)
    0x09, 0x30,        //     Usage (X)
    0x75, 0x10,        //     Report Size (16)
    0x55, 0x0E,        //     Unit Exponent (-2)
    0x65, 0x11,        //     Unit (System: SI Linear, Length: Centimeter)
    0x35, 0x00,        //     Physical Minimum (0)
    0x46, 0x9C, 0x04,  //     Physical Maximum (1180)
    0x27, 0x58, 0x06, 0x00, 0x00,  //     Logical Maximum (1623)
    0x81, 0x02,        //     Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
    0x09, 0x31,        //     Usage (Y)
    0x46, 0x80, 0x02,  //     Physical Maximum (640)
    0x27, 0x70, 0x03, 0x00, 0x00,  //     Logical Maximum (879)
    0x81, 0x02,        //     Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
    0xC0,              //   End Collection
#endif


    0x55, 0x0C,                         //    UNIT_EXPONENT (-4)
    0x66, 0x01, 0x10,                   //    UNIT (Seconds)
    0x47, 0xff, 0xff, 0x00, 0x00,      //     PHYSICAL_MAXIMUM (65535)
    0x27, 0xff, 0xff, 0x00, 0x00,         //  LOGICAL_MAXIMUM (65535)
    0x75, 0x10,                           //  REPORT_SIZE (16)
    0x95, 0x01,                           //  REPORT_COUNT (1)
    0x05, 0x0d,                         //    USAGE_PAGE (Digitizers)
    0x09, 0x56,                         //    USAGE (Scan Time)
    0x81, 0x02,                           //  INPUT (Data,Var,Abs)
    0x09, 0x54,                         //    USAGE (Contact count)
    0x25, 0x7f,                           //  LOGICAL_MAXIMUM (127)
    0x95, 0x01,                         //    REPORT_COUNT (1)
    0x75, 0x08,                         //    REPORT_SIZE (8)
    0x81, 0x02,                         //    INPUT (Data,Var,Abs)
    0x05, 0x09,                         //    USAGE_PAGE (Button)
    0x09, 0x01,                         //    USAGE_(Button 1)
    0x09, 0x02,                         //    USAGE_(Button 2)
    0x09, 0x03,                         //    USAGE_(Button 3)
    0x25, 0x01,                         //    LOGICAL_MAXIMUM (1)
    0x75, 0x01,                         //    REPORT_SIZE (1)
    0x95, 0x03,                         //    REPORT_COUNT (3)
    0x81, 0x02,                         //    INPUT (Data,Var,Abs)
    0x95, 0x05,                          //   REPORT_COUNT (5)
    0x81, 0x03,                         //    INPUT (Cnst,Var,Abs)


    0x05, 0x0d,                         //    USAGE_PAGE (Digitizer)
    0x85, REPORTID_MAX_COUNT,            //   REPORT_ID (Feature)
    0x09, 0x55,                         //    USAGE (Contact Count Maximum)
    0x09, 0x59,                         //    USAGE (Pad TYpe)
    0x75, 0x04,                         //    REPORT_SIZE (4)
    0x95, 0x02,                         //    REPORT_COUNT (2)
    0x25, 0x0f,                         //    LOGICAL_MAXIMUM (15)
    0xb1, 0x02,                         //    FEATURE (Data,Var,Abs)
    0x06, 0x00, 0xff,                   //    USAGE_PAGE (Vendor Defined)
    0x85, REPORTID_PTPHQA,               //    REPORT_ID (PTPHQA)
    0x09, 0xC5,                         //    USAGE (Vendor Usage 0xC5)
    0x15, 0x00,                         //    LOGICAL_MINIMUM (0)
    0x26, 0xff, 0x00,                   //    LOGICAL_MAXIMUM (0xff)
    0x75, 0x08,                         //    REPORT_SIZE (8)
    0x96, 0x00, 0x01,                   //    REPORT_COUNT (0x100 (256))
    0xb1, 0x02,                         //    FEATURE (Data,Var,Abs)
    0xc0,                               // END_COLLECTION
    //CONFIG TLC
    0x05, 0x0d,                         //    USAGE_PAGE (Digitizer)
    0x09, 0x0E,                         //    USAGE (Configuration)
    0xa1, 0x01,                         //   COLLECTION (Application)
    0x85, REPORTID_FEATURE,             //   REPORT_ID (Feature)
    0x09, 0x22,                         //   USAGE (Finger)
    0xa1, 0x02,                         //   COLLECTION (logical)
    0x09, 0x52,                         //    USAGE (Input Mode) //mouse or touchpad
    0x15, 0x00,                         //    LOGICAL_MINIMUM (0)
    0x25, 0x0a,                         //    LOGICAL_MAXIMUM (10)
    0x75, 0x08,                         //    REPORT_SIZE (8)
    0x95, 0x01,                         //    REPORT_COUNT (1)
    0xb1, 0x02,                         //    FEATURE (Data,Var,Abs
    0xc0,                               //   END_COLLECTION
    0x09, 0x22,                         //   USAGE (Finger)
    0xa1, 0x00,                         //   COLLECTION (physical)
    0x85, REPORTID_FUNCTION_SWITCH,     //     REPORT_ID (Feature)
    0x09, 0x57,                         //     USAGE(Surface switch)
    0x09, 0x58,                         //     USAGE(Button switch)
    0x75, 0x01,                         //     REPORT_SIZE (1)
    0x95, 0x02,                         //     REPORT_COUNT (2)
    0x25, 0x01,                         //     LOGICAL_MAXIMUM (1)
    0xb1, 0x02,                         //     FEATURE (Data,Var,Abs)
    0x95, 0x06,                         //     REPORT_COUNT (6)
    0xb1, 0x03,                         //     FEATURE (Cnst,Var,Abs)
    0xc0,                               //   END_COLLECTION
    0xc0,                               // END_COLLECTION
    //MOUSE TLC
    0x05, 0x01,                         // USAGE_PAGE (Generic Desktop)
    0x09, 0x02,                         // USAGE (Mouse)
    0xa1, 0x01,                         // COLLECTION (Application)
    0x85, REPORTID_MOUSE,               //   REPORT_ID (Mouse)
    0x09, 0x01,                         //   USAGE (Pointer)
    0xa1, 0x00,                         //   COLLECTION (Physical)
    0x05, 0x09,                         //     USAGE_PAGE (Button)
    0x19, 0x01,                         //     USAGE_MINIMUM (Button 1)
    0x29, 0x02,                         //     USAGE_MAXIMUM (Button 2)
    0x25, 0x01,                         //     LOGICAL_MAXIMUM (1)
    0x75, 0x01,                         //     REPORT_SIZE (1)
    0x95, 0x02,                         //     REPORT_COUNT (2)
    0x81, 0x02,                         //     INPUT (Data,Var,Abs)
    0x95, 0x06,                         //     REPORT_COUNT (6)
    0x81, 0x03,                         //     INPUT (Cnst,Var,Abs)
    0x05, 0x01,                         //     USAGE_PAGE (Generic Desktop)
    0x09, 0x30,                         //     USAGE (X)
    0x09, 0x31,                         //     USAGE (Y)
    0x75, 0x10,                         //     REPORT_SIZE (16)
    0x95, 0x02,                         //     REPORT_COUNT (2)
    0x25, 0x0a,                          //    LOGICAL_MAXIMUM (10)
    0x81, 0x06,                         //     INPUT (Data,Var,Rel)
    0xc0,                               //   END_COLLECTION
    0xc0,                                //END_COLLECTION
};

下图是上报的数据,通过CEIWEI USBMonito抓包:

User's image

BRS

Ye.ZhiPeng

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
12,075 questions
0 comments No comments
{count} votes

Accepted answer
  1. Limitless Technology 44,681 Reputation points
    2023-08-08T15:10:07.63+00:00

    Hello,

    It looks like you've provided a piece of code and a description related to a touchpad issue. If I understand correctly, you're encountering a problem where a touchpad you've developed is not responding as expected. The provided code appears to be the HID (Human Interface Device) report descriptor for the touchpad.

    From the provided information, I can't directly pinpoint the exact cause of the issue. However, here are a few general troubleshooting steps and considerations you might want to take:

    Verify Hardware and Connections: Double-check the physical connections and components of the touchpad to ensure that they are properly connected and functioning.

    Review the Code: Carefully review the code to make sure it accurately represents the desired behavior of the touchpad. Check for any logical or syntax errors that might be affecting its functionality.

    Check for Error Codes: If the code is interacting with any system APIs or drivers, make sure to check for any error codes or return values that might indicate issues during runtime.

    Debugging: Implement debugging techniques to gather more information about the behavior of the touchpad and identify where the issue might be occurring. Print debugging messages, monitor variable values, and use tools that can help you trace the execution flow.

    Data Communication: Ensure that the data reported by the touchpad through the HID report descriptor is in the correct format and adheres to the specifications of the HID protocol.

    USBMonito Capture: The provided image appears to be a USBMonito capture of the touchpad's data. Analyzing this data might give you insights into what is being reported and whether it matches your expectations. Look for any patterns or abnormalities in the captured data.

    Hardware Compatibility: Ensure that the touchpad is compatible with the system you are testing it on, including drivers, hardware requirements, and any firmware updates that might be needed.

    Testing on Different Systems: If possible, try testing the touchpad on different systems to see if the issue is specific to the current environment.

    Documentation and References: Review any documentation or references related to HID development, touchpad interfacing, and USB communication to ensure that you are following best practices.

    Seek Professional Help: If you're unable to identify and resolve the issue on your own, consider seeking help from experts or forums specializing in HID development or hardware interfacing.

    Since this appears to be a complex issue involving hardware and software development, it might be beneficial to engage with other developers or forums that have experience with HID development, USB communication, and touchpad interfacing. They might be able to provide more specific guidance based on the details of your project.

    I used AI provided by ChatGPT to formulate part of this response. I have verified that the information is accurate before sharing it with you.

    Hope this resolves your Query !!

    --If the reply is helpful, please Upvote and Accept it as an answer–

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.