找回密码
 立即注册

使用微信账号登录

只需一步,快速开始

搜索附件  
我爱蓝牙网 - 52Bluetooth - 最具人气蓝牙技术交流网站 附件中心 蓝牙技术交流区 蓝牙BLE专区 3322456-20250508112436985-1388206094-nordic-semi-wireless-iot-YoLm-600w.jpeg.webp

3322456-20250508112436985-1388206094-nordic-semi-wireless-iot-YoLm-600w.jpeg.webp

 

谷歌查找我的设备配件(Google Find My Device Accessory)详解和应用(5):
4)清除EIK(Clear ephemeral identity key)
如果Seeker设备要移除Provider设备,解除它们之间的配置关系,可以发送这条命令。Seeker传递数据的additional data部分的数据: The first 8 bytes of SHA256(ephemeral identity key || the last nonce read from the characteristic) SHA256(临时身份密钥 || 从特征值读取的最后一个随机数)结果的前 8 个字节。所以Provider需要验证两次,一次是一次性认证密钥认证,一次是SHA256哈希值验证。确保了Seeker要删除的EIK和Provider拥有的EIK是同一个EIK。验证通过后,Provider删除EIK,并立刻停止FMDN frames广播。
具体的处理过程可以参考函数:
static ssize_t ephemeral_identity_key_clear_handle(struct bt_conn *conn,                           const struct bt_gatt_attr *attr,                           struct net_buf_simple *req_data_buf)1.6.2信标配置密钥恢复请求命令(Beacon provisioning key recovery request)
如果Seeker的EIK丢失了,可以通过这条命令,从Provider设备上读取EIK。这个读取的过程是有条件的,Provider需要处于Recovery mode。协议建议用户执行一个操作进入Recovery mode 。我们例子是按下DK上的button4,按键时间3-7秒。Recovery mode持续一段时间后( CONFIG_BT_FAST_PAIR_FMDN_READ_MODE_FMDN_RECOVERY_TIMEOUT)自动退出。
命令格式如下:
Provider设备验证一次性认证密钥通过之后返回加密的EIK(32 bytes that are the ephemeral identity key, AES-ECB-128 encrypted with the account key)给Seeker。
具体的处理过程可以参考函数:
static ssize_t ephemeral_identity_key_read_handle(struct bt_conn *conn,                          const struct bt_gatt_attr *attr,                          struct net_buf_simple *req_data_buf)1.6.3响铃请求命令(Ringing request)
Seeker通过发送响铃请求命令控制Provider播放声音或获取响铃状态。格式如下:
有两个子命令,Ring和Read ringing state。Ring命令的additional data的数据如下:
对ring命令的回复数据格式如下:
Read ringing state命令没有additional data, 回复Read ringing state命令的数据格式如下:
Ring和Read ringing state命令的处理函数是
static ssize_t ring_handle(struct bt_conn *conn,               const struct bt_gatt_attr *attr,               struct net_buf_simple *req_data_buf)和static ssize_t ringing_state_read_handle(struct bt_conn *conn,                     const struct bt_gatt_attr *attr,                     struct net_buf_simple *req_data_buf)1.6.4不必要的跟踪保护请求命令(Unwanted tracking protection request)
这个命令用于使能或禁止unwanted tracking protection功能。功能禁止的状态下, unwanted tracking protection相关的Bluetooth LE特征不允许被访问。命令格式如下:
命令处理函数是
static ssize_t activate_utp_mode_handle(struct bt_conn *conn,                    const struct bt_gatt_attr *attr,                    struct net_buf_simple *req_data_buf)和static ssize_t deactivate_utp_mode_handle(struct bt_conn *conn,                      const struct bt_gatt_attr *attr,                      struct net_buf_simple *req_data_buf)1.6.5命令响应
Provider通过write response响应Seeker,通过notification返回数据给Seeker。
如何命令错误或是验证不通过,write response的GATT error code如下所示:
正常的notification返回数据的格式如下:

3322456-20250508112436985-1388206094-nordic-semi-wireless-iot-YoLm-600w.jpeg.webp
         同一主题附件:
    3322456-20250508112436984-427466564-nordic-semi-wireless-iot-sToc-600w.jpeg.webp
    3322456-20250508112436770-1535051220-nordic-semi-wireless-iot-08NH-600w.jpeg.webp
    3322456-20250508112436744-1719857828-nordic-semi-wireless-iot-xpVs-600w.jpeg.webp
    3322456-20250508112436683-1384332684-nordic-semi-wireless-iot-O_Yd-600w.jpeg.webp
    3322456-20250508112436525-919548204-nordic-semi-wireless-iot-43ea-600w.jpeg.webp
    3322456-20250508112436985-1388206094-nordic-semi-wireless-iot-YoLm-600w.jpeg.webp
    3322456-20250508112436760-339301872.png.webp
    3322456-20250508112436946-1010603895-nordic-semi-wireless-iot-RX_x-600w.jpeg.jpg

小黑屋|手机版|我爱蓝牙网 - 52Bluetooth

GMT+8, 2025-8-19 05:27 , Processed in 0.049684 second(s), 10 queries , Gzip On, MemCached On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

返回顶部