HowTo get Bluetooth working with WDL_Arch64 (Easy per usual)

Instructional HowTo section


Locked
User avatar
wiak
Posts: 3627
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 56 times
Been thanked: 994 times
Contact:

HowTo get Bluetooth working with WDL_Arch64 (Easy per usual)

Post by wiak »

MOVED from "House Training" -> Users forum area:

I picked up an old JBL GO rechargable (tiny 8cm x 7cm x 3cm) bluetooth speaker at a recycle shop for a dollar the other day. Didn't think it would work or that its internal lithium battery would hold charge - but it did (first tested it via Android phone bluetooth connection). I was blown away by how good the audio quality of such a small box is (JBL brand I suppose - I note it uses Harman-Kardon unit internally).

Trouble (I thought) is that my laptop is an old circa 2008 HP Elitebook 2530P and I expected it didn't have any bluetooth adapter (or certainly a very old one...).

So I booted up into WDL_Arch64 since if any OS I use was going to work easily WDL_Arch64 has never let me down...

I tried:

Code: Select all

lsusb | grep Blue

and, first surprise, I got this:

Code: Select all

Bus 003 Device 002: ID 03f0:171d HP, Inc Bluetooth 2.0 Interface [Broadcom BCM2045]

I was excited (though Bluetooth 2.0 pretty old indeed I guess).

So, after ultra-quick reading Arch Linux wiki re Bluetooth (https://wiki.archlinux.org/index.php/Bluetooth), I did:

Code: Select all

pacman -S bluez bluez-utils pulseaudio-bluetooth

thus installing everything I hoped I would need.

I then did (don't think .service needed):

Code: Select all

systemctl enable bluetooth.service

and also

Code: Select all

systemctl start bluetooth.service

since WDL_Arch64 is fully Arch-compatible and thus uses systemd (sorry...)

Then in terminal, I entered:

Code: Select all

bluetoothctl

then, help, to get list of bluetoothctl commands (I have never used it before and had no idea what I was doing really...).

Alas, I can't remember exactly what I did at this stage. I do remember:

Code: Select all

power on
scan on

and found the device appeared and noted its MAC address

and used bluetoothctl info command to see all details of JBL GO speaker reported okay.

and

pair MAC_address seemed to pair it okay

but connect MAC_address failed (sad...). I wasn't surprised though - doubted it could work...

But after rebooting as non-root user weedog instead, and going through the attempt again, easy as that..., suddenly I heard my wee JBL GO speaker bleeping and a connect successful message appearing in bluetoothctl terminal!

And, sure enough, from youtube in chromium browser the sound started blaring out of the wee bluetooth JBL GO speaker!!! (I'm still excited/amazed...)

I doubt I needed to reboot (WDL userswitch would have done, and maybe didn't need that either). I was able to reduce the volume using pavucontrol of course.

I am astounded. I was pretty sure this would prove tricky (it hardly did really) and that any bluetooth interface in this old machine would use too old a bluetooth protocol, but no, WDL_Arch64 succeeds again. No issue. Pulseaudio makes all such easy in my experiences of using it thus far (way simpler for tricky audio detection/routing matters than I ever found direct alsa).

My partner was given a present of hi-end Samsung bluetooth earbuds for her fancy hi-end business computer a couple of weeks ago. I'm going to steal them now.

wiak

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

User avatar
wiak
Posts: 3627
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 56 times
Been thanked: 994 times
Contact:

Re: HowTo get Bluetooth working with WDL_Arch64 (Easy per usual)

Post by wiak »

Wondered if 'only' the old JBL GO bluetooth speakers could be used, but no, this morning tried connecting to main system stereo in the house and though I was requested to enter a 'pin' to access that one, it worked fine. I suspect the "LegacyPairing: yes" output by 'bluetoothctl info' is important in this case:

Code: Select all

	Name: VN3165CDMS
	Alias: VN3165CDMS
	Class: 0x00240404
	Icon: audio-card
	Paired: yes
	Trusted: no
	Blocked: no
	Connected: yes
	LegacyPairing: yes

The fancy bluetooth earbuds are in a sealed box so I have thus far left them untouched... They may or may not allow legacypairing; time will tell.

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

User avatar
wiak
Posts: 3627
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 56 times
Been thanked: 994 times
Contact:

Stream audio to different speakers/devices

Post by wiak »

Today wanted to plug in external speakers on my laptop but also to play same music track on bluetooth connected speaker situated in other room.

First I paired and connected my external bluetooth speaker to the laptop.

In pavucontrol (PulseAudio Volume Control), I found I then had the 'Playback' choice of EITHER the plugged in external speakers OR the external bluetooth speaker, but no setting for playing same output through both at same time...

I'm sure there is a way to do this via pulseaudio manual configurations, but easier is to simply install small gtk GUI app called 'paprefs' (PulseAudio Preferences). Just run that from the commandline and its GUI pops up in which there is a checkbox selection for "Simultaneous Output": "Add virtual output device for simultaneous output on all local sound cards"

That's all I needed. Immediately pavucontrol showed new "Playback" stream options for simultaneous playing (rather than just selecting one or the other).

So now I can play sound on my laptop headphones (or plugged in speakers) in main room, and in other room have same sound blaring through a bluetooth connected speaker... Very handy at times. Also useful if you are going deaf - then, in the same room..., you can let the rest of the family listen to the bluetooth speakers output while you listen via plugged in headphones... (or vice versa if you have bluetooth headphones).

One issue here is sync since there is generally a slight lag with bluetooth compared to directly plugged in audio output devices. You can however adjust for lag for any stream using pavucontrol. Alternatively, many media player apps (like mpv and vlc) provide controls for lag as far as I remember.

Special NOTES: I should mention that above works for any amount of audio streams (not just internal audio card and bluetooth audio stream). So if you have more than one audio card they can be used in this scheme too. Furthermore you can playback different audio on the different streams if you wish (for example: a different youtube audio playing into the headphones than into any other output sound device, be it from extra audio cards or bluetooth). Moreover paprefs allow you to include discoverable network audio streams... and/or set up Multicast facilities. Nevertheless, the simple example of using bluetooth speaker in different room to play same audio is the most useful one for myself.

wiak

Attachments
paprefs_pavucontrol.jpg
paprefs_pavucontrol.jpg (48.21 KiB) Viewed 885 times

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

Locked

Return to “HowTo”