Giter VIP home page Giter VIP logo

rpi-audio-receiver's Introduction

Raspberry Pi Audio Receiver

A simple, light weight audio receiver with Bluetooth (A2DP), AirPlay 2, and Spotify Connect.

Features

Devices like phones, tablets and computers can play audio via this receiver.

Requirements

  • A USB Bluetooth dongle (the internal Raspberry Pi Bluetooth chipset turned out as not suited for audio playback and causes all kinds of strange connectivity problems)
  • Raspberry Pi OS 12 Lite
  • Internal audio, HDMI, USB or I2S Audio adapter (tested with Adafruit USB Audio Adapter, pHAT DAC, and HifiBerry DAC+)

Again: do not try to use the internal Bluetooth chip, this will only bring you many hours of frustration.

Installation

The installation script asks whether to install each component.

wget https://raw.githubusercontent.com/nicokaiser/rpi-audio-receiver/main/install.sh
bash install.sh

Note: the installation process is not reversible, there is no uninstall. The script is meant to be run on a clean device that is not used for anything else.

Basic setup

Lets you choose the hostname and the visible device name ("pretty hostname") which is displayed as Bluetooth name, in AirPlay clients and in Spotify.

Bluetooth

Sets up Bluetooth, adds a simple agent that accepts every connection, and enables audio playback through ALSA. A udev script is installed that disables discoverability while connected.

AirPlay 2

Installs Shairport Sync AirPlay 2 Audio Receiver.

Spotify Connect

Installs Raspotify, an open source Spotify client for Raspberry Pi.

Additional steps

Enable HiFiBerry device

When using a HiFiBerry or similar I2C device, a device tree overlay needs to be enabled in /boot/firmware/config.txt (replace dacplus with the overlay that fits your hardware):

...
dtoverlay=hifiberry-dacplus

To enable the software volume mixer, /etc/asound.conf needs to be created:

defaults.pcm.card 0
defaults.ctl.card 0

pcm.hifiberry {
  type hw
  card 0
  device 0
}
pcm.dmixer {
  type dmix
  ipc_key 1024
  ipc_perm 0666
  slave.pcm "hifiberry"
  slave {
    period_time 0
    period_size 1024
    buffer_size 8192
    rate 44100
    format S32_LE
  }
  bindings {
    0 0
    1 1
  }
}
ctl.dmixer {
  type hw
  card 0
}
pcm.softvol {
  type softvol
  slave.pcm "dmixer"
  control {
    name "Softvol"
    card 0
  }
  min_dB -90.2
  max_dB 0.0
}
pcm.!default {
  type plug
  slave.pcm "softvol"
}

Read-only mode

To avoid SD card corruption when powering off, you can boot Raspberry Pi OS in read-only mode. This can be achieved using the raspi-config script (in the "Performance" section).

Disable Wi-Fi power management

Disabling Wi-Fi power management might resolve some connection issues:

sudo nmcli connection modify preconfigured wifi.powersave 2

Disable internal Bluetooth and Audio

When an external audio device (HDMI, USB, I2S) is used, the internal audio can be disabled in /boot/firmware/config.txt (replace hifiberry-dacplus with the overlay which fits your installation):

...
dtoverlay=disable-bt
dtparam=audio=off
dtoverlay=vc4-kms-v3d,noaudio
dtoverlay=hifiberry-dacplus

Add Bluetooth devices

The device should be visible for new Bluetooth connections, but in some cases you might need to pair them manually:

sudo bluetoothctl
power on
agent on
# Now search for available bluetooth devices from your device
# Once paired note down the MAC address of your device 
trust 00:00:00:00:00:00 # Put device MAC address here so after reboot it can automatically re-connect again

Disable Wi-Fi when Bluetooth is connected

Dislaimer: You really might want to use a Bluetooth USB dongle. The internal Bluetooth module of the Raspberry Pi (all versions) is very limited and using it for audio transmission will most certainly lead to problems and unexpected behaviour, see raspberrypi/linux/#1402.

If you really want to use the internal Bluetooth module, you almost certainly need to disable Wi-Fi.

