int bt_adapter_le_scan_filter_unregister_all(void);
/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_5.0_MODULE
+ * @brief Checks if LE 2M PHY feature is supported or not.
+ * @since_tizen 5.0
+ *
+ * @remarks The LE 2M PHY feature was introduced in the BT 5.0 core specification.
+ *
+ * @param[out] is_supported The LE 2M PHY feature support: (@c true = supported , @c false = not supported)
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #BT_ERROR_NONE Successful
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED Operation failed
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.
+ */
+int bt_adapter_le_is_2m_phy_supported(bool *is_supported);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_5.0_MODULE
+ * @brief Checks if LE CODED PHY feature is supported or not.
+ * @since_tizen 5.0
+ *
+ * @remarks The LE CODED PHY feature was introduced in the BT 5.0 core specification.
+ *
+ * @param[out] is_supported The LE CODED PHY feature support: (@c true = supported , @c false = not supported)
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #BT_ERROR_NONE Successful
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #BT_ERROR_NOT_ENABLED Adapter is not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED Operation failed
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @pre The state of local Bluetooth must be #BT_ADAPTER_ENABLED.
+ */
+int bt_adapter_le_is_coded_phy_supported(bool *is_supported);
+
+/**
* @}
*/
#define BT_FEATURE_COMMON "tizen.org/feature/network.bluetooth"
#define BT_FEATURE_LE "tizen.org/feature/network.bluetooth.le"
+#define BT_FEATURE_LE_5_0 "tizen.org/feature/network.bluetooth.le.5_0"
#define BT_FEATURE_IPSP "tizen.org/feature/network.bluetooth.le.ipsp"
#define BT_FEATURE_AUDIO_CALL "tizen.org/feature/network.bluetooth.audio.call"
#define BT_FEATURE_AUDIO_MEDIA "tizen.org/feature/network.bluetooth.audio.media"
BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_LE); \
}
+#define BT_CHECK_LE_5_0_SUPPORT() \
+{ \
+ BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_LE); \
+ BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_LE_5_0); \
+}
+
static bt_scan_filter_h pxp_linkloss_alert_filter;
static bt_scan_filter_h pxp_immediate_alert_filter;
static bt_scan_filter_h pxp_signal_loss_filter;
return error_code;
}
+
+int bt_adapter_le_is_2m_phy_supported(bool *is_supported)
+{
+ int ret = BT_ERROR_NONE;
+ gboolean support = FALSE;
+
+ BT_CHECK_LE_5_0_SUPPORT();
+ BT_CHECK_INIT_STATUS();
+ BT_CHECK_INPUT_PARAMETER(is_supported);
+
+ ret = _bt_get_error_code(bluetooth_is_le_2m_phy_supported(&support));
+ if (ret != BT_ERROR_NONE) {
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
+ return ret;
+ }
+
+ *is_supported = support ? true : false;
+
+ return BT_ERROR_NONE;
+}
+
+int bt_adapter_le_is_coded_phy_supported(bool *is_supported)
+{
+ int ret = BT_ERROR_NONE;
+ gboolean support = FALSE;
+
+ BT_CHECK_LE_5_0_SUPPORT();
+ BT_CHECK_INIT_STATUS();
+ BT_CHECK_INPUT_PARAMETER(is_supported);
+
+ ret = _bt_get_error_code(bluetooth_is_le_coded_phy_supported(&support));
+ if (ret != BT_ERROR_NONE) {
+ BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
+ return ret;
+ }
+
+ *is_supported = support ? true : false;
+
+ return BT_ERROR_NONE;
+}
, BT_UNIT_TEST_FUNCTION_ADAPTER_LE_WRITE_HOST_SUGGESTED_DEFAULT_DATA_LENGTH},
{"bt_adater_le_read_host_suggested_def_data_length"
, BT_UNIT_TEST_FUNCTION_ADAPTER_LE_READ_HOST_SUGGESTED_DEFAULT_DATA_LENGTH},
+ {"bt_adapter_le_is_2m_phy_supported"
+ , BT_UNIT_TEST_FUNCTION_LE_2M_PHY_SUPPORT},
+ {"bt_adapter_le_is_coded_phy_supported"
+ , BT_UNIT_TEST_FUNCTION_LE_CODED_PHY_SUPPORT},
{"Select this menu to set parameters and then select the function again."
, BT_UNIT_TEST_FUNCTION_ACTIVATE_FLAG_TO_SET_PARAMETERS},
{NULL , 0x0000},
def_tx_octets, def_tx_time);
break;
}
+ case BT_UNIT_TEST_FUNCTION_LE_2M_PHY_SUPPORT: {
+ TC_PRT("Check LE 2M PHY Feature support");
+ bool is_2m_phy_supported = FALSE;
+
+ ret = bt_adapter_le_is_2m_phy_supported(&is_2m_phy_supported);
+ TC_PRT("returns %s\n", __bt_get_error_message(ret));
+ TC_PRT("LE 2M PHY Support [%s]", is_2m_phy_supported ? "YES" : "NO");
+ break;
+ }
+ case BT_UNIT_TEST_FUNCTION_LE_CODED_PHY_SUPPORT: {
+
+ TC_PRT("Check LE CODED PHY Feature support");
+ bool is_coded_phy_supported = FALSE;
+
+ ret = bt_adapter_le_is_coded_phy_supported(&is_coded_phy_supported);
+ TC_PRT("returns %s\n", __bt_get_error_message(ret));
+ TC_PRT("LE CODED PHY Support [%s]", is_coded_phy_supported ? "YES" : "NO");
+ break;
+ }
case BT_UNIT_TEST_FUNCTION_LE_DEVICE_SET_DATA_LENGTH: {
TC_PRT("Set LE Data length paramters cmd");
BT_UNIT_TEST_FUNCTION_ADAPTER_LE_READ_MAXIMUM_DATA_LENGTH,
BT_UNIT_TEST_FUNCTION_ADAPTER_LE_WRITE_HOST_SUGGESTED_DEFAULT_DATA_LENGTH,
BT_UNIT_TEST_FUNCTION_ADAPTER_LE_READ_HOST_SUGGESTED_DEFAULT_DATA_LENGTH,
+ BT_UNIT_TEST_FUNCTION_LE_2M_PHY_SUPPORT,
+ BT_UNIT_TEST_FUNCTION_LE_CODED_PHY_SUPPORT,
BT_UNIT_TEST_FUNCTION_LE_DEVICE_SET_DATA_LENGTH,
BT_UNIT_TEST_FUNCTION_LE_DEVICE_DATA_LENGTH_CHANGED_CB,
BT_UNIT_TEST_FUNCTION_DEVICE_SET_AUTHORIZATION_TRUE = 1,