return -1;
}
- /* We need to insert BT driver module by using 'insmod' in case of ARTIK530,
- * and 'insmod' should be executed by systemd not bt-core. */
- ret = __bt_call_systemact_service(BT_SYSTEMACT_BT_DRIVER_INSMOD);
+ ret = __bt_call_systemact_service(BT_SYSTEMACT_STACK_UP);
if (ret < 0) {
BT_ERR("Failed to call systemact service");
return -1;
- } else {
- /* Insmod should run before bt-stack-up.sh command */
- usleep(1000 * 200); /* 200ms */
- }
-
- ret = __execute_command("/usr/etc/bluetooth/bt-stack-up.sh", NULL);
- if (ret < 0) {
- BT_ERR("Failed to run script");
- __bt_call_systemact_service(BT_SYSTEMACT_HCI_LOGGER_STOP);
- return -1;
}
/* activate Bluez */
if (ret < 0)
BT_ERR("Failed to call systemact service");
} else {
- ret = __execute_command("/usr/etc/bluetooth/bt-stack-up.sh", NULL);
+ ret = __bt_call_systemact_service(BT_SYSTEMACT_STACK_UP);
+ if (ret < 0)
+ BT_ERR("Failed to call systemact service");
}
if (ret < 0) {
BT_ERR("running script failed");
#define BT_SYSTEMACT_BLUETOOTH_SHARE_START "/run/.bluetooth_share_start"
#define BT_SYSTEMACT_RFKILL_UNBLOCK "/run/.rfkill_unblock"
#define BT_SYSTEMACT_RFKILL_BLOCK "/run/.rfkill_block"
+#define BT_SYSTEMACT_STACK_UP "/run/.bt_stack_up"
#define BT_SYSTEMACT_STACK_DOWN "/run/.bt_stack_down"
#define BT_SYSTEMACT_STACK_DOWN_WITH_RADIO "/run/.bt_stack_down_with_radio"
-#define BT_SYSTEMACT_BT_DRIVER_INSMOD "/run/.bt_driver_insmod"
#define BT_CORE_TYPE (bt_core_get_type())