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

device context storing issue

what is the procedure to find connected device is bonded or not, should i store the device, application or service context in persistent memory to help recognizing bonded devices? Iam using SDK10.0 and SoftDevice Version 110. iam using device manager for handling bonding process.

EDIT1: Actually the device was getting paired but not getting bonded. So the bonded device were not getting recognized.

I have attached the debug log trace here

Parents
  • Take a look at the function dm_ble_evt_handler() in device_manager_peripheral.c. Here bonded devices are stored in the bonded device list(m_connection_table).

    In order to check if a device already exists in the bonded device list, the function device_instance_find() is used. If the device exits in the list, the function returns NRF_SUCCESS.

  • Devices are not getting bonded because DM_EVT_DEVICE_CONTEXT_STORED is not generated even if device gets paired, When a non bonded device is connected it prompts for pairing in android mobile, the event generated when a non-bonded devices are connected are(Note: pairing is done during this connection):- DM_EVT_CONNECTION,DM_EVT_SECURITY_SETUP, DM_EVT_SECURITY_SETUP_COMPLETE and DM_EVT_LINK_SECURED. Events Generated when a paired(as i mentioned before bonding is not happening) device is connected are: DM_EVT_CONNECTION,LINK_SECURED.

Reply
  • Devices are not getting bonded because DM_EVT_DEVICE_CONTEXT_STORED is not generated even if device gets paired, When a non bonded device is connected it prompts for pairing in android mobile, the event generated when a non-bonded devices are connected are(Note: pairing is done during this connection):- DM_EVT_CONNECTION,DM_EVT_SECURITY_SETUP, DM_EVT_SECURITY_SETUP_COMPLETE and DM_EVT_LINK_SECURED. Events Generated when a paired(as i mentioned before bonding is not happening) device is connected are: DM_EVT_CONNECTION,LINK_SECURED.

Children
No Data
Related