bt_status_t btif_storage_get_remote_version(const bt_bdaddr_t *remote_bd_addr,
bt_remote_version_t *p_ver);
-/*******************************************************************************
-**
-** Function btif_storage_set_dmt_support_type
-**
-** Description Sets DMT support status for a remote device
-**
-** Returns BT_STATUS_SUCCESS if config update is successful
-** BT_STATUS_FAIL otherwise
-**
-*******************************************************************************/
-
-bt_status_t btif_storage_set_dmt_support_type(const bt_bdaddr_t *remote_bd_addr,
- BOOLEAN dmt_supported);
-
-
-
-/*******************************************************************************
-**
-** Function btif_storage_is_dmt_supported_device
-**
-** Description checks if a device supports Dual mode topology
-**
-** Returns TRUE if remote supports DMT else FALSE
-**
-*******************************************************************************/
-
-BOOLEAN btif_storage_is_dmt_supported_device(const bt_bdaddr_t *remote_bd_addr);
-
-
#endif /* BTIF_STORAGE_H */
ASSERTC(status == BT_STATUS_SUCCESS, "failed to save remote device (inquiry)", status);
#if (defined(BLE_INCLUDED) && (BLE_INCLUDED == TRUE))
status = btif_storage_set_remote_addr_type(&bdaddr, addr_type);
- if (( dev_type == BT_DEVICE_TYPE_DUMO)&&
- (p_search_data->inq_res.flag & BTA_BLE_DMT_CONTROLLER_SPT) &&
- (p_search_data->inq_res.flag & BTA_BLE_DMT_HOST_SPT))
- {
- btif_storage_set_dmt_support_type (&bdaddr, TRUE);
- }
ASSERTC(status == BT_STATUS_SUCCESS, "failed to save remote addr type (inquiry)", status);
#endif
/* Callback to notify upper layer of device */
{
status = BT_STATUS_SUCCESS;
state = BT_BOND_STATE_BONDED;
-
+ int addr_type;
+ bt_bdaddr_t bdaddr;
+ bdcpy(bdaddr.address, p_auth_cmpl->bd_addr);
+ if (btif_storage_get_remote_addr_type(&bdaddr, &addr_type) != BT_STATUS_SUCCESS)
+ btif_storage_set_remote_addr_type(&bdaddr, p_auth_cmpl->addr_type);
btif_dm_save_ble_bonding_keys();
BTA_GATTC_Refresh(bd_addr.address);
btif_dm_get_remote_services(&bd_addr);
}
}
- if (( p_btif_cb->device_type == BT_DEVICE_TYPE_DUMO)&&
- (p_btif_cb->flag & BTA_BLE_DMT_CONTROLLER_SPT) &&
- (p_btif_cb->flag & BTA_BLE_DMT_HOST_SPT))
- {
- btif_storage_set_dmt_support_type (&(p_btif_cb->bd_addr), TRUE);
- }
-
dev_type = p_btif_cb->device_type;
BTIF_STORAGE_FILL_PROPERTY(&properties,
BT_PROPERTY_TYPE_OF_DEVICE, sizeof(dev_type), &dev_type);
break;
case BT_DEVICE_TYPE_DUMO:
- if ((p_cb->transport == GATT_TRANSPORT_LE) &&
- (btif_storage_is_dmt_supported_device(&(p_cb->bd_addr)) == TRUE))
+ if (p_cb->transport == GATT_TRANSPORT_LE)
transport = BTA_GATT_TRANSPORT_LE;
else
transport = BTA_GATT_TRANSPORT_BR_EDR;
break;
case BT_DEVICE_TYPE_DUMO:
- if ((p_cb->transport == GATT_TRANSPORT_LE) &&
- (btif_storage_is_dmt_supported_device(&(p_cb->bd_addr)) == TRUE))
+ if (p_cb->transport == GATT_TRANSPORT_LE)
transport = BTA_GATT_TRANSPORT_LE;
else
transport = BTA_GATT_TRANSPORT_BR_EDR;
}
-/*******************************************************************************
-**
-** Function btif_storage_set_dmt_support_type
-**
-** Description Sets DMT support status for a remote device
-**
-** Returns BT_STATUS_SUCCESS if config update is successful
-** BT_STATUS_FAIL otherwise
-**
-*******************************************************************************/
-
-bt_status_t btif_storage_set_dmt_support_type(const bt_bdaddr_t *remote_bd_addr,
- BOOLEAN dmt_supported)
-{
- int ret;
- bdstr_t bdstr = {0};
- if(remote_bd_addr)
- {
- bdaddr_to_string(remote_bd_addr, bdstr, sizeof(bdstr));
- }
- else
- {
- BTIF_TRACE_ERROR("%s NULL BD Address", __FUNCTION__);
- return BT_STATUS_FAIL;
- }
-
- ret = btif_config_set_int(bdstr,"DMTSupported", (int)dmt_supported);
- return ret ? BT_STATUS_SUCCESS:BT_STATUS_FAIL;
-
-}
-
-/*******************************************************************************
-**
-** Function btif_storage_is_dmt_supported_device
-**
-** Description checks if a device supports Dual mode topology
-**
-** Returns TRUE if remote address is valid and supports DMT else FALSE
-**
-*******************************************************************************/
-
-BOOLEAN btif_storage_is_dmt_supported_device(const bt_bdaddr_t *remote_bd_addr)
-{
- int dmt_supported = 0;
- bdstr_t bdstr = {0};
- if(remote_bd_addr)
- bdaddr_to_string(remote_bd_addr, bdstr, sizeof(bdstr));
-
- if(remote_bd_addr)
- {
- bdaddr_to_string(remote_bd_addr, bdstr, sizeof(bdstr));
- }
- else
- {
- BTIF_TRACE_ERROR("%s NULL BD Address", __FUNCTION__);
- return FALSE;
- }
-
- btif_config_get_int(bdstr,"DMTSupported", &dmt_supported);
-
- return dmt_supported == 1 ? TRUE:FALSE;
-}
-
-