Modify /usr/local/bin/bluetooth-udev and remove the comments (#) around the ifconfig calls:

...
if [ "$action" = "add" ]; then
    ...
    # disconnect wifi to prevent dropouts
    ifconfig wlan0 down &
fi

if [ "$action" = "remove" ]; then
    # reenable wifi
    ifconfig wlan0 up &
    ...
fi

Bluetooth A2DP volume

To enable A2DP volume control, add the --plugin=a2dp parameter to the bluetoothd command line. This helps setting the volume via Bluetooth, but does not work on all setups.

# Enable A2DP volume control
mkdir -p /etc/systemd/system/bluetooth.service.d
cat <<'EOF' > /etc/systemd/system/bluetooth.service.d/override.conf
[Service]
ExecStart=
ExecStart=/usr/libexec/bluetooth/bluetoothd --plugin=a2dp
EOF

Bluetooth Fast Connectable

Using the FastConnectable flag may lead to faster Bluetooth connections, but may also lead to poor sound quality. You can try and see if it works for you. See #70

Add the flag to the General section in /etc/bluetooth/main.conf:

[General]
...
FastConnectable = true
...

Bluetooth pairing with PIN

To enable pairing with a PIN code instead of Simple Secure Pairing mode, the following steps are required:

  1. Change sspmode 1 to sspmode 0 in /etc/systemd/system/[email protected]
  2. Add --pin /etc/bluetooth/pin.conf to the ExecStart line in /etc/systemd/system/[email protected]
  3. Add a file /etc/bluetooth/pin.conf which contains PIN code for the devices:

AA:BB:CC:DD:EE:FF 1234 (replace AA:BB:CC:DD:EE:FF with your Bluetooth devices's Mac address or * to use PIN 1234 for all devices)

Notes

  • This does not work with iOS devices. iOS refuses to pair with devices that do not support SSP. So sspmode needs to be on
  • Even with sspmode=1 and a PIN file, iOS would not connect at all
  • macOS allows pairing with devices with sspmode=0 (and a PIN configured on the Pi). When sspmode=1, macOS decides upon a PIN and either the Pi has a fixed PIN list (which does not match => connection refused), or requires keyboard input on the Pi (which is not desired for a headless device).

So you need to try yourself if this works with your setup.

Limitations

  • Only one Bluetooth device can be connected at a time, otherwise interruptions may occur.
  • The device is always open, new clients can connect at any time without authentication.
  • To permanently save paired devices when using read-only mode, the Raspberry has to be switched to read-write mode until all devices have been paired once.
  • You might want to use a Bluetooth USB dongle or have the script disable Wi-Fi while connected (see bluetooth-udev), as the BCM43438 (Raspberry Pi 3, Zero W) has severe problems with both switched on, see raspberrypi/linux/#1402.
  • The Pi Zero may not be powerful enough to play 192 kHz audio, you may want to change the values in /etc/asound.conf accordingly.

Disclaimer

These scripts are tested and work on a current Raspberry Pi OS setup on Raspberry Pi. Depending on your setup (board, configuration, sound module, Bluetooth adapter) and your preferences, you might need to adjust the scripts. They are held as simple as possible and can be used as a starting point for additional adjustments.

Upgrading

This project does not really support upgrading to newer versions of this script. It is meant to be adjusted to your needs and run on a clean Raspberry Pi OS install. When something goes wrong, the easiest way is to just wipe the SD card and start over. Since apart from Bluetooth pairing information all parts are stateless, this should be ok.

Updating the system using apt-get upgrade should work however.

Contributing

Package and configuration choices are quite opinionated but as close to the Debian defaults as possible. Customizations can be made by modifying the scripts, but the installer should stay as simple as possible, with as few choices as possible. That said, pull requests and suggestions are of course always welcome. However I might decide not to merge changes that add too much complexity.

Related projects

There are many forks and similar projects that are optimized for more specific requirements.

  • Arcaria197/rpi-audio-receiver - a fork that uses Raspbian 10 (legacy) and runs on Raspberry Pi Zero W hardware
  • HiFiBerryOS - a more sophisticated approach on this, using an entirely custom (buildroot) ecosystem

References

License

MIT

rpi-audio-receiver's People

Contributors

artmg avatar bchavet avatar ettiennegous avatar haukepribnow avatar nicokaiser avatar nvalis avatar quoing avatar sdirkwinkel avatar sebpomme avatar torgee avatar yanone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rpi-audio-receiver's Issues

spotifyd random client connection port (firewall)

Hello nicokaiser and the others,
I noticed that spotify client was unable to see the pi when ufw was up. It seems that spotifyd by default uses random ports for client connection : Spotifyd/spotifyd#465
I could fix that on my setup by modifying the spotifyd conf file (/etc/spotifyd.conf) following the config example and adding a line :
zeroconf_port = <someport>

I though what could be done is to add a random port once and write it to the config.
Whomever will want to setup the firewall will notice which port it is using (I guess).
Optionally, the script could go beyond and setup the rules in the firewall, but its out of my skills on that point ^^'

P.S. : I want to thank you for this only easy script to setup raspberry pi with alsa and bluetooth (all the old ones are using pulseaudio and mess everything)

bluetooth 5.0 ?

Hello,

i know you recommended buying a BT 4.0 USB adapter.
I thought it might be a good idea to take teh newest standard: BT 5.0.
But obviously it wasn't a good idea, since it does not work.

these are the specs: https://launchstudio.bluetooth.com/ListingDetails/75270
when i do 'bluetoothctl list' it does not even show me the BT-controller.

so do i have any chance to get this to work ?

Bluetooth auto trust not working

bluetooth is discoverable, but when i need to connect a new device i have to open bluetoothctl and trust the new device, otherwise it disconnects after a few seconds. Running Raspbian 9. Tested on a raspberry pi b+, 3b, and 3b+ with the same outcome, any fix?

Spotify Connect client dropping out and crashes

Hi
After a few songs played of a queue the connection to the client is lost and IT then crashes.
A reboot is requiered to get things up and running again.

Tried both Android phone and Windows PC Spotify client and samme result.

Any ideas of what the problem can be, is there any logs i can check for faults ?

Best Regards
Anders

Bluetooth improvements (discussion)

I recently set up my Pi Zero as a Bluetooth receiver with bluealsa by reading and following several write ups and tutorials and bug reports scattered across the web. Your repo was invaluable but I believe your implementation could be improved. Here is a list of improvements that I have implemented. Before I put in any pull requests I wanted to get an idea of if you're interested in any of these?

  1. bluealsa and bluealsa-aplay run under a unprivileged system user 'buealsa' who is a member of the audio and bluetooth groups. Adapted from here

My service files look like this:

[Unit]
Description=Bluealsa daemon
Requires=bluetooth.service
After=bluetooth.service

[Service]
Type=dbus
BusName=org.bluealsa
User=bluealsa
Group=bluealsa
NoNewPrivileges=true
ExecStart=/usr/bin/bluealsa -i hci0 -p a2dp-sink --a2dp-force-audio-cd
Restart=on-failure
ProtectSystem=strict
ProtectHome=true
PrivateTmp=true
PrivateDevices=true
RemoveIPC=true
RestrictAddressFamilies=AF_UNIX AF_BLUETOOTH

[Install]
WantedBy=bluetooth.target
[Unit]
Description=Bluealsa audio player
Requires=bluealsa.service
After=bluealsa.service

[Service]
Type=simple
ExecStartPre=/bin/sleep 1
ExecStart=/usr/bin/bluealsa-aplay --profile-a2dp --single-audio --pcm-buffer-time=1000000 00:00:00:00:00:00
Restart=on-failure
ProtectSystem=strict
ProtectHome=true
PrivateTmp=true
RemoveIPC=true
RestrictAddressFamilies=AF_UNIX
User=bluealsa
Group=audio
NoNewPrivileges=true

[Install]
WantedBy=bluetooth.target
  1. I noticed what I think is a bug. But if 2 devices are connected and one disconnects bluetooth becomes discoverable even though there is still a connected device. I racked my brain on this this one and this is the best solution I came up with. bluetoothctl info spits out 'Missing device address argument' if no devices are connected so I use that to make sure nothing is connected before I enable discovery. (I also made my own sound for discovery mode).

My /usr/local/bin/bluetooth-udev looks like this:

#!/bin/bash
if [[ ! $NAME =~ ^\"([0-9A-F]{2}[:-]){5}([0-9A-F]{2})\"$ ]]; then exit 0; fi
action=$(expr "$ACTION" : "\([a-zA-Z]\+\).*")
if [ "$action" = "add" ]; then
    bluetoothctl discoverable off
    if [ -f /usr/local/share/sounds/__custom/device-added.wav ]; then
        aplay -q /usr/local/share/sounds/__custom/device-added.wav
    fi
    ifconfig wlan0 down &
fi
if [ "$action" = "remove" ]; then
    if [ -f /usr/local/share/sounds/__custom/device-removed.wav ]; then
        aplay -q /usr/local/share/sounds/__custom/device-removed.wav
    fi
    deviceinfo=$(bluetoothctl info)
    if [ "$deviceinfo" = "Missing device address argument" ]; then
        if [ -f /usr/local/share/sounds/__custom/discoverable.wav ]; then
            aplay -q /usr/local/share/sounds/__custom/discoverable.wav
        fi
        bluetoothctl discoverable on
        ifconfig wlan0 up &
    fi
fi
  1. Without the --single-audio bluealsa-aplay arg it's possible for multiple devices to stream audio at the same time. I'm not sure if this is intentional but in my mind only one device should be able to stream at a time. --single-audio doesn't stop multiple devices from being connected you can just pause or stop one stream and start the other.

  2. python-dbus has been deprecated for YEARS and should not be used. I plan on rewriting a2dp-agent.py in PyGObject (I know my way around dbus and PyGObject)

Directories don't exist?

On running the command sudo ./install-bluetooth.sh I got the following errors:
./install-bluetooth.sh: 22: ./install-bluetooth.sh: cannot create /opt/local/bin/bluetooth-agent: Directory nonexistent
chmod: cannot access '/opt/local/bin/bluetooth-agent': No such file or directory
./install-bluetooth.sh: 174: ./install-bluetooth.sh: cannot create /opt/local/bin/bluetooth-udev: Directory nonexistent
chmod: cannot access '/opt/local/bin/bluetooth-udev': No such file or directory

Any ideas?

Thanks,
Jamie

Booting Pi in read-only mode

Hi
After installation, I will be following this guide to setup Pi in read-only mode, so that it can behave as a common hardware - ie, no need to follow proper shutdown procedure.

Will this affect the audio-receiver in anywy?

A dependency job for hciuart.service failed. See 'journalctl -xe' for details.

Hi there,

I get this error on installation
Setting up pi-bluetooth (0.1.12) ... A dependency job for hciuart.service failed. See 'journalctl -xe' for details.
hciuart.service stsutus:

`sudo systemctl status hciuart.service
● hciuart.service - Configure Bluetooth Modems connected by UART
   Loaded: loaded (/lib/systemd/system/hciuart.service; enabled; vendor preset: enabled)
   Active: inactive (dead)

Nov 30 21:38:34 caravellebt systemd[1]: Dependency failed for Configure Bluetooth Modems connected by UART.
Nov 30 21:38:34 caravellebt systemd[1]: hciuart.service: Job hciuart.service/start failed with result 'dependency'.
Nov 30 22:34:37 caravellebt systemd[1]: Dependency failed for Configure Bluetooth Modems connected by UART.
Nov 30 22:34:37 caravellebt systemd[1]: hciuart.service: Job hciuart.service/start failed with result 'dependency'.
Nov 30 22:45:38 caravellebt systemd[1]: Dependency failed for Configure Bluetooth Modems connected by UART.
Nov 30 22:45:38 caravellebt systemd[1]: hciuart.service: Job hciuart.service/start failed with result 'dependency'.

Final error is
Can't set Simple Pairing mode on hci0: Input/output error (5)

Using the June 2019 version of Buster.

Any suggestions please?

Bluetooth Auto-Connect

Hi! I'm really new on Raspberry but it works fine!
Is it possible to have a auto-connect my Smartphone via Bluetooth. Right now I have to connect the PI manually from my iPhone (6s) ... it's okay but it would be better if it connect when I'm in the near of my PI...

Thanks a lot!!!

Upsampling provides no benefit

In enable-hifiberry.sh you upsample the audio to 192000. Not only is this a waste of CPU cycles it actually degrades fidelity for audio that's sample rate is not an integer divisor of 192000 namely 44100 audio that accounts for the vast majority of audio that is played because by default ALSA resamples with a trivial algorithm (basically straight multiplication division with a lot of rounding errors because of the remainders). Changing the bit depth to S32_LE is a good idea because it gives more headroom for digital volume control though but resampling is no good. If you don't resample ALSA will just play whatever at it's native sampling rate. There's really no need to specify a global sampling rate. You can just use softvol in ALSA by itself for software volume without dmix.

no bt device shown on iphone

Hi, I wanted to just use the bluetooth script, but no device shows up on my iphone when trying to find it. I can conect via ssh and bluetoothctl, but this should be prevented by udev i guess...

best regards,
goeste

Choppy bluetooth audio

Hi,
I managed to make my Raspberry Pi 3B+ (running latest stable Raspbian) discoverable on Bluetooth and to have an audio stream to it.

However, the audio is very choppy and quite poor.
Moreover, I'm getting these lines in loop in journalctl when there's audio streamed to it.

févr. 01 18:18:40 raspberrypi kernel: Bluetooth: hci0: Frame reassembly failed (-84)
févr. 01 18:18:40 raspberrypi kernel: Bluetooth: hci0: Frame reassembly failed (-84)
févr. 01 18:18:40 raspberrypi kernel: Bluetooth: hci0: Frame reassembly failed (-84)
févr. 01 18:18:40 raspberrypi kernel: Bluetooth: hci0: Frame reassembly failed (-84)
févr. 01 18:18:40 raspberrypi kernel: Bluetooth: hci0: Frame reassembly failed (-84)
févr. 01 18:18:40 raspberrypi kernel: Bluetooth: hci0: Frame reassembly failed (-84)
févr. 01 18:18:40 raspberrypi kernel: Bluetooth: hci0: Frame reassembly failed (-84)
févr. 01 18:18:40 raspberrypi kernel: Bluetooth: hci0: Frame reassembly failed (-84)
févr. 01 18:18:40 raspberrypi kernel: Bluetooth: hci0: Frame reassembly failed (-84)
févr. 01 18:18:40 raspberrypi kernel: Bluetooth: hci0: Frame reassembly failed (-84)
févr. 01 18:18:40 raspberrypi kernel: Bluetooth: hci0: Frame reassembly failed (-84)
févr. 01 18:18:40 raspberrypi kernel: Bluetooth: hci0: Frame reassembly failed (-84)
févr. 01 18:18:40 raspberrypi kernel: Bluetooth: hci0: Frame reassembly failed (-84)
févr. 01 18:18:40 raspberrypi kernel: Bluetooth: hci0: Frame reassembly failed (-84)
févr. 01 18:18:40 raspberrypi bluealsa[340]: /usr/bin/bluealsa: Missing RTP packet: 90 != 89
févr. 01 18:18:41 raspberrypi bluealsa[340]: /usr/bin/bluealsa: SBC decoding error: No such file or directory
févr. 01 18:18:41 raspberrypi kernel: Bluetooth: hci0: Frame reassembly failed (-84)
févr. 01 18:18:41 raspberrypi kernel: Bluetooth: hci0: Frame reassembly failed (-84)
févr. 01 18:18:41 raspberrypi kernel: Bluetooth: hci0: Frame reassembly failed (-84)

Any idea of how to solve that ?

Many thanks in advance

Edit : I had wlan0 pulled down by default

mono to stereo

Hi, when i run
$ amixer
I obtain this:
Simple mixer control 'PCM',0 Capabilities: pvolume pvolume-joined pswitch pswitch-joined Playback channels: Mono Limits: Playback -10239 - 400 Mono: Playback -25 [96%] [-0.25dB] [on]
It's possible evolve it from mono to stereo?
Another question, sometimes audio pick/sick. I use raspberry 3 model B+ and I have connect it to yamaha rx-v571 by hdmi and I stream with OnePlus 7 by bluetooth.

Thank you

Device is Not Discoverable

Device Is not Discoverable RPI3 Model B... On Board Bluetooth.....

Used this Technique
bluetoothctl
power on
discovery on
it kind of worked...
But Not discoverable After Reboot...

All Updated/Upgrade...etc.....Tried On a Cleaning again the OS too....

Still Don't Know the Error

Bluetooth is off at reboot

The board's bluetooth has to be manually powered on after every reboot. Using a raspberrypi 4, installed only bluetooth. The [email protected] service fails at boot with the following status:

Aug 12 23:34:12 aut0 hciconfig[473]: Can't set scan mode on hci0: Network is down (100)

First time pairing question.

Hello,
I'm not sure if what I am experiencing is a bug or this is how you designed this to work. The first time I attempt to pair a device with my pi2B (using a Bluetooth dongle) I am unable to pair the devices without using bluetoothctl. Once that initial pairing is complete everything runs brilliantly. Is my install running as designed or has something gone wrong? I'd love if I didn't have to do anything whenever a new device pairs.

Bluetooth Device not pairing properly

Hi,
first of all thanks for this great work so far!

I'm having issues connecting the raspberry as a audio bluetooth device.

I can find the airpi audio device on my android phone and pair with it, but it doesn't establish a connection to it (tested on 2 different phones).
In my log after calling install-bluetooth.sh, there are also some errors:

Processing triggers for libc-bin (2.24-11+deb9u3) ...
./install-bluetooth.sh: 22: ./install-bluetooth.sh: cannot create /opt/local/bin/bluetooth-agent: Directory nonexistent
chmod: cannot access '/opt/local/bin/bluetooth-agent': No such file or directory
Created symlink /etc/systemd/system/multi-user.target.wants/bluetooth-agent.service → /etc/systemd/system/bluetooth-agent.service.
Created symlink /etc/systemd/system/graphical.target.wants/bluealsa-aplay.service → /etc/systemd/system/bluealsa-aplay.service.
./install-bluetooth.sh: 174: ./install-bluetooth.sh: cannot create /opt/local/bin/bluetooth-udev: Directory nonexistent
chmod: cannot access '/opt/local/bin/bluetooth-udev': No such file or directory
Created symlink /etc/systemd/system/multi-user.target.wants/startup-sound.service → /etc/systemd/system/startup-sound.service.

Running on Pi Zero W with Raspian Stretch Lite (2018-04-18).

Change output device

Hello Nico,

I want to define the output sound card by my one where the bluetooth stream is forwarded. In my case I dont want to playback the bluealsa sound on the default alsa device. How can I change this?

Best regards,
Andreas

unable to locate bluealsa?

when i do sudo ./install-bluetooth.sh "E: unable to locate packgae bluealsa" appeared. Maybe u can add like repository first for bluealsa?

Getting HifiBerry to work!?

Everything looks fine after the installation. Airplay and Bluetooth is getting connected, but there is NO SOUND coming out...
I have a Pi 3 with HifiBerry MiniAmp
I tried the enable-hifiberry.sh, but it says I have no permission. I manually switched dtoverlay to hifiberry-dac in /boot/config.txt but it doesn't work. :(

add arch option during spotifyd installation

I have run the script on my Raspberry Pi Zero W with a Phat DAC.
I have installed all possible options.

For some reason spotifyd is not working. I filled in the config files but it does not show up in my other Spotify clients.

In the installation script this is what happens:

Do you want to install Spotify Connect (spotifyd)? [y/N] y
spotifyd

And then nothing happens, the script just continues to the next install option. The configuration file is there and I can edit it. But when I run spotifyd, I get:

Illegal instruction

I saw this: Spotifyd/spotifyd#259 But I didn't know what to make of it.

Low Volume

Hi, everytime system up I need to connect it via ssh and set volume with this command

amixer sset 'PCM' 96%

It's possible save this settings or automate it?

thank you

Pair and disable

How to connect the pair to a button in RP3, so no one cannot pair unless they press the button? For BT and for AirPlay ?

requirements missing

hey, just tried to install on jessie but after investigation learned that stretch is required...

connection pin

Hallo,

i'm glad for your work - installation was easy and is working.
I have only one question: how can I enable a PIN or somthing to restrict who can connect to the Pi via Bluetooth?

many Thx!

How to uninstall

How can I entirely uninstall this package or at least stop all the modules to load on boot?

Bluetooth can't connect

The raspberry pi shows up as a bluetooth audio device on my phone and laptop but when i try to connect, it tries for a second and then says "Couldn't connect"
Using Raspberry Pi 2 Model B v1.1 running 2019-07-10-raspbian-buster

no analog audio

It seems that the analog audio jacket is not linked to the DAC. I tried multiple boards and installations but none of these tries were sucessesful. There is no sound from the analog audio jacket of the pi. If i connect HDMI Connector with external audio jacket i get always sound from this source. Doesn't metter if i select Analog or HDMI for output. Also Alsamixer only shows as device "bcm2835 Headphones" or "bcm2835 HDMI 1" . Also if i look in "raspi-config" "audio" i cannot see my "3.5mm Jack" only "HDMI 1" and " Headphones" are listet.

Bluetooth udev script to disable WiFi isn’t working

Hi.

I have followed the setup instructions and installed everything. This is on Pi Zero W running Raspbian Stretch Lite.

Everything is working as it should be except the Bluetooth udev script to disable the WiFi whilst using Bluetooth connection. I do have the audio dropouts so i am hoping someone can let me know what to check to find out why this isn’t working.

I am not a Linux expert but I will try and follow your advice to get this working.

Thanks
Rick

Plexamp?

Thanks for this great guide. Wondering if you think plexamp could work well with this? I’ve tried running plexamp in rpi players before, but it tends to compete with the audio channel, so either it grabs it, or airplay grabs it. Any thoughts? Many thanks...

Password?

I Connected To My Pi via SSH after install and the password is incorrect... it used to be "raspberry" (the default) now i cant login

Only 1 BT connection at a time

How to limit to one BT connection at a time? Also, when pairing a BT Android, it asked for permission on the RP3, how to make this automatically ?

[Feature Request] Add support for better bluetooth codecs AAC and aptx (HD)

Hi @nicokaiser ,
really nice project and exactly what I was searching for.

I did a bit of research if it is possible to use the higher-quality codecs aac and aptx for bluetooth audio.
I found out, that it is possible to use those codecs as an install option of BlueALSA: https://github.com/Arkq/bluez-alsa.
With the arguments --enable-aac, --enable-aptx, --enable-aptx-hd it should be possible to use the better quality codecs, because SBC codec is more like a compromise solution.

Or is that feature already integrated? I didn't find any hints in the description.
Kind regards,
Markus

RPI Stretch - Need to turn on Bluetooth discovery

Have just done a fresh install on Raspberry PI W with 2018-11-13-raspbian-stretch-lite.img.

Also did a rpi-update

All services came up but the unit was not discoverable. Used
bluetoothctl
power on
discovery on

Now it is all working. Done a few reboots to confirm and all is fine. Can't quite work out if this is semi permanent setting?

Tempted now to give this a go on Buster

Uninstall the script

How do you uninstall everything that was installed by the script and restore to the earlier state?

doesn't work with google home (mini)

Hello,

everything works fine, when i connect a android phone to this receiver.
But i can't connect my google home to it - at least not when i use the "official way" by initiating the connection via google home app:

that's what i find in the console:

[NEW] Device 20:DF:B9:93:2E:9B Wohnzimmer
[CHG] Device 20:DF:B9:93:2E:9B Modalias: bluetooth:v000Fp1200d1436
[CHG] Device 20:DF:B9:93:2E:9B UUIDs: 0000110a-0000-1000-8000-00805f9b34fb
[CHG] Device 20:DF:B9:93:2E:9B UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
[CHG] Device 20:DF:B9:93:2E:9B UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
[CHG] Device 20:DF:B9:93:2E:9B UUIDs: 00001200-0000-1000-8000-00805f9b34fb
[CHG] Device 20:DF:B9:93:2E:9B UUIDs: 00001800-0000-1000-8000-00805f9b34fb
[CHG] Device 20:DF:B9:93:2E:9B UUIDs: 00001801-0000-1000-8000-00805f9b34fb
[CHG] Device 20:DF:B9:93:2E:9B UUIDs: 0000fea0-0000-1000-8000-00805f9b34fb
[CHG] Device 20:DF:B9:93:2E:9B ServicesResolved: yes
[CHG] Device 20:DF:B9:93:2E:9B Paired: yes
[CHG] Device 20:DF:B9:93:2E:9B ServicesResolved: no
[CHG] Device 20:DF:B9:93:2E:9B Connected: no

But then i've figured out: when i initiate the connection from the RPI -> home it works:
sudo bluetoothctl
trust 20:DF:B9:93:2E:9B
pair 20:DF:B9:93:2E:9B
connect 20:DF:B9:93:2E:9B

[bluetooth]# connect 20:DF:B9:93:2E:9B
Attempting to connect to 20:DF:B9:93:2E:9B
[CHG] Device 20:DF:B9:93:2E:9B Connected: yes
Connection successful
[CHG] Device 20:DF:B9:93:2E:9B ServicesResolved: yes
[CHG] Controller B8:27:EB:DC:A6:50 Discoverable: no

any idea ?

Use Raspotify instead of Spotifyd

Raspotify is a super thin wrapper around librespot (what Spotifyd is based on), basically just a unit file that runs librespot as a daemon and a config file. It works out of the box on every version of the Raspberry Pi and I would guess be lighter then Spotifyd. It would also reduce your Spotify install script to:

curl -sL https://dtcooper.github.io/raspotify/install.sh | sh

You loose nothing since you don't use any of the extra features that Spotifyd provides over librespot.

Some problems on RPi3B

Hi,

Some problems when i execute your scripts:

  • only android devices can be paired.
  • after paired with android devices, the audio don't output to rpi3.
  • iphone bluetooth devices don't list raspberry.

Thanks.

Question regarding enable-script for other cards

Hey,

first of all thanks for the git repo, it sure made making the my rpi 3b+ to a audio receiver much easier than I anticipated!

I don't got a Hifiberry card, but a Allo Digione card that basically does the same. It's working fine now with the rpi and I've gotten it working for the services I want (Bluetooth receiver and Spotify connect).

I only run a few of the scripts from your git to have better control / try improve my understanding a bit. Obviously one of the scripts I didn't run was the enable-hifiberry.sh script as I don't have any of those cards, but I was thinking maybe I should do something similar but adapt it to the card I got.

I see that our either create or alter the /etc/asound.conf file. On my device (latest Raspbian 10 buster, full dist-upgrade last week) this file doesn't exist (at least not as /etc/asound.conf, but got a similar file in /usr/share/alsa/alsa.conf - are these the same and is this the one that should be edited?).

Does this part of the process have a noticeable effect on the final result? And if so, are the values in the script device-specific for the Hifiberry products or just for the rpi device (I see the comments have different values for rpi zero, i.e.).

The Allo Digione card is enabled using dtoverlay=allo-digione, but when running other commands such as aplay -l or cat /proc/asound/cards it displays slightly modified names for the card, so I'm not sure which would be correct to use if I were to try making my own /etc/asound.conf file. See below for outputs.

pi@raspberrypi:~ $ cat /proc/asound/cards
 0 [sndallodigione ]: RPi-WM8804 - snd_allo_digione
                      snd_allo_digione
pi@raspberrypi:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sndallodigione [snd_allo_digione], device 0: Allo DigiOne HiFi wm8804-spdif-0 [Allo DigiOne HiFi wm8804-spdif-0]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

Do you think something as simple as changing hifiberry with allodigione in the parts of your script that you output to /etc/asound.conf would be sufficient?

I know I probably shouldn't tweak more as it's working now, but I just have a feeling I might miss out on something so hard to resist! ;)
 

Bluetooth receiver not working

Hi,
I've recently reinstalled the Pi after I messed up some configuration, and wanted to let you know that the thing didn't work anymore with your latest code. In particular, the Bluetooth wouldn't advertise itself and therefore can't be discovered.
I checked out this commit directly after my PR and got it working instantly.
Somewhere after that point something went wrong. This is on a Pi3.

install-startup-sound.sh missing/redundant

Hey,
I love the project! I just installed it via install.sh and it failed after installing the snapcast client as it could not find ./install-startup-sound.sh.
I looked into your install.sh and it contains sudo ./install-startup-sound.sh, but the repository does not. So either the install-startup-sound.sh is missing in the repo or you forgot to remove it from the install.sh script.

No big deal, but should be fixed.

Many thanks!

Feature: Sync multiple Pi's

Hi,
Is it possible we can a new feature to this? I was thinking something like Sonos where you can have multiple Pi's and sync the sound to each.

Jamie

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.