Chapter 9. Connecting Bluetooth devices
You can wirelessly connect Bluetooth devices like keyboards, mouse, headsets, and other Bluetooth supported devices to your Red Hat Enterprise Linux system. Bluetooth settings in the GNOME desktop environment provide an interface to discover, pair, and manage your Bluetooth devices.
You can connect Bluetooth devices using the graphical user interface and the bluetoothctl command-line utility.
9.1. Connecting Bluetooth devices with GUI Copy linkLink copied to clipboard!
Connect your Bluetooth devices from the Settings application in the GNOME desktop environment.
Prerequisites
-
The
bluetooth.serviceunit is enabled.
Procedure
- On your Red Hat Enterprise Linux, go to Settings > Bluetooth.
- Toggle the button at the top-right corner to switch ON the Bluetooth. Your system automatically starts scanning for nearby discoverable devices.
- Put the device you want to connect within range of your system into pairing mode.
- When your device is discovered, click on it and follow the on-screen instructions to pair.
- Optional: Verify the PIN between your Bluetooth device and your system.
- Click Confirm.
The devices you previously paired might connect automatically when they are turned on and within range.
Verification
- When your device is connected, click on it. You can verify connection status, device type, physical address, and other information of your device.
9.2. Connecting Bluetooth devices with bluetoothctl Copy linkLink copied to clipboard!
bluetoothctl is a command-line utility to scan for, pair, connect, and manage connections without relying on a graphical user interface.
Prerequisites
-
The
bluetooth.serviceunit is enabled.
Procedure
Enter into the
bluetoothctlinteractive prompt:$ bluetoothctlCheck the status of Bluetooth on your system:
[bluetoothctl]# show Powered: no Discoverable: no DiscoverableTimeout: 0x000000b4 Pairable: noIf
bluetoothctlis not powered on, enter:[bluetoothctl]# power on
Put the device you want to connect within range of your system into pairing mode:
[bluetoothctl]# discoverable on[bluetoothctl]# pairable onStart scanning for Bluetooth devices:
[bluetoothctl]# scan onThe list of discovered devices is displayed with their MAC addresses and names (if available).
When you find your device, stop scanning:
[bluetoothctl]# scan off- Note the MAC address of the device you want to connect.
Pair the device:
[bluetoothctl]# pair XX:XX:XX:XX:XX:XXYou might be prompted to confirm a pairing code on your system.
Trust the device you paired:
[bluetoothctl]# trust XX:XX:XX:XX:XX:XXOptional: If you want this device to automatically connect in the future, you can set it as the default:
[bluetoothctl]# default XX:XX:XX:XX:XX:XXQuit
bluetoothctlwhen you are done:[bluetoothctl]# quit
Verification
Verify the status of device you connected:
[bluetoothctl]# devices Device AA:BB:CC:DD:EE:FF Headphones (Connected: yes) Device 11:22:33:44:55:66 Keyboard (Connected: no)[bluetoothctl]# info AA:BB:CC:DD:EE:FF <device information> Connected: yes