Yes, I know that.
I think that i must install “pi-bluetooth” package from the base Raspbian system.
First thing is to enable SSH server by typing to my browser “volumio.local/dev” and activating it.
Now i must login to my Volumio Box:
$ ssh volumio@volumio.local
Check if my root filesystem has enough free space:
$ du -hs
Filesystem Size Used Avail Use% Mounted on
/dev/mmcblk0p2 2.2G 592M 1.5G 29% /imgpart
/dev/loop0 260M 260M 0 100% /static
overlay 13G 525M 12G 5% /
devtmpfs 230M 0 230M 0% /dev
tmpfs 241M 0 241M 0% /dev/shm
tmpfs 241M 4.6M 237M 2% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 241M 0 241M 0% /sys/fs/cgroup
tmpfs 241M 28K 241M 1% /tmp
tmpfs 241M 0 241M 0% /var/spool/cups
tmpfs 20M 80K 20M 1% /var/log
tmpfs 241M 0 241M 0% /var/spool/cups/tmp
/dev/mmcblk0p1 61M 35M 26M 58% /boot
tmpfs 49M 0 49M 0% /run/user/1000
Then I type the following:
$ sudo apt-get update
$ sudo apt-get install mc build-essential git intltool pi-bluetooth
$ sudo apt-get install alsa-utils bluez bluez-tools pulseaudio-module-bluetooth python-gobject python-gobject-2
$ sudo usermod -a -G lp volumio
$ git clone https://github.com/BaReinhard/Super-Simple-Raspberry-Pi-Audio-Receiver-Install.git
$ cd Super-Simple-Raspberry-Pi-Audio-Receiver-Install
$ sudo ./install.sh
Then i choose option: 4 (Volumio installation).
Use the same name for all devices and choose a name by which my Pi Zero W will be seen by Bluetooth protocol.
When my Pi Zero W is rebooted I can now check (after login via SSH) if buildin Bluetooth chip is enabled:
$ hciconfig -a
hci0: Type: BR/EDR Bus: UART
BD Address: B8:27:EB:C1:E1:EF ACL MTU: 1021:8 SCO MTU: 64:1
UP RUNNING PSCAN ISCAN
RX bytes:745 acl:0 sco:0 events:46 errors:0
TX bytes:1551 acl:0 sco:0 commands:46 errors:0
Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH SNIFF
Link mode: SLAVE ACCEPT
Name: 'w'
Class: 0x0c0414
Service Classes: Rendering, Capturing
Device Class: Audio/Video, Loudspeaker
HCI Version: 4.1 (0x7) Revision: 0x145
LMP Version: 4.1 (0x7) Subversion: 0x2209
Manufacturer: Broadcom Corporation (15)
If you see something like this then it is enabled.
I must now change some config files.
First I want to find my HiFiBerry Miniamp under Pulseaudio:
$ pulseaudio --start
$ pacmd list-sinks | grep -e 'name:' -e 'index'
It should be the last one.
$ sudo nano /etc/pulse/default.pa
Paste it to the second last line of this file instead of output.
In my case this line will look like this:
set-default-sink alsa_output.platform-soc_sound.analog-stereo
$ sudo nano /etc/pulse/daemon.conf
Change:
resample-method = ffmpeg
to:
resample-method = trivial
And uncomment:
load-default-script-file = yes
default-script-file = /etc/pulse/default.pa
$ sudo nano /etc/bluetooth/audio.conf
[General]:
Enable=Source,Sink,Media,Socket
Now I can reboot my Pi Zero W.
$ sudo reboot
Now I should be able to find my Raspberry Pi Zero W via Bluetooth in my Android phone, connect to it with PIN 0000 and play music to it.
I tested it and it works great. 