if ((p_hcon->conn_flags & HID_CONN_FLAGS_IS_ORIG) &&
(p_hcon->conn_flags & HID_CONN_FLAGS_MY_CTRL_CFG_DONE)) {
p_hcon->disc_reason = HID_L2CAP_CONN_FAIL;
- if ((p_hcon->intr_cid = L2CA_ConnectReq2(
- HID_PSM_INTERRUPT, hd_cb.device.addr, BTM_SEC_NONE)) == 0) {
+ if ((p_hcon->intr_cid =
+ L2CA_ConnectReq2(HID_PSM_INTERRUPT, hd_cb.device.addr,
+ BTA_SEC_AUTHENTICATE | BTA_SEC_ENCRYPT)) == 0) {
hidd_conn_disconnect();
p_hcon->conn_state = HID_CONN_STATE_UNUSED;
if ((p_hcon->conn_flags & HID_CONN_FLAGS_IS_ORIG) &&
(p_hcon->conn_flags & HID_CONN_FLAGS_HIS_CTRL_CFG_DONE)) {
p_hcon->disc_reason = HID_L2CAP_CONN_FAIL;
- if ((p_hcon->intr_cid = L2CA_ConnectReq2(
- HID_PSM_INTERRUPT, hd_cb.device.addr, BTM_SEC_NONE)) == 0) {
+ if ((p_hcon->intr_cid =
+ L2CA_ConnectReq2(HID_PSM_INTERRUPT, hd_cb.device.addr,
+ BTA_SEC_AUTHENTICATE | BTA_SEC_ENCRYPT)) == 0) {
hidd_conn_disconnect();
p_hcon->conn_state = HID_CONN_STATE_UNUSED;
if (!L2CA_Register2(HID_PSM_INTERRUPT, (tL2CAP_APPL_INFO*)&dev_reg_info,
false /* enable_snoop */, nullptr,
- hd_cb.l2cap_intr_cfg.mtu, BTM_SEC_NONE)) {
+ hd_cb.l2cap_intr_cfg.mtu,
+ BTA_SEC_AUTHENTICATE | BTA_SEC_ENCRYPT)) {
L2CA_Deregister(HID_PSM_CONTROL);
HIDD_TRACE_ERROR("HID Interrupt (device) registration failed");
return (HID_ERR_L2CAP_FAILED);
}
if (!L2CA_Register2(HID_PSM_INTERRUPT, (tL2CAP_APPL_INFO*)&hst_reg_info,
false /* enable_snoop */, nullptr, hh_cb.l2cap_cfg.mtu,
- BTM_SEC_NONE)) {
+ BTA_SEC_AUTHENTICATE | BTA_SEC_ENCRYPT)) {
L2CA_Deregister(HID_PSM_CONTROL);
HIDH_TRACE_ERROR("HID-Host Interrupt Registration failed");
return (HID_ERR_L2CAP_FAILED);
CLOSE_EVT: Connection
Attempt was made but failed
*/
- p_hcon->intr_cid = L2CA_ConnectReq2(
- HID_PSM_INTERRUPT, hh_cb.devices[dhandle].addr, BTM_SEC_NONE);
+ p_hcon->intr_cid =
+ L2CA_ConnectReq2(HID_PSM_INTERRUPT, hh_cb.devices[dhandle].addr,
+ BTA_SEC_AUTHENTICATE | BTA_SEC_ENCRYPT);
if (p_hcon->intr_cid == 0) {
HIDH_TRACE_WARNING("HID-Host INTR Originate failed");
reason = HID_L2CAP_REQ_FAIL;
CLOSE_EVT: Connection
Attempt was made but failed
*/
- p_hcon->intr_cid = L2CA_ConnectReq2(
- HID_PSM_INTERRUPT, hh_cb.devices[dhandle].addr, BTM_SEC_NONE);
+ p_hcon->intr_cid =
+ L2CA_ConnectReq2(HID_PSM_INTERRUPT, hh_cb.devices[dhandle].addr,
+ BTA_SEC_AUTHENTICATE | BTA_SEC_ENCRYPT);
if (p_hcon->intr_cid == 0) {
HIDH_TRACE_WARNING("HID-Host INTR Originate failed");
reason = HID_L2CAP_REQ_FAIL;