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










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