/*******************************************************************************
**
+** Function btif_dm_hh_open_failed
+**
+** Description informs the upper layers if the HH have failed during bonding
+**
+** Returns none
+**
+*******************************************************************************/
+
+void btif_dm_hh_open_failed(bt_bdaddr_t *bdaddr)
+{
+ if (pairing_cb.state == BT_BOND_STATE_BONDING &&
+ bdcmp(bdaddr->address, pairing_cb.bd_addr) == 0)
+ {
+ bond_state_changed(BT_STATUS_FAIL, bdaddr, BT_BOND_STATE_NONE);
+ }
+}
+
+/*******************************************************************************
+**
** Function btif_dm_remove_bond
**
** Description Removes bonding with the specified device
extern void btif_dm_cb_remove_bond(bt_bdaddr_t *bd_addr);
extern BOOLEAN check_cod_hid(const bt_bdaddr_t *remote_bdaddr, uint32_t cod);
extern int scru_ascii_2_hex(char *p_ascii, int len, UINT8 *p_hex);
+extern void btif_dm_hh_open_failed(bt_bdaddr_t *bdaddr);
/*****************************************************************************
** Local Function prototypes
}
else {
bt_bdaddr_t *bdaddr = (bt_bdaddr_t*)p_data->conn.bda;
+ btif_dm_hh_open_failed(bdaddr);
HAL_CBACK(bt_hh_callbacks, connection_state_cb, (bt_bdaddr_t*) &p_data->conn.bda,BTHH_CONN_STATE_DISCONNECTED);
btif_hh_cb.status = BTIF_HH_DEV_DISCONNECTED;
}