art_4669fusRsG1
Tuesday November 24 2020

BluePup easy Bluetooth management

lobste.rs - Sat Nov 21 18:00

EasyOS prior to version 2.5 has Blueman Bluetooth manager, which is in many Linux distributions. However, Barry experienced some issues with it, so decided to write a GUI BT manager from scratch -- well, not from scratch exactly, but using existing excellent commandline utilities.

It is somewhat naive of Barry, perhaps, to think that something knocked together in a couple of weeks could compete with a product that has been under development for years. Maybe, but BluePup has turned out well, not all the features of Blueman, but is simple, easy and logical to use, and does the basic operations that most people would want, which is to connect their BT keyboard, mouse, speaker/headset, and transfer files to and from a mobile phone.

It is important to know that EasyOS does not have PulseAudio, and uses just ALSA. There are some applications in the Debian package repository that require PulseAudio, and Easy has 'apulse', a package that lets the app think that PulseAudio is there, even though it isn't. Firefox browser is an example -- with 'apulse', audio will work, using just ALSA.

In Linux, the 'bluez' package provides Bluetooth support, and most unfortunately the developers dropped support for ALSA with the 5.x series, and PulseAudio is required for audio input and output. Fortunately, another package, 'bluez-alsa' will make 'bluez' think that PulseAudio is present, and BT audio will work with just ALSA.

It is unfortunate that some developers are assuming a Linux distribution with have PulseAudio, and, increasingly, systemd, but mustn't grumble, we have to soldier on.

BluePup is in the system tray, bottom-right of the screen, just click on it to bring up the GUI. Here is a quick run-through:

Barry, the author of this tutorial, is now switching over to first-person commentary...

At the time of writing, EasyOS 2.5 has the latest BluePup Bluetooth management GUI. I ran through connecting my mouse, keyboard, speaker and Android phone...

Launching BluePup, you get a GUI window that has a lot of stuff on it, however, usage comes down to clicking just a couple of buttons, "SCAN" and "REGISTER" -- that's it, and you are connected, though in some case a PIN has to be entered.

Firstly, turned on the mouse, put it into pairing mode, then clicked the "SCAN" button in BluePup:

...I don't know what that "4F:A0:41:58:EA:44" device is, something at my neighbour's place. I selected the mouse in the "New devices" section, then clicked on the "REGISTER" button:

...yay, mouse works! I then turned on my keyboard, pressed it's pairing button, and scanned for it, then clicked the "REGISTER" button:

...this required a PIN code to be entered on the keyboard, and success, Bluetooth keyboard is working. I then repeated the exercise for my speaker, and got all three devices connected:

...notice the green ticks, these mean currently connected and working. Connecting the speaker also automatically pops up the Multiple Sound Card Wizard (MSCW):

...be sure to click "Test Sound" before selecting the Bluetooth audio device as the default, to make sure that it is working!

Note, in the above snapshot, the first entry, "ALC233", is my internal motherboard audio, and "HDMI 1" is my monitor (which is actually a TV).

BluePup automatically detects changes, and will update the GUI. For example, I turned off all three devices, and the GUI updated to orange ticks, meaning paired but currently not connected:

Turning any device back on, it automatically reconnects, and the GUI updates.

A usability note about turning devices off and on: modern BT devices have low-power mode, making them "invisible" to the Linux kernel, and 'bluez' might not be immediately aware when a device is turned off. You might have to wait a minute before those ticks turn from green to orange -- please do wait, before turning the device back on, as otherwise 'bluez' might get confused.

One point about the speaker -- if I had set the Bluetooth speaker as the default audio device, turning it off will cause the MSCW to popup. Ditto with turning it on. This is achieved by a udev rule, so if anyone wants to create a BluePup PET to run on other Puppy Linux derivatives, or a package for another Linux distro, they will need to chase up all of these support files.

Now for my Huawei Y9 Android phone:

...notice the orange tick. Unlike the mouse, keyboard and speaker, the phone is only connected when an actual operation is taking place. That is, the orange tick means we are paired with the phone, but not connected.

To send a file, click "SEND FILE" and to receive a file from the phone, click "RECEIVE FILE". These operations will perform a temporary connection with the phone. It is pretty simple, I don't think any further explanation is required.

Of course, being a very new product, BluePup will likely have issues for some users. Report any problem to the EasyOS forum:

...it would be especially nice if you find a bug and then fix it! You can find most of the BluePup scripts at /usr/local/bluepup

I hope that you enjoy using BluePup as much as I have in creating it!

Regards,Barry KaulerPage (c) copyright Barry Kauler bkhome.org, all rights reserved.  BluePup is (c) copyright Barry Kauler, license GPL v3 (/usr/share/doc/legal)