Device Manager
The Device Manager module manages Active and Bonded Peers. Management of peer includes book keeping of contextual information like the Security Keys, GATT configuration and any application specific information.
设备管理模块管理 连接和配对绑定。配对管理包括 登记保持上下文信息,如安全秘钥、GATT配置、和应用特定信息。
* Active Peers are devices which are connected, and may or may not be bonded.
* Bonded Peers are devices which are bonded, and may or may not be Active (Connected).
* Active Bonded Peer refers to a device which is connected and bonded.
本例子不涉及bt ,所以bt部分也归用户自由使用。
device_manager_init(0); //初始化 不擦除ps
device_manager_init(1); //初始化 擦除ps
查看flash中存储绑定信息:(debug模式下,调用memory1)
存储操作由事件触发,查看void dm_ble_evt_handler(ble_evt_t * p_ble_evt)
1、PSTORAGE_NUM_OF_PAGES为1 ,设备管理信息储存在 0x7E000起始地址页。(第一次调试的时候为1,不知道为什么总是绑定不了????)
2、使用lightblue进行第一次配对绑定后
3、在手机的设置里解除蓝牙绑定,使用lightblue进行第二次配对绑定后
4、ps中绑定信息的分析
本文介绍了设备管理模块的工作原理,包括连接设备(Active Peers)、已配对绑定设备(Bonded Peers)及其上下文信息的管理,如安全密钥、GATT配置等。文中还提到了设备管理模块的初始化过程及存储绑定信息的方法。
1518

被折叠的 条评论
为什么被折叠?



