Bluetooth: Peripheral Accept List
概述
本示例演示了 BLE 广播接收名单过滤功能。程序运行后,如果没有和其他设备 bond 过, 将执行普通的广播功能。一旦同其他设备 bond 成功,就会将该地址加入过滤名单,系统重启 后将只接收在过滤名单中的设备发起的连接操作。同样,扫描响应也只会发送给在过滤名单 中的设备。 本示例提供了两个 BLE BLE characteristics, 其中写操作需要 bond 流程,读操作不需要 bond 流程。
环境要求
支持 BLE 功能的开发板
支持 BLE 中央设备功能的其他设备,如智能手机
编译和烧录
示例位置:
examples/bluetooth/peripheral_accept_list
编译、烧录等操作请参考:[快速入门](https://doc.winnermicro.net/w800/zh_CN/2.1.0rc1/get_started/index.html)
运行结果
I/bt_smp [0.026] LE SC enabled
I/bt_hci_core [0.158] No ID address. App must call settings_load()
I/peripheral_acl [0.164] Bluetooth initialized
E/settings [0.170] set-value failure. key: bt/name error(-2)
I/bt_hci_core [0.176] Identity: 28:6D:CE:01:02:03 (public)
I/bt_hci_core [0.182] HCI: version 4.2 (0x08) revision 0x0709, manufacturer 0x070c
I/bt_hci_core [0.188] LMP: version 4.2 (0x08) subver 0x0709
I/peripheral_acl [0.314] Advertising successfully started