GAP_ConnOpen() function
* Function GAP_ConnOpen * Description This function is called to open an L2CAP connection. * Parameters: is_server - If TRUE, the connection is not created * but put into a "listen" mode waiting for * the remote side to connect. * service_id - Unique service ID from * BTM_SEC_SERVICE_FIRST_EMPTY (6) * to BTM_SEC_MAX_SERVICE_RECORDS (32) * p_rem_bda - Pointer to remote BD Address. * If a server, and we don't care about the * remote BD Address, then NULL should be passed. * psm - the PSM used for the connection * p_config - Optional pointer to configuration structure. * If NULL, the default GAP configuration will * be used. * security - security flags * chan_mode_mask - (GAP_FCR_CHAN_OPT_BASIC, GAP_FCR_CHAN_OPT_ERTM, * GAP_FCR_CHAN_OPT_STREAM) * p_cb - Pointer to callback function for events. * Returns handle of the connection if successful, else GAP_INVALID_HANDLE