美文网首页
树莓派4B 开启串口登陆

树莓派4B 开启串口登陆

作者: iOSDevLog | 来源:发表于2022-04-23 15:29 被阅读0次

    烧录镜像

    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

    相关文章

      网友评论

          本文标题:树莓派4B 开启串口登陆

          本文链接:https://www.haomeiwen.com/subject/cweaertx.html