wireless raspberry audio

System

https://www.raspberrypi.org/downloads/
Install Raspbian Stretch

  • Version:November 2018
  • Release date:2018-11-13
  • Kernel version:4.14

Origin shift

1
2
3
sudo nano /etc/apt/sources.list
deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
1
2
3
sudo nano /etc/apt/sources.list.d/raspi.list
deb http://mirror.tuna.tsinghua.edu.cn/raspberrypi/ stretch main ui
deb-src http://mirror.tuna.tsinghua.edu.cn/raspberrypi/ stretch main ui

sudo apt-get update

Config wifi & ssh

1
2
3
4
5
6
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
network={
ssid="SSID"
key_mgmt=WPA-PSK
psk="PASSWD"
}
1
2
3
4
5
6
ifconfig wlan0
sudo ifdown wlan0
sudo ifup wlan0

# or
sudo reboot

open ssh service

1
sudo raspi-config

open ssh in configuration

1
Socket error Event: 32 Error: 10053

if terminal throw exception then check service
sudo sshd -t

key not exist:

1
ssh-keygen -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key

config rsa_key in /etc/ssh

permission not allow:

1
sudo chmod 600 /etc/ssh/*

1
service ssh restart

add command to /etc/rc.load before exit 0

1
/etc/init.d/ssh start

Install A2DP

1
2
3
4
git clone https://github.com/bareinhard/super-simple-raspberry-pi-audio-receiver-install
cd super-simple-raspberry-pi-audio-receiver-install
git checkout stretch-fix
sudo ./install.sh
1
2
3
4
5
6
7
8
9
10
11
# install home version
2. Install the Raspberry Pi Audio Receiver Home Installation

# default name
Do you want all the Devices to use the same name? (y/n) : Choose y

# default passwd
Device WiFi Password: Choose Password

# no sound card
0. No Sound Card

Install create_ap

1
2
3
4
git clone https://github.com/oblique/create_ap.git
cd create_ap
sudo make install
sudo apt-get install util-linux procps hostapd iproute2 iw haveged dnsmasq

add command to /etc/rc.load before exit 0

1
nohup sudo create_ap -n wlan0 raspberry raspberry --no-virl > /dev/null 2>&1 &

raspberry_ios_audio.png

here i use AP without Internet sharing.
if network environment is good, raspberry have internet then add eth0 to command.

1
create_ap -m bridge wlan0 eth0 MyAccessPoint MyPassPhrase

enjoy IOS airplay :)

http://shumeipai.nxez.com/2018/12/28/install-a2dp-to-turn-the-raspberry-pi-into-a-bluetooth-speaker.html
https://blog.csdn.net/huayucong/article/details/51376506
https://blog.csdn.net/newtonsm/article/details/78859152
https://github.com/bareinhard/super-simple-raspberry-pi-audio-receiver-install
https://github.com/oblique/create_ap