#endif
return ret;
}
+oal_status_t is_advertising(void)
+{
+ int ret = BT_STATUS_SUCCESS;
+ API_TRACE();
+ CHECK_OAL_INITIALIZED();
+#ifdef TIZEN_BT_HAL
+ if (OAL_STATUS_SUCCESS != hw_is_module_ready()) {
+ g_timeout_add(200, retry_enable_le, NULL);
+ return OAL_STATUS_PENDING;
+ }
+ int r = blued_api->is_advertising();
+ if (r == TRUE)
+ ret = BT_STATUS_SUCCESS;
+ else
+ ret = BT_STATUS_FAIL;
+#else
+ BT_INFO("Not Supported");
+ ret = OAL_STATUS_NOT_SUPPORT;
+#endif
+ return ret;
+}
oal_status_t adapter_start_custom_inquiry(discovery_type_t disc_type)
{
int ret;
CHECK_OAL_INITIALIZED();
API_TRACE();
-
ret = blued_api->get_adapter_property(BT_PROPERTY_UUIDS);
if (ret != BT_STATUS_SUCCESS) {
BT_ERR("get_adapter_property failed: [%s]", status2string(ret));
return convert_to_oal_status(ret);
}
-
return OAL_STATUS_SUCCESS;
}
BT_DBG("status: %d, count: %d", status, num_properties);
+ print_bt_properties(num_properties, properties);
+
if (status != BT_STATUS_SUCCESS) {
if (num_properties == 1) {
BT_ERR("Adapter Prop failed: status: [%s], count: %d, prop: %d",
char * adap_name = g_strdup(local_name);
/* Application has requested this property SET/GET hence send EVENT */
- send_event(OAL_EVENT_ADAPTER_PROPERTY_NAME, adap_name, strlen(adap_name));
+ send_event(OAL_EVENT_ADAPTER_PROPERTY_NAME, adap_name, strlen(adap_name)+1);
}
break;
}
event_data, (sizeof(event_device_list_t) + num_bonded * sizeof(bt_bdaddr_t)));
break;
}
+ case BT_PROPERTY_LOCAL_LE_FEATURES: {
+ event_adapter_le_features_t *le_features;
+
+ le_features = g_malloc(sizeof(event_adapter_le_features_t));
+
+ le_features->max_adv_instance = ((bt_local_le_features_t *)(properties[i].val))->max_adv_instance;
+ le_features->rpa_offloading = ((bt_local_le_features_t *)(properties[i].val))->rpa_offload_supported;
+ le_features->max_adv_filter = ((bt_local_le_features_t *)(properties[i].val))->max_adv_filter_supported;
+ le_features->le_2m_phy_support = ((bt_local_le_features_t *)(properties[i].val))->le_2m_phy_supported;
+ le_features->le_coded_phy_support = ((bt_local_le_features_t *)(properties[i].val))->le_2m_phy_supported;
+
+ BT_INFO("LE 2M PHY Support (%d)", le_features->le_2m_phy_support);
+ BT_INFO("LE CODED PHY Support (%d)", le_features->le_coded_phy_support);
+
+ send_event(OAL_EVENT_BLE_LOCAL_FEATURES,
+ le_features,
+ sizeof(event_adapter_le_features_t));
+ break;
+ }
default:
BT_WARN("Unhandled property: %d", properties[i].type);
break;