__bt_core_set_status(BT_ACTIVATING);
if (TIZEN_FEATURE_BT_USB_DONGLE) {
- char *argv_up[] = {"/usr/bin/hciconfig", "/usr/bin/hciconfig", "hci0", "up", NULL};
- ret = __execute_command("/usr/bin/hciconfig", argv_up);
+ ret = __bt_call_systemact_service(BT_SYSTEMACT_HCI_UP);
+ if (ret < 0)
+ BT_ERR("Failed to call systemact service");
} else {
ret = __bt_stack_up();
}
if (ret < 0) {
BT_ERR("running script failed");
if (TIZEN_FEATURE_BT_USB_DONGLE) {
- char *argv_down[] = {"/usr/bin/hciconfig", "/usr/bin/hciconfig", "hci0", "down", NULL};
- ret = __execute_command("/usr/bin/hciconfig", argv_down);
+ ret = __bt_call_systemact_service(BT_SYSTEMACT_HCI_DOWN);
+ if (ret < 0)
+ BT_ERR("Failed to call systemact service");
} else {
ret = __execute_command("/usr/etc/bluetooth/bt-dev-end.sh", NULL);
}
if (status == BT_ACTIVATING) {
/* Forcely terminate */
if (TIZEN_FEATURE_BT_USB_DONGLE) {
- char *argv_down[] = {"/usr/bin/hciconfig", "/usr/bin/hciconfig", "hci0", "down", NULL};
- if (__execute_command("/usr/bin/hciconfig", argv_down) < 0)
- BT_ERR("running script failed");
+ if (__bt_call_systemact_service(BT_SYSTEMACT_HCI_DOWN) < 0)
+ BT_ERR("Failed to call systemact service");
} else {
-
#ifdef TIZEN_FEATURE_RADIO
int radio_status = VCONFKEY_RADIO_STATUS_OFF;
__bt_core_set_status(BT_DEACTIVATING);
if (TIZEN_FEATURE_BT_USB_DONGLE) {
- char *argv_down[] = {"/usr/bin/hciconfig", "/usr/bin/hciconfig", "hci0", "down", NULL};
- if (__execute_command("/usr/bin/hciconfig", argv_down) < 0) {
- BT_ERR("running script failed");
+ if (__bt_call_systemact_service(BT_SYSTEMACT_HCI_DOWN) < 0) {
+ BT_ERR("Failed to call systemact service");
__bt_core_set_status(BT_ACTIVATED);
return -1;
}
__bt_core_set_le_status(BT_LE_ACTIVATING);
BT_DBG("Activate BT");
if (TIZEN_FEATURE_BT_USB_DONGLE) {
- char *argv_up[] = {"/usr/bin/hciconfig", "/usr/bin/hciconfig", "hci0", "up", NULL};
- ret = __execute_command("/usr/bin/hciconfig", argv_up);
+ ret = __bt_call_systemact_service(BT_SYSTEMACT_HCI_UP);
+ if (ret < 0)
+ BT_ERR("Failed to call systemact service");
} else {
ret = __execute_command("/usr/etc/bluetooth/bt-stack-up.sh", NULL);
}
if (ret < 0) {
BT_ERR("running script failed");
if (TIZEN_FEATURE_BT_USB_DONGLE) {
- char *argv_down[] = {"/usr/bin/hciconfig", "/usr/bin/hciconfig", "hci0", "down", NULL};
- ret = __execute_command("/usr/bin/hciconfig", argv_down);
+ ret = __bt_call_systemact_service(BT_SYSTEMACT_HCI_DOWN);
+ if (ret < 0)
+ BT_ERR("Failed to call systemact service");
} else {
ret = __execute_command("/usr/etc/bluetooth/bt-dev-end.sh &", NULL);
}
__bt_core_set_le_status(BT_LE_DEACTIVATING);
int ret;
if (TIZEN_FEATURE_BT_USB_DONGLE) {
- char *argv_down[] = {"/usr/bin/hciconfig", "/usr/bin/hciconfig", "hci0", "down", NULL};
- ret = __execute_command("/usr/bin/hciconfig", argv_down);
+ ret = __bt_call_systemact_service(BT_SYSTEMACT_HCI_DOWN);
+ if (ret < 0)
+ BT_ERR("Failed to call systemact service");
} else {
ret = __execute_command("/usr/etc/bluetooth/bt-stack-down.sh", NULL);
}