diff --git a/bluetooth/drivers/bluetoothctl.c b/bluetooth/drivers/bluetoothctl.c index f3205c8ee9..31f5a24447 100644 --- a/bluetooth/drivers/bluetoothctl.c +++ b/bluetooth/drivers/bluetoothctl.c @@ -170,8 +170,7 @@ static bool bluetoothctl_connect_device(void *data, unsigned idx) string_list_free(list); snprintf(btctl->command, sizeof(btctl->command), "\ - bluetoothctl -- trust %s", - device); + bluetoothctl -- pairable on"); pclose(popen(btctl->command, "r")); @@ -181,6 +180,12 @@ static bool bluetoothctl_connect_device(void *data, unsigned idx) pclose(popen(btctl->command, "r")); + snprintf(btctl->command, sizeof(btctl->command), "\ + bluetoothctl -- trust %s", + device); + + pclose(popen(btctl->command, "r")); + snprintf(btctl->command, sizeof(btctl->command), "\ bluetoothctl -- connect %s", device);