關閉串口調試功能,打開串口:
- 執行命令進入樹莓派配置:
sudo raspi-config
依次選擇5. Interfacing Options ->Serial ->no -> yes
- 打開/boot/config.txt文件,查找是否存在
enable_uart=1
不存在則在最後添加
如果是樹莓派3B,板載的串口ttyAMA0作爲藍牙使用,用戶串口端口改爲ttySO
sudo raspi-config
5. Interfacing Options ->Serial ->no -> yes
enable_uart=1
不存在則在最後添加如果是樹莓派3B,板載的串口ttyAMA0作爲藍牙使用,用戶串口端口改爲ttySO