安装 A2DP 让树莓派变成蓝牙音箱

来自 rekcah1986 的分享,感谢~

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.搞不定的(在原文处)留言问我吧,哈哈~ 作者:rekcah1986 链接:https://www.jianshu.com/p/d3e522f908f3