树莓派4B 开启串口登陆

烧录镜像

ssh

image.png

串口登录

sudo raspi-config

  • 3 Interface Options Configure connections to peripherals


    image.png
  • I6 Serial Port Enable/disable shell messages on the serial connection


    1650697523(1).png
  • Would you like a login shell to be accessible over serial? <Yes>


    1650697573(1).png
  • The serial login shell is enabled
  • The serial interface is enabled


    image.png
  • <Finish>


    Finish

dtoverlay -a | grep uart

$ dtoverlay -a | grep uart
  midi-uart0
  midi-uart1
  midi-uart2
  midi-uart3
  midi-uart4
  midi-uart5
  miniuart-bt
  qca7000-uart0
  uart0
  uart1
  uart2
  uart3
  uart4
  uart5

sudo vi /boot/config.txt

[all]
enable_uart=1

dtoverlay=miniuart-bt

ls -alh /dev/serial*

lrwxrwxrwx 1 root root 7 Apr 23 14:40 /dev/serial0 -> ttyS0
lrwxrwxrwx 1 root root 5 Apr 23 14:40 /dev/serial1 -> ttyAMA0

sudo vi /boot/cmdline.txt

console=serial0,115200 root=PARTUUID=86115bdf-02 rootfstype=ext4 fsck.repair=yess rootwait

重启

ls -alh /dev/serial*

lrwxrwxrwx 1 root root 7 Apr 23 14:46 /dev/serial0 -> ttyAMA0
lrwxrwxrwx 1 root root 5 Apr 23 14:46 /dev/serial1 -> ttyS0
MobaXterm
Serial Shell
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容