蓝牙键盘例程无法更改多媒体按键的顺序

\EVT\EXAM\BLE\HID_Keyboard\Project

怎么改多媒体键盘的键值和按键排布顺序


有没有什么软件可以生成HID的描述符

抠蓝牙HID协议真的是很费劲

您好,更改键值,只需要您报给电脑的键值对应键值表的16进制数据更改即可。目前没有直接生成HID描述符的软件。您可以在搜索HID_Describer_Tool。这个软件可以辅助生成HID描述符,如果您想深入了解,还是需要了解HID协议。


				0x05, 0x0C,       // Usage Page (Consumer)
        0x09, 0x01,       // Usage (Consumer Control)
				//这是个Consumer控制
        0xA1, 0x01,       // Collection (Application)
        0x85, 0x03,       // Report Id (3)
				//本报告ID为3
        0x15, 0x00,       // Logical minimum (0)
        0x25, 0x01,       // Logical maximum (1)
				//每个按键的取值范围为1~10
        0x75, 0x01,       // Report Size (1)
        0x95, 0x01,       // Report Count (1)
				//1个1bit的值,来表示键值0和1,这个值是哪个就表示哪个键按下。
        0x09, 0xCD,       // Usage (Play/Pause)
        0x81, 0x06,       // Input (Data,Value,Relative,Bit Field)
				//将6个1bit添加到本报告中
        0x0A, 0x83, 0x01, // Usage (AL Consumer Control Configuration)
        0x81, 0x06,       // Input (Data,Value,Relative,Bit Field)
        0x09, 0xB5,       // Usage (Scan Next Track)
        0x81, 0x06,       // Input (Data,Value,Relative,Bit Field)
        0x09, 0xB6,       // Usage (Scan Previous Track)
        0x81, 0x06,       // Input (Data,Value,Relative,Bit Field)
        0x09, 0xEA,       // Usage (Volume Down)
        0x81, 0x06,       // Input (Data,Value,Relative,Bit Field)
        0x09, 0xE9,       // Usage (Volume Up)
        0x81, 0x06,       // Input (Data,Value,Relative,Bit Field)
        0x0A, 0x25, 0x02, // Usage (AC Forward)
        0x81, 0x06,       // Input (Data,Value,Relative,Bit Field)
        0x0A, 0x24, 0x02, // Usage (AC Back)
        0x81, 0x06,       // Input (Data,Value,Relative,Bit Field)
        0xC0              // End Collection

这个描述符我已经更改,实际使用却还是按照下面这个描述符进行发送

 0x05,    0x0c,                  
        0x09,    0x01,                 
        0xa1,    0x01,                  
        0x85,    0x03,   
        
        0x15,    0x00,                 //     LOGICAL_MINIMUM (0)
        0x25,    0x01,                 //     LOGICAL_MAXIMUM (1)    
        0x09,    0x30,                 //     USAGE (Power)                             //??
        0x09,    0xF1,                 //     USAGE (playback Speed)                    //????
        0x09,    0xb5,                 //     USAGE (Scan Next Track)                   //???
        0x09,    0xb6, 

                //     USAGE (Scan Previous Track)    			//???
        0x09,    0xE6,                 //     USAGE (surround mode)		
       
        0x09,    0xE9,                 //     USAGE (volume Down)    					//???
       	0x09,    0xEa,                 //     USAGE (Volume UP)  				    	//???
     			
		0x09,    0xE5,                 //     USAGE (bass boost)                        //????
        0x09,    0xE4,                 //     USAGE (treble    )                        //????
        0x09,    0xE3,                 //     USAGE (bass      )                        //??
 

        0x09,    0xE2,                 //     USAGE	(mute      )                        //??
		0x09,    0xE1,                 //     USAGE	(balance   )                        //?? 
		0x09,    0xB9,                 //     USAGE	(random play)                       //????
		0x09,    0xB3,                 //     USAGE	(Fast Forward)                      //??
		0x09,    0xB4,                 //     USAGE	(rewind    )                        //??
		0x09,    0xB2,                 //     USAGE	(record    )                        //??
		0x09,    0xB1,                 //     USAGE	(st

                      //??
		0x09,    0xB0,                 //     USAGE	(play      )                        //??
		0x09,    0x94,                 //     USAGE	(quit      )                        //??
		0x09,    0x31,                 //     USAGE	(resert    )                        //??
		0x09,    0x32,                 //     USAGE	(sleep     )                        //?? 
		0x09,    0x40,                 //     USAGE	(menu      )                        //??
		0x09,    0x42,                 //     USAGE	(menu up   )                        //?
		0x09,    0x43,  
               //     USAGE	(menu down )                        //?
		0x09,    0x44,                 //     USAGE	(menu left )                        //?
		0x09,    0x45,                 //     USAGE	(menu right)                        //?
        
		0x75,    0x01,                 //     REPORT_SIZE (1)
		0x95,    0x1A,                 //     REPORT_COUNT (26)
		0x81,    0x02,                 //     INPUT (Data,Var,Abs)
	
		0x09,    0x00,                 //     USAGE (Unassigned)
		0x75,    0x06,                 //     REPORT_SIZE (6)
		0x95,    0x01,                 //  REPORT_COUNT (1)
		0x81,    0x03,                 //     INPUT (Cnst,Var,Abs)
		
    0xc0,                         //     END_COLLECTION
Consumer类不能修改?还是怎么回事

只有登录才能回复,可以选择微信账号登录