You need at least version 6 of truehl's Squeezeplug - with Triode's Squeezelite; Squeezeplay on a PC or an android LMS controller app; lots of patience.
Be prepared to carry out multiple reboots! You need to have ssh access, as all the commands are carried out at the command line.
Try at your own risk! See point 26 for some issues.
1. Obtain a working bt dongle - plug into a usb port
2. At the command line type
- Code: Select all
apt-get update
2. Copy a test.wav file to /home (I just copied a win7 wav file from my PC)
3. Probably best to reboot here
4. At command line, type
- Code: Select all
hciconfig
5. Switch on your bt speaker or headset in pairing mode
6. Type
- Code: Select all
hcitool scan
7. This should give you the bt device addess of the speaker: xx:xx:xx:xx:xx:xx
8. Make a note of this number for future use!
9. Type
- Code: Select all
bluez-simple-agent hci0 [the device address]
10. If there are no error messages then the pairing was successful!
11. Type
- Code: Select all
bluez-test-audio [address]
12 Type
- Code: Select all
bluez-test-device trusted [address] yes
13. Now, add the bt device to asound.conf (in /etc):
add the following to the end of what already exists in asound.conf - be sure to use the device address from above
- Code: Select all
pcm.NAME {
type plug
slave {
pcm {
type bluetooth
device XX:XX:XX:XX:XX:XX
profile "auto"
}
}
hint {
show on
description "My bluetooth speaker"
}
}
ctl.NAME {
type bluetooth
}
Edit NAME and XX: string to your choice
14.Type
- Code: Select all
aplay -L
15.Type
- Code: Select all
aplay -D NAME /home/test.wav
16.Probably best to reboot to check if a new reboot picks up your bt speaker when you switch it on
17. After reboot and pairing, try the
- Code: Select all
aplay -D NAME /home/test.wav
18. If the test works, you're in business.
19. Install squeezelite using truehl's setup, if not already installed
20. The installed squeezelite may not be the latest version - it also starts on boot-up (as instance 1). You can check the version by typing squeezelite -? You need at least version 0.9beta2 or later
21. Type
- Code: Select all
cd /usr/bin
22. Type
- Code: Select all
squeezelite -m ab:cd:ef:12:34:56 -n WhateverYouLike -o NAME -r 44100 -z
This starts instance 2 of squeezelite with output to the bt speaker
23. Start Squeezeplay or an android app controller and switch to WhateverYouLike as your player (Settings - Choose Player)
24. Switch on your bt speaker - wait for it to pair
25. Choose a stream to play on Squeezeplay - you may have to adjust the volume on the player
26. At this point things become murky - switching off the bt speaker seems to cause a random crash of the Pi. It may be necessary to turn the player off before switching the bt speaker off. I've also found that the default audio (analog output, in my case) becomes corrupted. Fixing this was difficult and involved reimaging the whole squeezeplug image agan from scratch.
I'm not sure if -r 44100 is an appropriate value - advice needed
The second instance is not sticky - the command needs to be added to the boot sequence - advice needed on how best to do this!
27. You can remove a paired device with
- Code: Select all
bluez-test-device remove [address]
28. It works - but seems flaky. I'm sure somebody else can come up with a better way! All suggestons, improvements welcome.