树莓派变成蓝牙音箱

96
rekcah1986
2018.12.11 11:43 字数 251

0.变是不可能变的,你首先得有个普通音箱。
1.刷入Stretch系统,地址:https://downloads.raspberrypi.org/raspbian_latest
2.默认源好像有问题,换一下:
sudo vim /etc/apt/sources.list

#deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi    <<---屏蔽该源
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
#替换为 http://mirrors.shu.edu.cn/raspbian/raspbian/
deb http://mirrors.shu.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi    #<---增加

3.更新列表:

sudo apt-get update && sudo apt-get -y dist-upgrade && sudo apt-get update

4.安装xrdp方便远程桌面登录(可不装):sudo apt install xrdp
5.安装a2dp支持

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

6.安装过程中的几个选项,顺序记不太清了:
(1)Car和Home那个,我选的Home,具体区别不清楚
(2)Device name和AirPlay Device Name,写PiMusic,其实随便写
(3)密码,不输入就可以
(4)Do you want all the Devices to use the same name? (y/n) : Choose y or n,选n
(5)Which Sound Card are you using? (0/1/2/3/4/5/6/7/8/9/10/11),写0
7.装完以后,音箱插树莓派上,把树莓派的蓝牙查找打开,用手机蓝牙找到并连接,播放音乐即可。
8.搞不定的留言问我吧,哈哈~

树莓派
Web note ad 1