This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Device Manager (peripheral) SDK6

Hi guys,

i'm just porting my app from SDK5.2+SDv6.0.0 to SDK6.0+SDv7.0.0 and stuck with the device manager. There rises some questions, and i hope someone can help me.

  • what i want just bonding (without saving any context), after initialising (pstorage_init, dm_init and dm_register) and dispatching the (dm_ble_evt_handler(p_ble_evt); the bonding should be working or do i have to call sd_ble_gap_sec_info_reply and sd_ble_gap_sec_params_reply a second time in my application?

  • after a successful bonding of 2 devices, i get a whitelist with addr_count == 2 but if i create it with the given api-function, it returns two identical address of the first bonded device.

  • I saw, there are lot of DebugLog commands in the device_manager. After undefine resp. defining the Macros, what else i have todo to log? Is printf already directed to the UART?

Thanks a lot in advance!

Kind regards, Leo

Parents
  • Hi Leo,

    what i want just bonding (without saving any context), after initialising (pstorage_init, dm_init and dm_register) and dispatching the (dm_ble_evt_handler(p_ble_evt); the bonding should be working or do i have to call sd_ble_gap_sec_info_reply and sd_ble_gap_sec_params_reply a second time in my application?

    [Krishna]: You do not need to and should handle sd_ble_gap_sec_info_reply and sd_ble_gap_sec_params_reply anywhere in the application. This should be handled by thedevice manager module. Also, please ensure that 'pstorage_sys_event_handler' is provided with system events. You need to register for system events using the softdevice_sys_evt_handler_set API.

    after a successful bonding of 2 devices, i get a whitelist with addr_count == 2 but if i create it with the given api-function, it returns two identical address of the first bonded device.

    [Krishna]: This is strange. Its is possible to paste your code to create the white list here. I have verified locally for HID Keyboard example that the white list is created as expected with different addresses after disconnect and after power cycle of the device as well. Hence your code will help understand problem you are facing better.

    I saw, there are lot of DebugLog commands in the device_manager. After undefine resp. defining the Macros, what else i have todo to log? Is printf already directed to the UART?

    To enable log, you will have to define ENABLE_DEBUG_LOG_SUPPORT in addition. Also recommend reading documentation on the trace library under 'Debug Logger' in the libraries section.

Reply
  • Hi Leo,

    what i want just bonding (without saving any context), after initialising (pstorage_init, dm_init and dm_register) and dispatching the (dm_ble_evt_handler(p_ble_evt); the bonding should be working or do i have to call sd_ble_gap_sec_info_reply and sd_ble_gap_sec_params_reply a second time in my application?

    [Krishna]: You do not need to and should handle sd_ble_gap_sec_info_reply and sd_ble_gap_sec_params_reply anywhere in the application. This should be handled by thedevice manager module. Also, please ensure that 'pstorage_sys_event_handler' is provided with system events. You need to register for system events using the softdevice_sys_evt_handler_set API.

    after a successful bonding of 2 devices, i get a whitelist with addr_count == 2 but if i create it with the given api-function, it returns two identical address of the first bonded device.

    [Krishna]: This is strange. Its is possible to paste your code to create the white list here. I have verified locally for HID Keyboard example that the white list is created as expected with different addresses after disconnect and after power cycle of the device as well. Hence your code will help understand problem you are facing better.

    I saw, there are lot of DebugLog commands in the device_manager. After undefine resp. defining the Macros, what else i have todo to log? Is printf already directed to the UART?

    To enable log, you will have to define ENABLE_DEBUG_LOG_SUPPORT in addition. Also recommend reading documentation on the trace library under 'Debug Logger' in the libraries section.

Children
Related