Volumio2 Bluetooth Plugin

Saturday, September 18, 2021

Volumio

t f B! P L

This article summarizes the installation of the Bluetooth Manager plugin compatible with recent Volumio2 releases (Volumio 2.907, 2.909).

For the Bluetooth Manager plugin compatible with the latest Volumio3, please see Volumio3 Bluetooth Plugin. (Added 2021/12/08)

Volumio2 Bluetooth Plugin

About the Bluetooth Manager Plugin

The Bluetooth Manager plugin for Volumio2 is not an official Volumio plugin, so it needs to be set up separately rather than selected from the plugin list. The previous plugin appeared to work up to around Volumio VERSION 2.799, but in subsequent versions, errors occurred during installation and it could not be enabled. This article explains how to get the plugin working with the latest version as of September 2021.

Note that this is essentially a more detailed procedural explanation of the content described at https://community.volumio.org/t/bluetooth-speaker-plugin/6726/149, so if you are familiar with SSH connections and Volumio2 UI operations and want to quickly learn the procedure, please refer to that page.


Also, for detailed information about the Bluetooth Manager plugin modifications this time, please see the following page.

Details of Volumio2 Bluetooth Plugin Modifications

Installation Procedure

Introduction

First, since the Bluetooth plugin installation process includes parts that forcibly introduce a build environment, it is strongly recommended to install from a fresh image for the target Volumio2. Even if the existing environment stops working during the plugin installation process, I cannot provide environment-specific solutions. If you absolutely must install on an existing environment where other plugins are already running, please make backup measures such as cloning the entire current environment to another microSD before attempting the installation.

The verified Volumio2 versions are VERSION 2.907 and VERSION 2.909. (Right-click and save as)

The verified hardware is Raspberry Pi 3 Model B+ and Raspberry Pi 4 Model B.

Downloading Plugin-Related Files

Download the following three Bluetooth plugin-related files.

Writing the Image to microSD

Write the Volumio2 image VERSION 2.907 or VERSION 2.909 volumio-2.9xx-2021-xx-xx-pi.img.zip to the microSD using Raspberry Pi Imager. Select "Use Custom" at the bottom of the CHOOSE OS section, specify the Volumio2 img.zip file, and write it to the target microSD card.

Raspberry Pi Imager Writing a Custom Image

Enabling SSH

After Volumio2 starts up and you complete the initial setup (language settings, WiFi settings, etc.) from the local http://volumio, access http://volumio/dev/ to enable SSH.

Enabling SSH

Uploading and Extracting UI Files

Next, upload the UI files (www.zip, www3.zip) to the Volumio2 side. These www.zip and www3.zip files are for customizing the UI to enable the installation and operation of Bluetooth Manager.

First, an SSH client is needed on the local PC to connect to Volumio2 via SSH. Git Bash should be a quick option, so install it if you don't have a terminal application with SSH capability in your PC environment.

After launching the terminal, first transfer the files using the scp command, then log in to Volumio2 via SSH. For reference, the default password for the volumio user is "volumio".

$ scp www.zip www3.zip volumio@volumio:~/
The authenticity of host 'volumio (192.168.xx.xx)' can't be established.
ECDSA key fingerprint is SHA256:--------------------------------------------
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'volumio,192.168.xx.xx' (ECDSA) to the list of known hosts.
volumio@volumio's password:
www.zip                                       100% 4606KB   5.6MB/s   00:00
www3.zip                                      100% 7082KB   6.8MB/s   00:01
$ ssh volumio@volumio
volumio@volumio's password:

From here on, the commands are to be executed after logging in as user volumio via SSH.

volumio@volumio:~$ cd /volumio/http
volumio@volumio:~$ mv www www_bak
volumio@volumio:~$ mv www3 www3_bak
volumio@volumio:~$ mkdir www && cd www
volumio@volumio:~$ miniunzip ~/www.zip
volumio@volumio:~$ cd ..
volumio@volumio:~$ mkdir www3 && cd www3
volumio@volumio:~$ miniunzip ~/www3.zip

Changing the UI

In the default state of Volumio2, the Contemporary-type Web UI called Volumio3 UI is the default, but to install the Bluetooth Manager plugin, you need to temporarily switch back to the Classic-type UI.

