BTM_SetEncryption() function
* Function BTM_SetEncryption * Description This function is called to ensure that connection is * encrypted. Should be called only on an open connection. * Typically only needed for connections that first want to * bring up unencrypted links, then later encrypt them. * Parameters: bd_addr - Address of the peer device * p_callback - Pointer to callback function called if * this function returns PENDING after required * procedures are completed. Can be set to NULL * if status is not desired. * p_ref_data - pointer to any data the caller wishes to receive * in the callback function upon completion. can be set to NULL if not used. * transport - TRUE to encryption the link over LE transport * or FALSE for BR/EDR transport * Returns BTM_SUCCESS - already encrypted * BTM_PENDING - command will be returned in the callback * BTM_WRONG_MODE- connection not up. * BTM_BUSY - security procedures are currently active * BTM_MODE_UNSUPPORTED - if security manager not linked in.
BTM_SetEncryption() is called by 5 functions and calls 8 functions:
![]()
BTM_SetEncryption()
BTM_SetEncryption() reads 18 variables and writes 5 variables:
![]()
BTM_SetEncryption()