device manager - 1????


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中绑定信息的分析










發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章