![]() |
Using Slackware to make a Bluetooth speaker
I would like to setup a Slackware box (with a BT device and appropriate audio amp) as a Bluetooth speaker.
I know it is possible to use blueman to do that but I cant find a way to do it automatically without having to actually log into the Slackware box. Basically I would like it to behave much like a normal Bluetooth speaker: ounce you power it up it automatically is listening for for something to bind and send audio to it. Anyone know ho to go about it ? I found this but not sure if it is too Debian oriented to to be any use on a Slackware system. |
Appart from the systemd thing, it should work.
Tell us if ur stuck somewhere. |
I did the same things as described in that tutorial disregarding systemd stuff and also the pulseaudio start (because on slackware it is already running) but it's not working right:
on the phone I get "cannot connect" and on the slackware box's /var/log/syslog I get: Code:
Jan 17 10:27:49 e11old bluetoothd[1833]: Authentication attempt without agent |
Not at my computer today but that might be interesting :
https://stackoverflow.com/questions/...pin-on-bluez-5 |
Intresting ... that got the phone to connect but it still requires interaction after each boot to get the phone to connect even after initial pairing.
Looking for a fully automatic solution. |
I'm interested too :-)
What interactions do you have after reboot ? |
The pairing
Code:
root@e11old:~/bt_speaker# bluetoothctl I think the one time I got it to work was because there was some residue from blueman pairing and setting up as audio. I found a python script that does the pairing ... but not sure how to set it as the default agent. And not sure how to go about stetting the Slackware box to present itself as a BT audio device all from command line. |
I've got some bash scripts that deal with bluetoothctl and might be adapted.
IIRC one had sticky bit to pair. |
Can yo upload them here ?
I've not logged into IRC in a long time. Maybe I just need to tell pulseaudio there is a new audio source ... since the binding works. For the automatic binding I will try tell bluetoothctl where the new simmple-pin python script is ... it might be enough. I will see, once I bind, if I can see the new audio source in pavucontrol ... if so I will try to figure out how to do it form command line ... if not I guess there is more to know. |
IIRC stands for "if I recall correctly" ;-)
I will post it here in the evening. |
Cool ...
Here's a bit more I found out: if I do the pairing with blueman I do see this in the kernel ring buffer (which I do not see if I pair with the bluetoothctl procedure) Code:
[ 1257.696422] input: D4:11:A3:D8:2E:3C as /devices/virtual/input/input15 Code:
Jan 17 19:39:25 e11old kernel: [ 1257.696422] input: D4:11:A3:D8:2E:3C as /devices/virtual/input/input15 Code:
Jan 17 20:00:06 e11old bluetoothd[1227]: Endpoint unregistered: sender=:1.17 path=/MediaEndpoint/A2DPSource Quote:
after all if there exists mIRC why not also IIRC ;-) |
I would like to setup a Slackware box (with a BT device and appropriate audio amp) as a Bluetooth speaker.
Yeah. So, you need something that can handle the possibilities that the BT device wasn't in range when you started OR was in range and then moved out of range while things are running and then moved back into range OR wasn't in range when you started but then later came into range. Maybe you don't care about how those scenarios happen; maybe you don't care that someone could bring a BT device near that your box would connect to that simply looped someone stating that you were a pedophile or loved goats more than one would expect. Please provide a better use case than that which you have given here.
If you absolutely know what BT device with which you need to pair, that will simplify things a bit. I've gone through this with pairing a heart beat monitor against a Netbeans application running on a Slackware machine so I could watch my heart rate on a graph while exercising. |
For the bluetoothctl, that's what I scripted :
Code:
echo -e "agent off\nagent DisplayOnly\ndefault-agent\ndiscoverable on\npairable on\nquit\n" | bluetoothctl Code:
#! /bin/bash |
Thank you for mentioning bluetoothctl.
|
Quote:
Code:
bluetoothctl << EOF Not sure which is the head and which the tail of the cat chasing it's tail: do I need to setup pulse before pairing so that the audio output is presented via BT or do I need to tell pulse that there is a new audio source after pairing ? Anyway seem to have run into trouble with the very first line: Code:
root@e11old:~/bt_speaker# pacmd "list-sinks" | grep card: | wc -l In any case even if I start it I still get much the same: Code:
root@e11old:~/bt_speaker# . /etc/rc.d/rc.pulseaudio start Quote:
Quote:
Any information I posted is just to share my findings so people can help me. I want to be able to have a headless slackware box (will be a RPIzeroW once I figure out how) pair automatically with let's say one and one only specific phone (maybe a list in the future) and be able to to playback music like an ordinary off the shelf BT speaker system. |
All times are GMT -5. The time now is 11:39 PM. |