BaReinhard / Super-Simple-Raspberry-Pi-Audio-Receiver-Install

Super Easy installation to make your Raspberry Pi an Audio Receiver
GNU Affero General Public License v3.0
490 stars 85 forks source link

[stretch] Access Point #121

Closed totti2 closed 4 years ago

totti2 commented 6 years ago

environment: stretch lite, raspberry pi 3 install choices: bluetooth, airplay, snapserver and -client

In order to get the acces point mode running again in a stretch install, I just followed this how-to: https://www.raspberrypi.org/documentation/configuration/wireless/access-point.md

What works:

Experiencing bandwidth issues:

I will try the same setup with an extra wifi-dongle. Or...
Someone with more than my noobish copy-paste-expertise can help me (, please!).

Lauszus commented 6 years ago

I have worked around the sound issue on Bluetooth by automatically disabling wlan0 when a device is connected. Wifi is then enabled again when the device is disconnected again.

Simply create a script called /home/pi/bt-audio-disable-wlan0.sh with the following content:

#!/bin/bash

while true; do
    RES=$(/usr/bin/inotifywait -q -e CREATE,DELETE /dev/input/)
    case "$RES" in
        "/dev/input/ DELETE event0")
            ifconfig wlan0 up
            service shairport-sync start
        ;;
        "/dev/input/ CREATE event0")
            service shairport-sync stop
            ifconfig wlan0 down
        ;;
    esac
done

Then run:

sudo apt-get install inotify-tools
chmod +x /home/pi/bt-audio-disable-wlan0.sh

Now add /home/pi/bt-audio-disable-wlan0.sh & to /etc/rc.local before exit 0

totti2 commented 6 years ago

Without wifi I cannot control the snapcast server. Plus, all airplay-devices will lose connection. I'd rather keep those functions.

But thanks for your action-on device-change approach. One could use that for an audio signal, indicating when a new bt-device has connected.

Lauszus commented 6 years ago

@totti2 then the best solution would probably be to use a separate dongle for WiFi. That is what I have done myself.

totti2 commented 6 years ago

Alright. Then maybe this would be a good start. dependencies are not corrected yet. Bridge not integrated. So still incomplete, but it's using dnsmasq instead isc-dhcp-server in the AP_config.sh

totti2 commented 6 years ago

I tried this with a dedicated dongle and the initial bandwidth issue is gone (more testing need for snapserver, though).

My smartphone doesn't get an IP when the Pi isn't connected to a LAN. The moment I plug in the ethernet-cable, I get an IP for my smartphone. If I had to guess, I would suspect the dhcpcd not to work properly with both with and without ethernet-connection.

OFF: When using the integrated bluetooth-device I experience a lot of hick-ups and interruptions.

totti2 commented 6 years ago

Finished. If someone could please check this. to sum up:

Lauszus commented 6 years ago

@totti2 I can confirm that script is working. However I made a few changes: https://gist.github.com/Lauszus/47e673e60e7f15d41f5c8b680abefe9e/revisions:

totti2 commented 4 years ago

Should have been done some days ago..