在ubuntu14.04上,通过qt creator进行串口编程时出现:
trying to open file "/dev/ttyS0"
could not open file: 权限不够
port open is false
jgc> ls -al /dev/ttyS0 crw-rw---- 1 root dialout 4, 64 Mar 23 21:00 /dev/ttyS0 jgc> echo xyzzy >/dev/ttyS0 bash: /dev/ttyS0: Permission denied
解决方法如下:
jgc> id -Gn pax cdrom floppy audio dip video plugdev netdev bluetooth scanner jgc> sudo adduser jgc dialout [sudo] password for jgc: Adding user jgc to group dialout Done. << Restart done here to ensure new group picked up >> jgc> id -Gn jgc dialout cdrom floppy audio dip video plugdev netdev bluetooth scanner
转载于:https://blog.51cto.com/248341/1439044