iOS忽略了GID消费者页面的输入报告

问题描述 投票:2回答:1

我使用CSR1010并在Gatt应用程序上写了一个BLE HID,它只向iOS发送Play / Pause,Volume Increment / Decrement。

消费者报告的报告描述符配置为:

05 0C        (GLOBAL) USAGE_PAGE         0x000C Consumer Device Page
09 01        (LOCAL)  USAGE              0x000C0001 Consumer Control (CA=Application Collection)
A1 01        (MAIN)   COLLECTION         0x01 Application (Usage=0x000C0001: Page=Consumer Device Page, Usage=Consumer Control, Type=CA)
85 01          (GLOBAL) REPORT_ID          0x01 (1)
19 00          (LOCAL)  USAGE_MINIMUM      0x000C0000 Unassigned
2A 9C02        (LOCAL)  USAGE_MAXIMUM      0x000C029C AC Distribute Vertically (Sel=Selector)
15 00          (GLOBAL) LOGICAL_MINIMUM    0x00 (0) <-- Redundant: LOGICAL_MINIMUM is already 0
26 9C02        (GLOBAL) LOGICAL_MAXIMUM    0x029C (668)
95 01          (GLOBAL) REPORT_COUNT       0x01 (1) Number of fields
75 10          (GLOBAL) REPORT_SIZE        0x10 (16) Number of bits per field
81 00          (MAIN)   INPUT              0x00000000 (1 field x 16 bits) 0=Data 0=Array 0=Absolute 0=Ignored 0=Ignored 0=PrefState 0=NoNull
C0           (MAIN)   END_COLLECTION     Application

我使用hidrdd验证了这个报告描述符,所以我相信它会被解析得很好。

发送到iOS的原始数据字节如嗅探器中所示是05 0c 09 01 a1 01 85 01 19 00 2a 9c 02 15 00 26 9c 02 95 01 75 10 81 00 c0,完全按照配置。

我还从嗅探结果中看到iOS注册了来自客户角色配置的消费者报告特征的通知。

一切看起来不错但是当我向iOS发送2个字节的0xcd 0x00(播放/暂停)时,没有任何反应。

现在我觉得我尽我所能,但iOS还是不开心。没有办法说出iOS不满意的原因,因为没有涉及iOS应用程序。任何有这方面经验的人能给我一些指示吗?

[编辑]在下面添加了一些嗅探器的截图:

Report Map 1st part Report Map 2nd part iOS writes client configuration HID report ignored by iOS

ios bluetooth-lowenergy hid
1个回答
4
投票

在报表描述符中包含报表ID时,所有HID报表(在该接口上)都必须以报表ID为前缀。在您的情况下,您需要发送一个3字节的报告:

0x01 0xcd 0x00

...或从报告描述符中删除报告ID。

© www.soinside.com 2019 - 2024. All rights reserved.