uart_raspberry

串口配置

1
sudo raspi-config
1
2
3
interface

disable shell and enable hardware

禁用蓝牙

1
echo "dtoverlay=pi3-disable-bt" >> /boot/config.txt

禁用串行控制台

串行控制台就是从串口登录树莓派,打开/boot/cmdline.txt

1
2
3
4

#dwc_otg.lpm_enable=0 console=tty1 console=serial0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles

dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=y

注意:打开第一句就是打开串口命令行