void doNothing(uint8_t* data, uint16_t len) {}
-/*******************************************************************************
- *
- * Function BTM_BleSetPhy
- *
- * Description To set PHY preferences for specified LE connection
- *
- *
- * Returns BTM_SUCCESS if command successfully sent to controller,
- * BTM_MODE_UNSUPPORTED if local controller doesn't support LE
- * 2M or LE Coded PHY,
- * BTM_ILLEGAL_VALUE if specified remote doesn't support LE 2M
- * or LE Coded PHY,
- * BTM_WRONG_MODE if Device in wrong mode for request.
- *
- ******************************************************************************/
void BTM_BleSetPhy(const RawAddress& bd_addr, uint8_t tx_phys, uint8_t rx_phys,
uint16_t phy_options) {
if (bluetooth::shim::is_gd_shim_enabled()) {
phy_options);
}
if (!BTM_IsAclConnectionUp(bd_addr, BT_TRANSPORT_LE)) {
- BTM_TRACE_ERROR("%s: Wrong mode: no LE link exist or LE not supported",
- __func__);
+ LOG_INFO(
+ "Unable to set phy preferences because no le acl is connected to "
+ "device");
return;
}
if (tx_phys == 0) all_phys &= 0x01;
if (rx_phys == 0) all_phys &= 0x02;
- BTM_TRACE_DEBUG(
- "%s: all_phys = 0x%02x, tx_phys = 0x%02x, rx_phys = 0x%02x, phy_options "
- "= 0x%04x",
- __func__, all_phys, tx_phys, rx_phys, phy_options);
-
uint16_t handle = acl_get_hci_handle_for_hcif(bd_addr, BT_TRANSPORT_LE);
// checking if local controller supports it!
if (!controller_get_interface()->supports_ble_2m_phy() &&
!controller_get_interface()->supports_ble_coded_phy()) {
- BTM_TRACE_ERROR("%s failed, request not supported in local controller!",
- __func__);
+ LOG_INFO("Local controller unable to support setting of le phy parameters");
gatt_notify_phy_updated(GATT_REQ_NOT_SUPPORTED, handle, tx_phys, rx_phys);
return;
}
if (!acl_peer_supports_ble_2m_phy(handle) &&
!acl_peer_supports_ble_coded_phy(handle)) {
- BTM_TRACE_ERROR("%s failed, peer does not support request", __func__);
+ LOG_INFO("Remote device unable to support setting of le phy parameter");
gatt_notify_phy_updated(GATT_REQ_NOT_SUPPORTED, handle, tx_phys, rx_phys);
return;
}