PS4蓝牙手柄分析之1

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

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值