使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
在运行时更改功能
由于可以通过升级提供程序上的固件来启用新功能(例如动态缓冲区大小调整),因此我们希望提供一种在运行时获取提供程序功能的方法。为避免重复查询功能,首先,提供程序应在连接时通过消息流将固件修订版本发送给 Seeker。因此,我们向现有消息组“设备信息”事件添加了新的消息代码。
获取固件修订版代码后,Seeker 应将其与缓存的代码进行对比。如果固件修订版已更改,Seeker 将更新缓存的固件修订版,并通过消息流查询功能。
我们还允许提供方直接向 Seeker 推送功能,而无需先发出请求,因为我们认为,未来,更复杂的设备(可能是基于 Android 的设备)将根据同一固件修订版本的标志进行动态配置。
因此,我们在下方添加了新的消息组和消息代码。
消息代码名称 |
值 |
请求更新 capability(由 Seeker 发送) |
0x01 |
FHN 跟踪 |
0x03 |
收到 0x0601
后,
- 如果提供商已启用对 FHN 跟踪的支持,则应按如下方式响应:
八位字节 |
数据类型 |
说明 |
值 |
0 |
uint8 |
设备功能同步事件 |
0x06 |
1 |
uint8 |
FHN 跟踪 |
0x03 |
2 - 3 |
uint16 |
其他数据长度 |
0x0007 |
4 |
uint8 |
FHN 配置状态 |
如果未预配,则为 0x00;如果由任何账号预配,则为 0x01 |
5 - 10 |
uint8[] |
设备的当前 BLE MAC 地址 |
不定 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-13。
[null,null,["最后更新时间 (UTC):2025-08-13。"],[[["\u003cp\u003eFirmware revision is communicated from Provider to Seeker upon connection to allow for capability updates.\u003c/p\u003e\n"],["\u003cp\u003eSeeker triggers capability updates when a new firmware revision is detected or can request updates directly.\u003c/p\u003e\n"],["\u003cp\u003eProvider can proactively push capability updates to the Seeker without a prior request.\u003c/p\u003e\n"],["\u003cp\u003eA new message group and codes are introduced to support device capability synchronization and FMDN tracking.\u003c/p\u003e\n"],["\u003cp\u003eFMDN tracking capability allows the Seeker to know the provisioning status and BLE MAC address of the Provider.\u003c/p\u003e\n"]]],[],null,["Change Capabilities at Runtime\n------------------------------\n\nSince new features (e.g. dynamic buffer sizing) can be enabled by upgrading\nfirmware on the Provider, we want to provide a way to get the capabilities of\nthe Provider at runtime.\nTo avoid repeatedly querying capabilities, first, the Provider should send the\nfirmware revision to the Seeker via message stream when connected. So we add a\nnew message code to the existing message group, device information event.\n\n| Message Group Name | Value |\n|--------------------------|-------|\n| Device information event | 0x03 |\n\n| Message Code Name | Value |\n|-------------------|-------|\n| Firmware revision | 0x09 |\n\nUpon getting the firmware revision code, the Seeker shall check it against the\ncached one. If the firmware revision has been changed, the Seeker will update\nthe firmware revision of the cache and query the capabilities via Message\nStream.\n\nWe also allow the Provider to directly push capabilities to the Seeker without\na request first, because we imagine that, in the future, more sophisticated\ndevices (maybe Android-based) will do dynamic configuration based on\nflags for the same firmware revision.\n\nSo we add below a new message group and message codes.\n\n| Message Group Name | Value |\n|------------------------------|-------|\n| Device capability sync event | 0x06 |\n\n| Message Code Name | Value |\n|----------------------------------------------|-------|\n| Request capability update (sent from Seeker) | 0x01 |\n| FHN tracking | 0x03 |\n\nUpon receiving `0x0601`,\n\n- if the Provider has enabled support for FHN tracking, it should respond as below:\n\n| Octet | Data Type | Description | Value |\n|--------|-----------|-------------------------------------------|-----------------------------------------------------------|\n| 0 | uint8 | Device capability sync event | 0x06 |\n| 1 | uint8 | FHN tracking | 0x03 |\n| 2 - 3 | uint16 | Additional data length | 0x0007 |\n| 4 | uint8 | FHN provisioning state | 0x00 if unprovisioned; 0x01 if provisioned by any account |\n| 5 - 10 | uint8\\[\\] | The current BLE MAC address of the device | *varies* |"]]