![]() ![]() In this example, we use a here-string to redirect our string to stdin. ![]() ![]() However, there is a way we can use select in a similar way to non-interactive mode: $ bluetoothctl <<< $'select 34:02:86:03:7C:F2\nlist\n' Since the select command only changes the default controller for the current session, it will only work within interactive mode. Non-interactive mode opens up a new session per command, but the interactive shell maintains the same session until exited. ![]() In this example, we used the select command in interactive mode. To change the default controller, we use the bluetoothctl select command, passing the MAC address of the controller we want to connect to: # select 34:02:86:03:7C:F2Ĭontroller 34:02:86:03:7C:F2 pc-m Ĭontroller 34:02:86:03:7C:F2 pc-m #2 The default controller is the controller that will be operated on when we run a command. This command outputs information about the connected Bluetooth controllers, including their MAC addresses and what the default controller is. Let’s use the bluetoothctl list command to get a list of connected Bluetooth controllers: $ bluetoothctl listĬontroller 00:1A:7D:DA:71:15 pc-m ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |