Setting up Bluetooth on Ubuntu 22.04

Bluetooth, when properly configured on your machine, enables seamless use of peripherals like a mouse, keyboard, headset, or other compatible accessories.

After installing the necessary packages and making adjustments, everything should function smoothly.

However, you might encounter issues connecting your Bluetooth devices on Ubuntu 22.04. Follow these steps to troubleshoot and resolve problems:

Step 1: To begin resolving Bluetooth issues on your Linux system, install the necessary packages using your package manager. For Ubuntu or similar distributions, open a terminal and execute the following command:

sudo apt-get install bluetooth bluez bluez-tools rfkill -y

Read: How to fix Bluetooth connection issues on Ubuntu 22.04

Step 2: Ensure that your Bluetooth device is not locked. To check this, utilize the rfkill utility as follows:

sudo rfkill list

Examine the output to confirm that Bluetooth is not “blocked.” If it is blocked, you’ll need to unblock it before proceeding to the next steps.

Read: How To Fix Poor Sound Quality on Bluetooth Headset on Ubuntu 22.04

fix Bluetooth on Ubuntu 22.04

Step 3: If your Bluetooth device is locked, you can unlock it using the rfkill command:

sudo rfkill unblock bluetooth

Read: How to fix WiFi not working on Ubuntu

Step 4: Ensure Bluetooth Service is Running

To ensure that the Bluetooth service is active, execute the following command in the terminal:

sudo service bluetooth start

This command starts the Bluetooth service, making it ready for use.

Finding Bluetooth devices

Step 1: Before initiating the device scanning process, install the Blueman package and run it by executing the following command:

sudo apt-get install blueman -y && blueman-manager

Read: How to fix Bluetooth problems in Windows 10

This command installs the Blueman package and launches the Blueman manager for convenient Bluetooth device management.

Finding Bluetooth devices

Step 2: Make Your Bluetooth Device Visible

By default, your Bluetooth device is hidden, and it needs to be visible for detection by other devices. Follow these steps:

1. Open the Bluetooth Manager screen (`blueman-manager`).

2. Click on the “Adapter” menu.

3. Select the “Preferences” option.

Step 3: Adjust Visibility Settings

In the “Bluetooth Adapters” window:

– Change the visibility setting to either “Always visible” or “Temporarily visible,” based on your preference.

– Optionally, assign a name for your Bluetooth device. This name will be displayed to other Bluetooth devices.

Step 4: Scan for Bluetooth Devices

1. In the Bluetooth Manager, initiate the scanning process by clicking on the “Search” button.

2. Allow a few minutes for the search to complete.

3. Once the search is finished, all detected Bluetooth devices will be displayed in the Bluetooth Manager.

Pairing and connecting to Bluetooth devices

Step 1:

Right-click on the device name shown on the Bluetooth Manager screen.

Select the “Pair” option from the menu that appears. This will initiate a pairing request between the PC and the other device.

Step 2:

Enter a four-digit PIN code in the dialog box.

Click OK to confirm.

Step 3:

On your Android device, enter the PIN you received earlier.

Confirm the pairing request.

If successful, the devices will be paired, and a new lock icon will appear on the device access page. Your laptop should also be visible in the “Paired devices” section on your Android device. This establishes a secure connection between your PC and Android device.

Sending and receiving files

Step 1:

Open the Bluetooth Manager (blueman-manager).

Right-click on the device you want to send files to.

From the menu, select “Send a File…”

Step 2:

In the window that appears, navigate to the folder containing the file you want to send.

Select the file.

Click the “OK” button to initiate the transfer.

On your smartphone, a notification will prompt you to confirm the file transfer. Confirm and wait for the process to complete.

You can also receive files from your smartphone using a similar method.

With the installation and configuration complete, you can now seamlessly handle file transfers between your PC and smartphone using Linux Bluetooth, without worrying about the technical details.

Frequently Asked Questions (FAQ) 

I. Initial Setup and Package Installation:

  • Q: How do I install the necessary Bluetooth packages on Ubuntu 22.04 LTS?
    • A: Open a terminal and run: sudo apt-get install bluetooth bluez bluez-tools rfkill -y
  • Q: What are bluetoothbluezbluez-tools, and rfkill packages for in Ubuntu Bluetooth setup?
    • A:
      • bluetooth: Provides core Bluetooth protocols and daemons.
      • bluez: The official Linux Bluetooth protocol stack.
      • bluez-tools: Provides command-line utilities for managing Bluetooth devices.
      • rfkill: A tool to query and control the state of radio-frequency kill switches (which can block Bluetooth).
  • Q: I’m getting an “Unable to locate package” error when installing Bluetooth packages on Ubuntu 22.04. What should I do?
    • A: First, ensure your package lists are up to date: sudo apt update. Then try the installation command again. If it still fails, your sources.list might be misconfigured, or you might not have an internet connection.

