我无法在我的PC上使用Ubuntu 12.04访问串口。
命令:
dmesg | grep ttyS
输出:
[ 0.590705] 00:08: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
我觉得串口没有被检测到。
有人可以帮我解决这个问题吗?
我无法在我的PC上使用Ubuntu 12.04访问串口。
命令:
dmesg | grep ttyS
输出:
[ 0.590705] 00:08: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
上面的内容告诉我们,内核在您的计算机中检测到一个16550 UART芯片,它提供了一个串行端口(ttyS0),并且有一些资源分配给它(0x3f8 I/O地址,IRQ 4)。[ 0.590705] 00:08: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
crw-rw---- 1 root dialout ... /dev/ttyS0
dialout
组的成员,你就可以访问(读取/写入)串口设备。通过运行以下命令将自己添加到 dialout
组中:sudo adduser $USER dialout
或者:
sudo adduser <username> dialout
ls /dev/ttyS*
的输出。您是否有任何串行设备来测试端口(例如串行Arduino、打印机、串行鼠标等)? - 0x2b3bfa0ttyS01
的权限吗?在我的情况下,运行ls -l /dev/ttyS0
返回的结果是:crw-rw---- 1 root dialout 4, 64 May 8 08:20 /dev/ttyS0
,我可以正常使用它。 - Harris