微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > TI蓝牙设计交流 > CC2541 蓝牙遥控IOS拍照问题

CC2541 蓝牙遥控IOS拍照问题

时间:10-02 整理:3721RD 点击:

我使用HIDEmuKbd的工程模板,用keyfob,每按一次按键向手机发送音量键+或-的键值,以此来遥控手机拍照。现在的情况是安卓可以正常使用,ios却没有反应,不知道问题出在哪里?如果发送的键值是按键abcd...之类的,ios也能接收显示,但是音量键等超过0x80的值就会有问题。

音量键+-的键值我使用的是0x80和0x81,hidReportMap修改如下:

static CONST uint8 hidReportMap[] =
{
0x05, 0x01, // Usage Pg (Generic Desktop)
0x09, 0x06, // Usage (Keyboard)
0xA1, 0x01, // Collection: (Application)
//
0x05, 0x07, // Usage Pg (Key Codes)
0x19, 0xE0, // Usage Min (224)
0x29, 0xE7, // Usage Max (231)
0x15, 0x00, // Log Min (0)
0x25, 0x01, // Log Max (1)
//
// Modifier byte
0x75, 0x01, // Report Size (1)
0x95, 0x08, // Report Count (8)
0x81, 0x02, // Input: (Data, Variable, Absolute)
//
// Reserved byte
0x95, 0x01, // Report Count (1)
0x75, 0x08, // Report Size (8)
0x81, 0x01, // Input: (Constant)
//
// LED report
0x95, 0x05, // Report Count (5)
0x75, 0x01, // Report Size (1)
0x05, 0x08, // Usage Pg (LEDs)
0x19, 0x01, // Usage Min (1)
0x29, 0x05, // Usage Max (5)
0x91, 0x02, // Output: (Data, Variable, Absolute)
//
// LED report padding
0x95, 0x01, // Report Count (1)
0x75, 0x03, // Report Size (3)
0x91, 0x01, // Output: (Constant)
//
// Key arrays (6 bytes)
0x95, 0x06, // Report Count (6)
0x75, 0x08, // Report Size (8)
0x15, 0x00, // Log Min (0)
0x26, 0xA4, 0, // Log Max (101)
0x05, 0x07, // Usage Pg (Key Codes)
0x19, 0x00, // Usage Min (0)
0x2A, 0xA4, 0, // Usage Max (101)
0x81, 0x00, // Input: (Data, Array)
//
0xC0 // End Collection
};

论坛有类似问题,请参考这边解答: https://e2e.ti.com/support/wireless_connectivity/bluetooth_low_energy/f/538/t/409336

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top