II. Checking and Unblocking Bluetooth:

  • Q: How can I check if my Bluetooth device is blocked (soft or hard blocked) on Ubuntu 22.04?
    • A: Use the command: sudo rfkill list. Look for a line related to Bluetooth and check if it says “Soft blocked: yes” or “Hard blocked: yes”.
  • Q: My Bluetooth is showing as “blocked” in rfkill list. How do I unblock it on Ubuntu 22.04?
    • A: Use the command: sudo rfkill unblock bluetooth.
  • Q: What’s the difference between a “soft block” and a “hard block” for Bluetooth in Ubuntu?
    • A: A soft block is a software-based block (manageable with rfkill). A hard block is usually a physical switch on your laptop or a BIOS setting. If rfkill doesn’t unblock it, check for a physical switch or BIOS setting.

III. Starting the Bluetooth Service:

  • Q: How do I start the Bluetooth service on Ubuntu 22.04 from the terminal?
    • A: Use the command: sudo service bluetooth start.
  • Q: How can I check if the Bluetooth service is running on Ubuntu 22.04?
    • A: Use sudo service bluetooth status. It should show as “active (running)”.
  • Q: My Bluetooth service fails to start on Ubuntu 22.04. What can I try?
    • A: Try restarting the service: sudo service bluetooth restart. If that doesn’t work, check system logs (journalctl -xe) for error messages related to Bluetooth. You might also try reinstalling the bluez package.

IV. Finding Bluetooth Devices (Blueman):

  • Q: What is Blueman, and how do I install it on Ubuntu 22.04 for Bluetooth management?
    • A: Blueman is a graphical Bluetooth manager. Install and run it with: sudo apt-get install blueman -y && blueman-manager
  • Q: How do I make my Ubuntu 22.04 laptop discoverable by other Bluetooth devices?
    • A:
      1. Open Blueman Manager (blueman-manager).
      2. Go to “Adapter” -> “Preferences”.
      3. Change the visibility setting to “Always visible” or “Temporarily visible”.
  • Q: How do I scan for nearby Bluetooth devices using Blueman on Ubuntu 22.04?
    • A: In Blueman Manager, click the “Search” button.
  • Q: Blueman isn’t finding any Bluetooth devices, even though they are in pairing mode. What should I do?
    • A:
      1. Ensure that your other device is in discovery mode.
      2. Try restarting both your computer and the external Bluetooth device.
      3. Check if bluetooth is blocked via rfkill.

V. Pairing and Connecting to Devices:

  • Q: How do I pair my Ubuntu 22.04 laptop with a Bluetooth device using Blueman?
    • A:
      1. Find the device in Blueman Manager after scanning.
      2. Right-click on the device and select “Pair”.
      3. Follow the on-screen prompts, which usually involve entering a PIN code on both devices.
  • Q: What PIN code should I use when pairing Bluetooth devices on Ubuntu 22.04?
    • A: Blueman will often generate a PIN code for you. You’ll need to enter the same PIN code on both your Ubuntu machine and the device you’re pairing with.
  • Q: My Bluetooth devices paired successfully, but they won’t connect. What could be the problem?
    • A: Ensure to use a 4-digit PIN code.
    • A: Try removing the device from Blueman and pairing it again. Make sure the device isn’t already connected to another device. Check for any interference (other Bluetooth devices, microwaves).

VI. Sending and Receiving Files:

  • Q: How do I send a file from my Ubuntu 22.04 laptop to a Bluetooth device using Blueman?
    • A:
      1. Open Blueman Manager.
      2. Right-click on the paired device.
      3. Select “Send a File…”.
      4. Choose the file you want to send.
      5. Confirm the transfer on the receiving device.
  • Q: How do I receive a file via Bluetooth on my Ubuntu 22.04 laptop using Blueman?
    • A: The sending device needs to initiate the transfer. Blueman should automatically prompt you to accept or reject the incoming file. Make sure your device is visible (see section IV).
  • Q: File transfers over Bluetooth are very slow on my Ubuntu 22.04 system. What can I do?
    • A: Bluetooth file transfer speeds can be limited by the Bluetooth version supported by your devices and any interference. Ensure both devices support a relatively recent Bluetooth version (4.0 or higher). Try moving closer to the device and minimizing interference. For large files, consider using Wi-Fi Direct or another transfer method.

VII. Troubleshooting Specific Issues:

  • Q: My Bluetooth headset connects, but the sound quality is poor on Ubuntu 22.04. How can I fix this?
    • A: This often involves issues with audio codecs or profiles. Refer to a separate guide specifically addressing Bluetooth audio quality problems. (The article links to such a guide).
  • Q: How do I fix my Bluetooth connection issues on Ubuntu 22.04
    • A: The article provides detailed step-by-step instructions.

If you like the content, we would appreciate your support by buying us a coffee. Thank you so much for your visit and support.

 

Nikolaus Oosterhof

Nikolaus holds a degree in software development and has a strong passion for all things tech-related, especially gadgets with screens. Though he is nostalgic for older phone models, he's a retired gamer and continues to enjoy programming in open-source environments. Additionally, Nikolaus enjoys writing about Linux, macOS and Windows and has experience designing web pages.

Leave a Reply