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:bluetoothctl
$ bluetoothctlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Check the status of Bluetooth on your system:
show
[bluetoothctl]# show Powered: no Discoverable: no DiscoverableTimeout: 0x000000b4 Pairable: noCopy to Clipboard Copied! Toggle word wrap Toggle overflow If
bluetoothctlis not powered on, enter:power on
[bluetoothctl]# power onCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Put the device you want to connect within range of your system into pairing mode:
discoverable on
[bluetoothctl]# discoverable onCopy to Clipboard Copied! Toggle word wrap Toggle overflow pairable on
[bluetoothctl]# pairable onCopy to Clipboard Copied! Toggle word wrap Toggle overflow Start scanning for Bluetooth devices:
scan on
[bluetoothctl]# scan onCopy to Clipboard Copied! Toggle word wrap Toggle overflow The list of discovered devices is displayed with their MAC addresses and names (if available).
When you find your device, stop scanning:
scan off
[bluetoothctl]# scan offCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Note the MAC address of the device you want to connect.
Pair the device:
pair XX:XX:XX:XX:XX:XX
[bluetoothctl]# pair XX:XX:XX:XX:XX:XXCopy to Clipboard Copied! Toggle word wrap Toggle overflow You might be prompted to confirm a pairing code on your system.
Trust the device you paired:
trust XX:XX:XX:XX:XX:XX
[bluetoothctl]# trust XX:XX:XX:XX:XX:XXCopy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: If you want this device to automatically connect in the future, you can set it as the default:
default XX:XX:XX:XX:XX:XX
[bluetoothctl]# default XX:XX:XX:XX:XX:XXCopy to Clipboard Copied! Toggle word wrap Toggle overflow Quit
bluetoothctlwhen you are done:quit
[bluetoothctl]# quitCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Verify the status of device you connected:
devices
[bluetoothctl]# devices Device AA:BB:CC:DD:EE:FF Headphones (Connected: yes) Device 11:22:33:44:55:66 Keyboard (Connected: no)Copy to Clipboard Copied! Toggle word wrap Toggle overflow info AA:BB:CC:DD:EE:FF
[bluetoothctl]# info AA:BB:CC:DD:EE:FF <device information> Connected: yesCopy to Clipboard Copied! Toggle word wrap Toggle overflow