bluetoothctl: add / modify pairing steps (#13818)
due to some changes in bluez / bluetoothctl, `pairable on` is required in order to create a `[LinkKey]` section in the configuration file for the connected device. if this section is missing, the device / gamepad will not pair after being disconnect and has to be repaired again.pull/13822/head
parent
f353898a9d
commit
b2b2425203
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue