{"id":24473,"date":"2024-01-31T15:56:09","date_gmt":"2024-01-31T15:56:09","guid":{"rendered":"https:\/\/linuxways.net\/?p=24473"},"modified":"2024-02-05T05:04:50","modified_gmt":"2024-02-05T05:04:50","slug":"setup-bluetooth-arch-linux","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/arch\/setup-bluetooth-arch-linux\/","title":{"rendered":"How to Setup Bluetooth on Arch Linux"},"content":{"rendered":"<p>Wireless connectivity has now become very common these days as it is far more convenient than the traditional way of connecting peripherals or any output devices with the system. Most wireless devices use Bluetooth technology to connect with the computer as there is no range constraint. So every operating system and computer these days nearly comes with the option of Bluetooth connectivity.<\/p>\n<p>Apart from connecting devices through Bluetooth, data can also be transferred but due to other fast data transfer technologies, its use for data transfers is drastically reduced. Arch Linux, like every other operating system, comes with the Bluetooth feature but to use it, it needs to be configured first.<\/p>\n<h2><strong>Contents: <\/strong><\/h2>\n<ul>\n<li><strong>How To Setup Bluetooth on Arch Linux<\/strong><\/li>\n<li><strong>Connecting Bluetooth Devices from Arch Linux<\/strong><\/li>\n<li><strong>Setting up Bluetooth on Arch Linux on VirtualBox<\/strong><\/li>\n<\/ul>\n<h2><strong>How To Setup Bluetooth on Arch Linux <\/strong><\/h2>\n<p>There are two ways by which Bluetooth can be used on Arch Linux one is by using BlueZ which is a Bluetooth protocol stack and the second one is Bluemnan which is the Bluetooth manager for GTK GNOME. So, on Arch we can install both, in fact, BlueZ might be pre-installed on your system but still needs to be configured.<\/p>\n<p><strong>Step 1: Install BlueZ on Arch Linux<\/strong><\/p>\n<p>To configure Bluetooth on Arch Linux it is necessary to have Bluetooth manager installed on it however by default BlueZ is installed on Arch Linux, but you can confirm its installation by checking its version. If it is not installed, then you can install it using the Pacman package manager:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> pacman <span class=\"re5\">-S<\/span> bluez<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"673\" height=\"495\" class=\"wp-image-24508\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-1.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-1.png 673w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-1-300x221.png 300w\" sizes=\"auto, (max-width: 673px) 100vw, 673px\" \/><\/p>\n<p><strong>Step 2: Install BlueZ Utilities on Arch <\/strong><\/p>\n<p>Now to ensure the proper functioning of Bluetooth it is necessary to install the utilities for BlueZ as these utilities include, they include the bluetoothctl utility, which is a command-line interface for pairing, connecting, and disconnecting Bluetooth devices. You can also use <em>bluez-utilities<\/em> to enable and disable the Bluetooth service, scan for nearby devices, and transfer files via Bluetooth.<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> pacman <span class=\"re5\">-S<\/span> bluez-utils<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"668\" height=\"496\" class=\"wp-image-24517\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-2.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-2.png 668w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-2-300x223.png 300w\" sizes=\"auto, (max-width: 668px) 100vw, 668px\" \/><\/p>\n<p>If you have scripts or applications that depend on the deprecated BlueZ tools, or if you prefer to use them for some reason. Then you can install the <em>bluez-utils-compat<\/em> AUR package, which provides the deprecated BlueZ tools that are no longer included in the official <em>bluez-utils<\/em> package.<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">yay <span class=\"re5\">-S<\/span> bluez-utils-compat<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"677\" height=\"499\" class=\"wp-image-24528\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-3.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-3.png 677w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-3-300x221.png 300w\" sizes=\"auto, (max-width: 677px) 100vw, 677px\" \/><\/p>\n<p>However, you should be aware that these tools will no longer be updated, and may not work properly with newer versions of BlueZ and you might get an error while installing them as in the image below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"677\" height=\"501\" class=\"wp-image-24546\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-4.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-4.png 677w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-4-300x222.png 300w\" sizes=\"auto, (max-width: 677px) 100vw, 677px\" \/><\/p>\n<p>So, in that case keep the <em>bluez-utils<\/em> as it is advisable to migrate to the bluetoothctl utility, which offers more features and stability for Bluetooth management.<\/p>\n<p><strong>Step 3: Enable btusb on Arch Linux <\/strong><\/p>\n<p>The btusb is a kernel module, which provides support for Bluetooth USB devices on Linux. This module is required to enable and configure Bluetooth devices on your system. So, first check if this kernel module is activated or not and for that execute:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">lsmod<\/span> <span class=\"sy0\">|<\/span> <span class=\"kw2\">grep<\/span> btusb<\/div><\/div>\n<p>Here the<em> lsmod <\/em>command is used to display the loaded kernel modules in Arch and if the output is empty as in the image below then you have to load this kernel module.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"677\" height=\"164\" class=\"wp-image-24560\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-5.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-5.png 677w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-5-300x73.png 300w\" sizes=\"auto, (max-width: 677px) 100vw, 677px\" \/><\/p>\n<p>Now to load the btusb module on Arch Linux use the <em>modprobe <\/em>command that can add or remove modules from the Linux kernel:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> modprobe btusb<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"666\" height=\"245\" class=\"wp-image-24571\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-6.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-6.png 666w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-6-300x110.png 300w\" sizes=\"auto, (max-width: 666px) 100vw, 666px\" \/><\/p>\n<p>Now as you can see the btusb module is now loaded.<\/p>\n<p><strong>Step 4: Enable Bluetooth Service<\/strong><\/p>\n<p>Now first check the status of the Bluetooth service and if it is inactive then first start it and after that enable it by using the <em>systemctl <\/em>utility:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> systemctl start bluetooth<br \/>\n<br \/>\n<span class=\"kw2\">sudo<\/span> systemctl <span class=\"kw3\">enable<\/span> bluetooth<\/div><\/div>\n<p><strong><br \/>\n<img loading=\"lazy\" decoding=\"async\" width=\"677\" height=\"497\" class=\"wp-image-24581\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-7.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-7.png 677w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-7-300x220.png 300w\" sizes=\"auto, (max-width: 677px) 100vw, 677px\" \/><\/strong><\/p>\n<p><strong>Step 5: Install Blueman Bluetooth Manager<\/strong><\/p>\n<p>Blueman is a graphical interface for managing and controlling Bluetooth devices on Arch Linux. It is written in Python and uses GTK for the user interface. This can be used as an alternative approach if you need to use the GUI for setting up Bluetooth. To install this Bluetooth manager, execute:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> pacman <span class=\"re5\">-S<\/span> blueman<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"674\" height=\"508\" class=\"wp-image-24592\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-8.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-8.png 674w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-8-300x226.png 300w\" sizes=\"auto, (max-width: 674px) 100vw, 674px\" \/><\/p>\n<p><strong>Step 6: Enable Auto Enable for Bluetooth<\/strong><\/p>\n<p>The <em>AutoEnable=true<\/em> option is used to automatically enable the Bluetooth adapter when certain events occur, such as on a boot, when the laptop lid is opened, or after suspending\/resuming. This can be useful if you want to have Bluetooth ready without manually turning it on every time so now for that edit the Bluetooth configuration file:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span>bluetooth<span class=\"sy0\">\/<\/span>main.conf<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"676\" height=\"499\" class=\"wp-image-24603\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-9.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-9.png 676w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-9-300x221.png 300w\" sizes=\"auto, (max-width: 676px) 100vw, 676px\" \/><\/p>\n<p><strong>Step 7: List Wireless Devices and Check their Status<\/strong><\/p>\n<p>This check is necessary for Bluetooth on Arch because it can help you troubleshoot Bluetooth issues by checking if your Bluetooth device is blocked or not. The status can be either Soft blocked or Hard blocked:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> rfkill list<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"670\" height=\"187\" class=\"wp-image-24613\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-10.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-10.png 670w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-10-300x84.png 300w\" sizes=\"auto, (max-width: 670px) 100vw, 670px\" \/><\/p>\n<p>Here, soft blocked means that the device is disabled by software, while Hard blocked means that the device is disabled by a physical switch or BIOS settings. If the status for soft and hard blocked is yes, then unblock it by executing:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">rfkill unblock bluetooth<\/div><\/div>\n<p><strong>Step 8: Configure Bluetooth Audio for Arch Linux<\/strong><\/p>\n<p>If you want to connect audio devices with your Arch Linux, then you need to install pipwire which is an audio tool specifically for Linux distributions. This tool supports audio and video devices and applications with minimal latency and high security. It can also work as a drop-in replacement for other audio servers like PulseAudio and JACK.<\/p>\n<p>Usually, this pipewire is pre-installed on Arch Linux and to confirm that check its version by executing:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">pipewire-pulse <span class=\"re5\">--version<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"674\" height=\"164\" class=\"wp-image-24623\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-11.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-11.png 674w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-11-300x73.png 300w\" sizes=\"auto, (max-width: 674px) 100vw, 674px\" \/><\/p>\n<p>If pipewire is not installed, then use the default package manager to install pipewire:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> pacman <span class=\"re5\">-Syu<\/span> pipewire-pulse<\/div><\/div>\n<p>In the older versions of Arch Linux PulseAudio was used and for its GUI you had to separately install its volume control and equalizer. So, to shift to pipwire Install the pipewire package and the pipewire-alsa, pipewire-jack, and pipewire-pulse packages to enable pipewire as a drop-in replacement for other audio servers. Further to install the GUI version of pipwire there are two types one is Helvum and the other is qpwgraph.<\/p>\n<p>The main difference between qpwgraph and Helvum is their design and features. qpwgraph is a fork of qjackctl and has a persistent patchbay feature, which means it can save and restore your connections across sessions. It also has a transport control panel, which lets you start, stop, and rewind the audio server, to install it you have to clone its git repository first:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">git clone<\/span> https:<span class=\"sy0\">\/\/<\/span>aur.archlinux.org<span class=\"sy0\">\/<\/span>qpwgraph-qt5.git<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"682\" height=\"279\" class=\"wp-image-24632\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-12.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-12.png 682w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-12-300x123.png 300w\" sizes=\"auto, (max-width: 682px) 100vw, 682px\" \/><\/p>\n<p>Now build the package for <em>qpwgraph-qt5<\/em> using the make command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw3\">cd<\/span> qpwgraph-qt5<br \/>\n<br \/>\nmakepkg <span class=\"re5\">-si<\/span><\/div><\/div>\n<p><strong><br \/>\n<img loading=\"lazy\" decoding=\"async\" width=\"681\" height=\"323\" class=\"wp-image-24640\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-13.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-13.png 681w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-13-300x142.png 300w\" sizes=\"auto, (max-width: 681px) 100vw, 681px\" \/><\/strong><\/p>\n<p>Once the <em>qpwgraph-qt5<\/em> is installed on Arch Linux launch it by executing:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">qpwgraph<\/div><\/div>\n<p>You will see a window with a canvas that shows the nodes and ports of your pipewire graph. Nodes are the devices and applications that produce or consume audio or video streams, and ports are the inputs or outputs of each node. You can drag and drop nodes and ports to arrange them on the canvas, and you can link or unlink them by using keyboard and mouse shortcuts.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"886\" height=\"659\" class=\"wp-image-24654\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-14.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-14.png 886w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-14-300x223.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-14-768x571.png 768w\" sizes=\"auto, (max-width: 886px) 100vw, 886px\" \/><\/p>\n<p>Helvum, on the other hand, is a newer and more modern GUI for pipewire, written in Rust and GTK. It has a sleek and intuitive interface, with drag-and-drop functionality and color-coded nodes. It does not have a persistent patchbay feature yet, but it is planned for future development. Furthermore, it also has a built-in terminal, which lets you run commands and scripts from within the GUI, to install it execute:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">flatpak <span class=\"kw2\">install<\/span> flathub org.pipewire.Helvum<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"676\" height=\"264\" class=\"wp-image-24661\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-15.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-15.png 676w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-15-300x117.png 300w\" sizes=\"auto, (max-width: 676px) 100vw, 676px\" \/><\/p>\n<p>Once helvum is installed on Arch Linux launch it by executing:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">flatpak run org.pipewire.Helvum<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"840\" height=\"578\" class=\"wp-image-24672\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-16.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-16.png 840w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-16-300x206.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-16-768x528.png 768w\" sizes=\"auto, (max-width: 840px) 100vw, 840px\" \/><\/p>\n<p>Operating the helvum on Arch is the same as the qpwgraph as mentioned previously. You can drag and drop nodes and ports to arrange them on the canvas, and you can link or unlink them by using keyboard and mouse shortcuts. You can also rename nodes and ports by double-clicking on them. You can access more options and settings from the menu bar or the toolbar.<\/p>\n<h2><strong>Connecting Bluetooth Devices from Arch Linux <\/strong><\/h2>\n<p>There are three ways to connect Bluetooth devices on Arch Linux which include:<\/p>\n<ul>\n<li>Through Bluetooth Manager<\/li>\n<li>Through GNOME<\/li>\n<li>Through CLI (bluetoothctl)<\/li>\n<\/ul>\n<h3><strong>1: Through Bluetooth Manager<\/strong><\/h3>\n<p>The Bluetooth manager is primarily the blueman which we installed in step 5 to launch it search for Bluetooth manager in the activities menu and turn on the Bluetooth by clicking on Enable Bluetooth on the prompt:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"577\" height=\"496\" class=\"wp-image-24681\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-17.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-17.png 577w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-17-300x258.png 300w\" sizes=\"auto, (max-width: 577px) 100vw, 577px\" \/><\/p>\n<p>Now search for the Bluetooth devices and look for the devices that you want to connect and to connect any device listed just click on it:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"611\" height=\"443\" class=\"wp-image-24687\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-18.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-18.png 611w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-18-300x218.png 300w\" sizes=\"auto, (max-width: 611px) 100vw, 611px\" \/><\/p>\n<p>The key sign on the above menu bar serves the purpose of pairing the device with your Arch Linux system:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"732\" height=\"497\" class=\"wp-image-24694\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-19.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-19.png 732w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-19-300x204.png 300w\" sizes=\"auto, (max-width: 732px) 100vw, 732px\" \/><\/p>\n<p>Further, the check sign on the menu bar is for trusting the respective device as it will make the connection more secure. To transfer any data to the connected device just click on the <strong>Send File<\/strong> option then select the file and after selecting the file click on <strong>OK<\/strong> to prompt the process:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"628\" height=\"625\" class=\"wp-image-24702\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-20.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-20.png 628w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-20-300x300.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-20-150x150.png 150w\" sizes=\"auto, (max-width: 628px) 100vw, 628px\" \/><\/p>\n<h3><strong>2: Through GNOME Bluetooth<\/strong><\/h3>\n<p>Another way to connect and pair the Bluetooth devices with Arch Linux is by using the GNOME Bluetooth settings. Navigate to the Bluetooth settings from the activities menu and from there turn on Bluetooth and after that you will see a list of devices under the search list. Click on the respective device that you want to connect for instance here I have connected my cell phone and Arch has given me a pin to pair:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"759\" height=\"592\" class=\"wp-image-24710\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-21.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-21.png 759w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-21-300x234.png 300w\" sizes=\"auto, (max-width: 759px) 100vw, 759px\" \/><\/p>\n<p>Now in my cell phone Bluetooth menu, I will look for the Arch Linux system and then confirm it is the same pin as in the Arch system to establish a connection:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"304\" height=\"598\" class=\"wp-image-24715\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-22.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-22.png 304w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-22-153x300.png 153w\" sizes=\"auto, (max-width: 304px) 100vw, 304px\" \/><\/p>\n<p>Now to send any data to any device other than the audio device connected to Arch through Bluetooth just click on it and after that click on <strong>Send Files<\/strong>. Next, select the respective data that you want to send and then click on the <strong>Select<\/strong> option to prompt the data transfer process:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"763\" height=\"847\" class=\"wp-image-24724\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-23.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-23.png 763w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-23-270x300.png 270w\" sizes=\"auto, (max-width: 763px) 100vw, 763px\" \/><\/p>\n<h3><strong>3: Through CLI <\/strong><\/h3>\n<p>The third way of connecting a Bluetooth device with Arch Linux is by using the BlueZ utility, which comes with <em>bluetoothctl<\/em>. It is the main utility for managing Bluetooth and is used to scan for nearby devices, connect, pair, trust, untrust, disconnect, and block devices using<em> bluetoothctl<\/em> commands. So first start the Bluetooth by executing:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">bluetoothctl<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"663\" height=\"187\" class=\"wp-image-24729\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-24.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-24.png 663w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-24-300x85.png 300w\" sizes=\"auto, (max-width: 663px) 100vw, 663px\" \/><\/p>\n<p>Now to search the nearby devices you need to use the <em>scan on<\/em> command to initiate the process. There might be the possibility that it might already show the nearby devices:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">scan on<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"626\" height=\"343\" class=\"wp-image-24733\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-25.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-25.png 626w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-25-300x164.png 300w\" sizes=\"auto, (max-width: 626px) 100vw, 626px\" \/><\/p>\n<p>Now as you can see in the image above there are a number of devices showing up with their MAC addresses. Here the NEW tag means that the state of the device is unchanged, whereas the CHG tag means that the state of the device is changed. So now to connect any of the devices just use the <em>pair<\/em> command along with the device MAC address shown in the search:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">Pair <span class=\"sy0\">&lt;<\/span>device-MAC-address<span class=\"sy0\">&gt;<\/span><\/div><\/div>\n<p>Now as in the previous method, the bluetoothctl utility also gives a passcode for establishing a connection with the selected device so confirm the passcode on your respective device, and for confirmation on Arch enter yes:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"683\" height=\"517\" class=\"wp-image-24741\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-26.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-26.png 683w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-26-300x227.png 300w\" sizes=\"auto, (max-width: 683px) 100vw, 683px\" \/><\/p>\n<p>Once the connection is successful, you will see a message of bonded in the CLI, and now you can interact with the connected device.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"670\" height=\"297\" class=\"wp-image-24746\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-27.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-27.png 670w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-27-300x133.png 300w\" sizes=\"auto, (max-width: 670px) 100vw, 670px\" \/><\/p>\n<p>Now to remove the connected device just execute the <em>remove<\/em> command along with the MAC address:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">remove <span class=\"sy0\">&lt;<\/span>device MAC address<span class=\"sy0\">&gt;<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"683\" height=\"602\" class=\"wp-image-24753\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-28.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-28.png 683w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-28-300x264.png 300w\" sizes=\"auto, (max-width: 683px) 100vw, 683px\" \/><\/p>\n<p>Furthermore, if you need more information on various commands like trusting a device as we did in the first method then consult bluetoothctl help as it contains all of its commands along with their description:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw3\">help<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"684\" height=\"499\" class=\"wp-image-24758\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-29.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-29.png 684w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-29-300x219.png 300w\" sizes=\"auto, (max-width: 684px) 100vw, 684px\" \/><\/p>\n<p><strong>Note:<\/strong> The <em>bluetoothctl<\/em> is a utility of BlueZ so it isn\u2019t affected if Blueman Bluetooth Manager is not installed however to use Blueman you have to install BlueZ as there are some dependencies of BlueZ used by Blueman:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"671\" height=\"198\" class=\"wp-image-24762\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-30.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-30.png 671w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-30-300x89.png 300w\" sizes=\"auto, (max-width: 671px) 100vw, 671px\" \/><\/p>\n<h2><strong>Setting up Bluetooth on Arch Linux on VirtualBox <\/strong><\/h2>\n<p>The procedure mentioned previously in this guide will work only if you have installed it on a system, but if you have created an Arch Linux virtual machine then you won\u2019t be able to connect any Bluetooth device with Arch. So, in that case, after following the above procedure when you turn on Bluetooth then you will get the <em>connection to BlueZ failed<\/em> error:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"212\" class=\"wp-image-24763\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-31.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-31.png 640w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-31-300x99.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>This is because the virtual machine is unable to detect the hardware for Bluetooth since it is created virtually. So, to make that work shut your Arch Linux and navigate to the <strong>Device Manager,<\/strong> and from there disable your Bluetooth driver:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"804\" height=\"591\" class=\"wp-image-24767\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-32.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-32.png 804w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-32-300x221.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-32-768x565.png 768w\" sizes=\"auto, (max-width: 804px) 100vw, 804px\" \/><\/p>\n<p>Now turn on your Arch Linux virtual machine and once it is up and running again go to the Device Manager and enable the Bluetooth driver:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"745\" height=\"566\" class=\"wp-image-24769\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-33.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-33.png 745w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-33-300x228.png 300w\" sizes=\"auto, (max-width: 745px) 100vw, 745px\" \/><\/p>\n<p>Upon enabling the Bluetooth driver, you may encounter the disappearance of the Bluetooth option in the Device Manager so in that case just reopen the Device Manager. If that\u2019s not the case, then you have to install the Bluetooth driver and redo the whole process again.<\/p>\n<p>Now upon successfully enabling the Bluetooth navigate to the Devices menu of VirtualBox and from there go to the USB option and select the <strong>Intel Corp [0002]<\/strong> option:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"792\" height=\"293\" class=\"wp-image-24773\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-34.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-34.png 792w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-34-300x111.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24473-34-768x284.png 768w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><\/p>\n<p>The option may differ so in that case you need to check for the Bluetooth hardware usually it is the same in most of the systems. Now your Bluetooth will be working and remember that you have to follow this procedure every time after you either shut down or reboot Arch Linux to use Bluetooth.<\/p>\n<h2><strong>Conclusion <\/strong><\/h2>\n<p>Bluetooth though is quite old technology but still it is being used for connecting nearby devices and most of the devices connected through Bluetooth are audio devices these days. So, to configure and set up Bluetooth on Arch you need to install BlueZ utility, and then you need to install Blueman if you need to use Bluetooth from GUI. If you have a GNOME-based environment, then you can simply go to the Bluetooth settings to turn it on and then pair any device.<\/p>","protected":false},"excerpt":{"rendered":"<p>To set up Bluetooth on Arch Linux, you need to install BlueZ utility, and then you need to install Blueman if you need to use Bluetooth from GUI.<\/p>","protected":false},"author":113,"featured_media":24783,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1055],"tags":[],"class_list":["post-24473","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arch"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/24473","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/113"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=24473"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/24473\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/24783"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=24473"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=24473"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=24473"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}