raspberry pi 4检查ch340/ch341驱动
我是从官网下载的树莓派安装盘,发现其实官网已经做好了串口驱动。自己确定过的包括buster和ubuntu20.04。
通过lsusb可以查到ch341的串口已经识别,
树莓派buster系统相对比较简单,有直接的界面设置。检查如下,
首先在raspberry pi configuration(在启动界面中,首选项-->raspberry pi configuration --> interfaces)中启动serial uart功能,当然你也可以通过下面的文件设置
sudo nano /boot/config.txt
在打开的文件最后面添加:
#ENABLE UART
enable_uart=1
检查,
ls -l /dev | grep serial
可以找到两个串口,
serial0 -> ttyS0
serial1 ->ttyAMA0
在终端输入:
sudo raspi-config
根据以下步骤进行设置:
选择 Interfacing Options ->Serial ->no -> yes 关闭串口调试功能,打开串口
选择Interfacing Options
选择serial
再选择 no,禁用串口登录功能,将串口用于通信。
再选择 yes,启动串口硬件。
如何使用设置串口,可以参考后面的链接。
参考:
https://blog.csdn.net/qq_41305281/article/details/120683429
Linux系统下使用串口连接树莓派_zhrq95的博客-CSDN博客