Connect to Bluetooth Using Command

Credit to website:

https://lifehacker.com/everything-you-need-to-set-up-bluetooth-on-the-raspberr-1768482065

From the command line, type in bluetoothctl to launch the Bluetooth tool. From here, you have a bunch of commands you can run, but connecting to a device is pretty straightforward:

  1. From the bluetoothctl tool, type in power on to make sure Bluetooth is on.
  2. Type in agent on to make sure Bluetooth is running.
  3. Type in scan on to start searching for nearby Bluetooth devices.
  4. You should see all your various Bluetooth devices pop up with their MAC address (it’s the number shown on the screen next to the device name, usually something like “50:54:B4:45:00:EB”). Make a note of the MAC address for the device you want to pair with your Raspberry Pi.
  5. Type connect followed by the MAC address, like connect 50:54:B4:45:00:EB