PS4蓝牙手柄通过自制的读取设备,读取设备的数据如下
PS4 wireless controller
Bluetooth hid get report
///GET_REPORT///
get_report: 4b 02 25 00
data: a3
02 02 00 00 00 01 00 99 22 9c 22 b4 22 69 dd 62 dd 51 dd 1c 02 1c 02 b9 1f 5d e0 94 1f 3e e0 e3 1c 86 de 03 00
get_report: 4b 06 35 00
a3
06 41 75 67 20 20 33 20 32 30 31 33 00 00 00 00 00 30 37 3a 30 31 3a 31 32 00 00 00 00 00 00 00 00 00 01 00
31 03 00 00 00 49 00 05 00 00 80 03 00 4b 52 02 c7
get_report:4b a3 31 00
a3
a3 41 75 67 20 20 33 20 32 30 31 33 00 00 00 00 00 30 37 3a 30 31 3a 31 32 00 00 00 00 00 00 00 00 00 01 00
31 03 00 00 00 49 00 05 00 00 80 03 00
{
if(((command_st>>i)&0x01)==0x01)
{
for(j=0;j<Rxdata_len;j++)
{
Rx_buff[j]=Rxdata_info[i][j];
}
Rxdata_st&=(~(0x01<<i));
if(Rx_buff[0]==0x04){Event0x04_sub(Rx_buff);}
else if(Rx_buff[0]==0x02){Event0x02_0x32_sub(Rx_buff);}
//else if(Rx_buff[0]==0x01){}
}
}
void Event0x02_0x32_sub(U8 *BT_BUF)
{
u8 i;
union BT_EVENT bt_event ;
union Cid_struct Result;
for(i=0;i<Rxdata_len;i++)
{bt_event.event_buff[i]=*(BT_BUF+i);
}
CID.HART.B0= bt_event.event_buff[7];
CID.HART.B1= bt_event.event_buff[8];
Identifier_Peer=bt_event.event_buff[10];
Protocol_Service.HART.B0=bt_event.event_buff[13];
Protocol_Service.HART.B1=bt_event.event_buff[14];
if (CID.WORD==0X0001)//Channel ID: 0x0001 (Signaling)
{
switch (bt_event.event_buff[9])//code
{
case Connection_Request:
#if 0
My_ChnlID.WORD++;
if(My_ChnlID.WORD>255){My_ChnlID.WORD=0x44;}
bt_event.event_buff[9]=0