这是一个复合HID设备,用在触摸i2c的电容触摸转USB
端口1用来接收数据,端口2发送数据。
现在从端口1发送数据到电脑通过串口监听到39设备的1好端口收到了数据包。
请教一下CH554要怎么从端口1发送数据到pc,让复合设备58收到触摸数据?
Z这个是WCH厂家的i2c转usb触摸屏监听的数据包,是通过端口2上传数据到pc。现在不知道58这个数据是怎么来的,单片机那边要怎么做才能让电脑收到这个数据包。
这是一个复合HID设备,用在触摸i2c的电容触摸转USB
端口1用来接收数据,端口2发送数据。
现在从端口1发送数据到电脑通过串口监听到39设备的1好端口收到了数据包。
请教一下CH554要怎么从端口1发送数据到pc,让复合设备58收到触摸数据?
Z这个是WCH厂家的i2c转usb触摸屏监听的数据包,是通过端口2上传数据到pc。现在不知道58这个数据是怎么来的,单片机那边要怎么做才能让电脑收到这个数据包。
这个看起来像BUSHOUND的显示问题,仅需要显示39号设备的抓包就可以了,实际遇到了什么问题呢。
现在pc端能够识别到设备,触摸没有反应。应该是pc没有识别到有效的HID的数据包。
WINDOWS 对触摸屏么有反应,但是我插到我一个linxu设备板子上却能够工作,证明发送的数据包还有usb枚举部分应该没有问题。但是windows不能工作不知道是哪里的问题,感觉还是数据包的问题。
当我发送数据长度为64的时候,抓到的数据报,就能看到多了一个设备的数据包,如图49设备。不知道什么原因。
可以把对应的描述符相关内容发出来看下,报告描述符会上报数据的可以,可以检查下发送的数据格式是否和报告描述一致
//HID类报表描述符
UINT8C HIDRepDesc[ ] =
{
0x05,0x0d,0x09,0x04,0xa1,0x01,0x85,0x02,0x09,0x20,0xa1,0x00,0x09,0x42,0x09,0x32,
0x15,0x00,0x25,0x01,0x95,0x02,0x75,0x01,0x81,0x02,0x95,0x06,0x75,0x01,0x81,0x03,
0x05,0x01,0x09,0x30,0x75,0x10,0x95,0x01,0xa4,0x55,0x0e,0x65,0x33,0x16,0x00,0x00,
0x26,0xff,0x0f,0x36,0x00,0x00,0x46,0xff,0x0f,0x81,0x02,0x09,0x31,0x16,0x00,0x00,
0x26,0xff,0x0f,0x36,0x00,0x00,0x46,0xff,0x0f,0x81,0x02,0x09,0x31,0x16,0x00,0x00,
0x26,0xff,0x0f,0x36,0x00,0x00,0x46,0x5f,0x23,0x81,0x02,0xb4,0xc0,0xc0,0x05,0x01,
0x09,0x01,0xa1,0x01,0x85,0x01,0x09,0x01,0xa1,0x00,0x05,0x09,0x19,0x01,0x29,0x02,
0x15,0x00,0x25,0x01,0x95,0x02,0x75,0x01,0x81,0x02,0x95,0x01,0x75,0x06,0x81,0x01,
0x05,0x01,0x09,0x30,0x09,0x31,0x16,0x00,0x00,0x26,0xff,0x0f,0x36,0x00,0x00,0x46,
0xff,0x0f,0x66,0x00,0x00,0x75,0x10,0x95,0x02,0x81,0x02,0xc0,0xc0,0x06,0x00,0xff,
0x09,0x01,0xa1,0x01,0x09,0x01,0x15,0x00,0x26,0xff,0x00,0x85,0x03,0x75,0x08,0x95,
0x3f,0x81,0x02,0x06,0x00,0xff,0x09,0x01,0x15,0x00,0x26,0xff,0x00,0x75,0x08,0x95,
0x3f,0x91,0x02,0xc0,0x05,0x0d,0x09,0x04,0xa1,0x01,0x85,0x04,0x09,0x22,0xa1,0x00,
0x09,0x42,0x15,0x00,0x25,0x01,0x75,0x01,0x95,0x01,0x81,0x02,0x09,0x32,0x15,0x00,
0x25,0x01,0x81,0x02,0x09,0x51,0x75,0x04,0x95,0x01,0x16,0x00,0x00,0x26,0x10,0x00,
0x81,0x02,0x09,0xff,0x15,0x00,0x25,0x01,0x75,0x01,0x95,0x01,0x81,0x02,0x09,0x47,
0x75,0x01,0x95,0x01,0x15,0x00,0x25,0x01,0x81,0x02,0x05,0x01,0x09,0x30,0x75,0x10,
0x95,0x01,0x55,0x0e,0x65,0x33,0x35,0x00,0x16,0x00,0x00,0x26,0xff,0x0f,0x36,0x00,
0x00,0x46,0x3e,0x03,0x81,0x02,0x09,0x31,0x75,0x10,0x95,0x01,0x55,0x0e,0x65,0x33,
0x35,0x00,0x16,0x00,0x00,0x26,0xff,0x0f,0x36,0x00,0x00,0x46,0x6e,0x02,0x81,0x02,
0x05,0x0d,0x09,0x54,0x15,0x00,0x25,0x05,0x75,0x08,0x95,0x01,0x81,0x02,0x05,0x0d,
0x09,0x55,0x25,0x05,0x75,0x08,0x95,0x01,0xb1,0x02,0xc0,0xc0,0x05,0x0d,0x09,0x0e,
0xa1,0x01,0x85,0x05,0x09,0x22,0xa1,0x00,0x09,0x52,0x09,0x53,0x15,0x00,0x25,0x0a,
0x75,0x08,0x95,0x02,0xb1,0x02,0xc0,0xc0
};
下面是从端口1上传的报文
从描述符格式和数据来看,可能是最后Report ID为4的这个描述,第二个字节中包含了Usage (0xFF)的一位,会不会是需要特定的驱动程序才能驱动起这个屏幕?可以找个类似描述符的可以在WIN上使用的样品抓包对比下看看。
70.1 IN 04 c3 cb 00 00 00 01 ....... 1.1.0
75 IN 04 c3 cb 00 00 00 01 ....... 2.1.0
70.1 IN 04 c3 cb 00 00 00 01 ....... 3.1.0
75 IN 04 c3 cb 00 00 00 01 ....... 4.1.0
70.1 IN 04 c3 cb 00 00 00 01 ....... 5.1.0
75 IN 04 c3 cb 00 00 00 01 ....... 6.1.0
70.1 IN 04 c3 cb 00 00 00 01 ....... 7.1.0
75 IN 04 c3 cb 00 00 00 01 ....... 8.1.0
70.1 IN 04 c3 cb 00 00 00 01 ....... 9.1.0
75 IN 04 c3 cb 00 00 00 01 ....... 10.1.0
70.1 IN 04 c3 cb 00 00 00 01 ....... 11.1.0
数据的发送也是模仿原来触摸屏的通信协议发送的数据,在linxu板子上可以工作,按理说协议应该没有问题。就是不知道在windows上为啥不行。除了从端口1上传数据外还要做其他什么步骤没有做?