树莓派串口访问权限不够被拒绝访问

系统:ubuntu22.04 server
访问串口:serial0, ttyUSBx
添加规则文件,并修改内容:
修改文件:sudo vim /etc/udev/rules.d/70-ttyusb.rules
添加内容:
KERNEL==“ttyUSB[0-9]”, MODE=“0666”
KERNEL=="ttyS[0-9]
", MODE=“0666”
修改规则文件权限:
sudo chmod 777 /etc/udev/rules.d/70-ttyusb.rules
此时reboot重启,你也许会发现无法生效,next:
注意:删除console相关的内容,空格是分隔符
原来/boot/fireware/cmdline.txt文件的内容如下:

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=a05c3c8f-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles

将有关console的内容全部删掉,修改后的cmdline.txt文件内容如下:

dwc_otg.lpm_enable=0 root=PARTUUID=a05c3c8f-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles

reboot重启

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值