Go to Settings → Appearance → select "Classic" from User Interface Layout Design at the bottom and save.

Changing UI to Classic (Before)

The UI type will then be changed as shown below.

Changing UI to Classic (After)

Installing the Plugin

Next, click the gear icon in the upper right → click Plugins, and there should be a "Plugin Upload" tab. Drag and drop the bluetooth_controller.zip that you downloaded earlier here, and the installation will begin.

The "Plugin Upload" Tab
Immediately After Starting Plugin Installation

The installation progress will jump to 70% immediately after starting and remain there for a while, but please wait as the installation takes time. The installation completes in approximately under 10 minutes on Raspberry Pi 3 Model B+ and under 7 minutes on Raspberry Pi 4 Model B, after which the following screen appears.

Installation Complete State

Press the Enable Plugin button twice here. The installation screen in front will disappear, and the view will switch to the "Installed Plugins" tab where you can confirm that the Bluetooth Manager plugin has been installed. However, the plugin status is still "Inactive" at this point.

State Immediately After Bluetooth Manager Installation (Inactive)

Reboot Volumio2 here. Since the shutdown option in the UI menu does not work, it is best to enter the reboot command from SSH, but power cycling is also acceptable.

volumio@volumio:~$ sudo reboot

Confirming Normal Plugin Startup

From this point on, you may switch the Volumio2 UI back to Contemporary type if you prefer. For convenience, the screen examples here will continue with the Classic type.

http://volumio, click the gear icon in the upper right → Plugins, and this time the Bluetooth Manager plugin should be displayed in an active state on the "Installed Plugins" tab.

Confirming Bluetooth Manager is Active

Configuring Output to Bluetooth Receiver

Next, a small trick is needed to enable output to the Bluetooth receiver. Go to the gear icon in the upper right → Playback Options → Audio Output → select any option from the output device choices and click save. It doesn't matter whether you select HDMI Out, Headphones, or any other USB DAC if connected — just select one and save. This operation copies the Bluetooth receiver output settings described in the MPD template to /etc/mpd.conf, enabling output to the Bluetooth receiver.

This trick is only needed once after installing the Bluetooth Manager plugin, and does not need to be repeated thereafter.

Output Device Setting (any option is fine) → Save

Selecting a Bluetooth Device

Almost there. First, put the Bluetooth receiver you want to connect to into pairing mode and have it ready.

In that state, click the gear icon in the upper right → Plugins → Installed Plugins → Bluetooth Manager → Settings. When the name of the device you want to connect to appears in the list under Bluetooth Devices, click Connect to the right of it.

Bluetooth Device Display

After clicking Connect, press the Refresh button below several times. When the Connect label to the right of the desired device changes to Disconnect, the connection is successful.

Successfully Connected State

Note that in my testing, there are some Bluetooth receiver devices that work fine with PCs and smartphones but simply do not appear in this plugin's device list no matter what. Also, as can be seen in the screenshot above, unnecessary information such as "TxPower is nil" may be displayed. This is because the bluetoothctl command used for Bluetooth connection returns such responses, and is not a problem with the Bluetooth Manager plugin itself. If a device simply will not appear or connect, please give up and try a different device.

Audio Output Verification

Once you have completed the above, simply play an audio track as usual and audio should be output from the Bluetooth receiver device. Note that the Bluetooth receiver volume is not linked to Volumio2's volume, so volume adjustment is done on the Bluetooth receiver side.


This concludes the explanation of the Bluetooth Manager plugin installation procedure.


For those who want to learn more about the detailed modifications to the Bluetooth Manager plugin, please see the following page.

Details of Volumio2 Bluetooth Plugin Modifications


For settings to output via Bluetooth when using the Spotify plugin, please see the following page.

Volumio2 Bluetooth Plugin: Spotify Edition

About Me

My photo
Electronics, programming & audio

Featured Post

Synchronizing Radio-Controlled Clocks with Raspberry Pi Pico W (JJY Standard Radio Wave Emulator)

As a Raspberry Pi Pico W application, I built a JJY emulator for radio-controlled clocks (for time synchronization) with minimal peripheral...

QooQ