Wireless earbuds for Linux Mint

Last week I took a bold step further into modernity: I bought myself a set of wireless earbuds! Just €14.95 in cheap shop Action. The brand name is Fresh ‘n Rebel [sic; the ‘ is mirrored; should be ’, in my opinion], but really made by or for Sitecom Europe B.V., as revealed by the small print in the manual. Quite a familiar name, Sitecom. The first Wi-Fi router (doubling as ADSL modem) I ever owned, bought in September 2006, was also by Sitecom.

Microsoft Windows is still the dominant OS on laptops and desktops for home and busi­ness use – no idea why – so devices like wireless earbuds have probably been tested most intensively under Windows. Using them with Linux Mint (21.1 Vera), as I do, means some difficulties should be reckoned with. On the other hand, Bluetooth is a universal standard, one might think. The small multi-lingual manual included with the earbuds mentions nothing about which OSes are supported. Or I may have missed it, because of the ultra small print.

Is 3ATW1100 V1 001 the type code for the product, or for the manual?

As feared and expected, the first hour or so, I heard nothing. Of course I first used Linux Mint’s graphical Bluetooth interface, accessible via what seems to be called a panel, in some desktop environments, but I would say is actually a task bar below. A panel, as I see it, may be rectangular in shape, but isn’t much wider that tall.

Be that as it may, the absence of error messages should mean everything was OK. But it wasn’t, I heard no music. So I turned to the command line, still my favourite for much of what I do, already since 1985. I found this: How do I connect Bluetooth headset on Linux Mint. I tried:

sudo systemctl start bluetooth
sudo systemctl enable bluetooth
sudo systemctl status bluetooth

and I got to see this:

● bluetooth.service - Bluetooth service
     Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2023-05-20 17:28:36 CEST; 11min ago
       Docs: man:bluetoothd(8)
   Main PID: 1991 (bluetoothd)
     Status: "Running"
      Tasks: 1 (limit: 9005)
     Memory: 828.0K
        CPU: 58ms
     CGroup: /system.slice/bluetooth.service
             └─1991 /usr/lib/bluetooth/bluetoothd

May 20 12:05:02 [name] bluetoothd[652]: Endpoint registered: sender=:1.49 path=/MediaEndpoint/A2DPSink/sbc
May 20 12:05:02 [name] bluetoothd[652]: Endpoint registered: sender=:1.49 path=/MediaEndpoint/A2DPSource/sbc
May 20 12:05:02 [name] bluetoothd[652]: Endpoint registered: sender=:1.49 path=/MediaEndpoint/A2DPSink/sbc_xq_453
May 20 12:05:02 [name] bluetoothd[652]: Endpoint registered: sender=:1.49 path=/MediaEndpoint/A2DPSource/sbc_xq_453
May 20 12:05:02 [name] bluetoothd[652]: Endpoint registered: sender=:1.49 path=/MediaEndpoint/A2DPSink/sbc_xq_512
May 20 12:05:02 [name] bluetoothd[652]: Endpoint registered: sender=:1.49 path=/MediaEndpoint/A2DPSource/sbc_xq_512
May 20 12:05:02 [name] bluetoothd[652]: Endpoint registered: sender=:1.49 path=/MediaEndpoint/A2DPSink/sbc_xq_552
May 20 12:05:02 [name] bluetoothd[652]: Endpoint registered: sender=:1.49 path=/MediaEndpoint/A2DPSource/sbc_xq_552
May 20 16:43:37 [name] bluetoothd[652]: src/profile.c:record_cb() Unable to get Hands-Free Voice gateway SDP record: Host is down
May 20 16:43:51 [name] bluetoothd[652]: src/profile.c:record_cb() Unable to get Hands-Free Voice gateway SDP record: Host is down

In the last two lines, “src [...] down” was in red, like this:

src/profile.c:record_cb() Unable to get Hands-Free Voice gateway SDP record: Host is down

What is a “Hands-Free Voice gateway”? Do I need it? Do I want it? No. All I want to do is play a Youtube music video, and then hear the music on the wireless earbuds. First igno­ring the error, I also tried things like:

bluetoothctl pair [MAC address of my device]
bluetoothctl trust [MAC address of my device]
bluetoothctl paired-devices
bluetoothctl disconnect [MAC address of my device]
bluetoothctl connect [MAC address of my device]

The MAC address I had found while doing a ‘bluetoothctl scan on’, which by the way is extremely slow. But eventually it works. You may want to make yourself a cup of coffee or tea in the meantime.

Attempting to pair produced this error message (and still does, now that I retest it while writing):
Attempting to pair with [MAC address of my device]
Failed to pair: org.bluez.Error.AlreadyExists

Is that really an error, or does it mean pairing is unnecessary, because pairing has already been done and succeeded in the past? What is “org.bluez"? Unclear diagnostics.

And indeed a false alarm, because the command
bluetoothctl paired-devices
reports:
Device [MAC address of my device] FnR Earbuds

Trying to
bluetoothctl connect [MAC address of my device]
resulted in a time-out:
Attempting to connect to [MAC address of my device]
Failed to connect: org.bluez.Error.Failed br-connection-page-timeout

I googled with the earlier “Hands-Free Voice gateway SDP record” message, and found that other people had such problems too: 1 , 2 . Both are marked “SOLVED”, but I don’t clearly find how they solved it, and the suggestions made there didn’t work for me.

I gave up for a while, used wired earbuds instead, which I had also bought after older ones failed. I put the wireless earbuds in the included charging box, which meanwhile I had itself charged from USB.

Then the next day, I tried again. And then it just worked!!! Just a
bluetoothctl connect [MAC address of my device]
pling!! and MUSIC. Or maybe I first had to use the command-line command pavucontrol to make Firefox use the wireless earbuds as its output device. This name pavucontrol stands for Pulse Audio VolUme Control, and it’s a handy utility that may be needed sometimes. It isn’t in Linux Mint as standard, but it can easily be installed:
sudo apt-get install pavucontrol

So what I honestly think is happening here is this: all this technical stuff and cryptic diagnostic messages, all of that is irrelevant, and you should just properly charge the batteries. That’s all. So why didn’t the graphical Bluetooth interface, and the command line utilities, just say so? “Battery low, put earbuds in charger, until the green light goes out.” So easy. Would have saved me a lot of time. And very little irritation, because I’m used to this kinda thing, and more or less expected it.

To conclude, a word of appreciation:

I know what radio signals are, how modulation works, and I read about Bluetooth, its Spread-Spectrum Adaptive Frequency Hopping, and I know a bit about lossy digital sound encodings like MP3. And I heard of FFT (Fast Fourier Transform). So I can imagine that those tiny earbuds must each contain a very powerful DSP (digital signal processor) to do all that complicated tuning, receiving and decoding work, at several levels at the same time. There must be a small audio amplifier in there too. And a microphone. And there’s a 30 mAh battery inside, that can be recharged several times from the 300 mAh battery in the small charging box, which itself can be charged via USB, from a computer or a mains adapter.

A fine bit of extremely advanced technology, that’s certainly what it is. And it works quite well, as long as the batteries serve.

Incidentally, Bluetooth’s frequency range is 2400–2480 MHz, which is also one of the ranges used by Wi-Fi, intensively employed here in our house. Yet, I notice no inter­ference problems at all.