Closed LiuQingying closed 1 year ago
2023-04-14 11:19:58.544 TAG I SerialPortManager;openSerialPort: 打开串口 /dev/ttyS5 波特率 9600 2023-04-14 11:19:58.540 yxl.b...star I type=1400 audit(0.0:27374): avc: denied { read } for name="ttyS5" dev="tmpfs" ino=10395 scontext=u:r:untrusted_app:s0:c127,c256,c512,c768 tcontext=u:object_r:serial_device:s0 tclass=chr_file permissive=1 app=yxl.buyhoo.star 2023-04-14 11:19:58.545 serial_port D Opening serial port /dev/ttyS5 with flags 0x2 2023-04-14 11:19:58.545 serial_port D open() fd = 82 2023-04-14 11:19:58.545 serial_port D Configuring serial port 2023-04-14 11:19:58.545 TAG I SerialPortManager;openSerialPort: 串口已经打开 java.io.FileDescriptor@44ae79e 2023-04-14 11:19:58.546 TAG I 串口打开状态:ttyS5---打开状态:SUCCESS_OPENED 2023-04-14 11:19:58.540 yxl.b...star I type=1400 audit(0.0:27375): avc: denied { write } for name="ttyS5" dev="tmpfs" ino=10395 scontext=u:r:untrusted_app:s0:c127,c256,c512,c768 tcontext=u:object_r:serial_device:s0 tclass=chr_file permissive=1 app=yxl.buyhoo.star 2023-04-14 11:19:58.543 yxl.b...star I type=1400 audit(0.0:27376): avc: denied { open } for path="/dev/ttyS5" dev="tmpfs" ino=10395 scontext=u:r:untrusted_app:s0:c127,c256,c512,c768 tcontext=u:object_r:serial_device:s0 tclass=chr_file permissive=1 app=yxl.buyhoo.star 2023-04-14 11:19:58.574 Fragm....TAG I 当前发送串口类型:SERIAL_ONE 2023-04-14 11:19:58.574 Fragm....TAG I onDataSent [ byte[] ]: [49, 50, 51, 52] 2023-04-14 11:19:58.574 Fragm....TAG I onDataSent [ String ]: 1234
您好 请检查一下当前的ttyS5是否有读写权限 使用命令查看 假如只是运行单路串口 这里只需要打开一路就行了 list2.add(new Driver("/dev/ttyS4", "115200"));
我看你上面波特率是9600 更换成115200看一下 这些都需要和串口线对应上
我看你上面波特率是9600 更换成115200看一下 这些都需要和串口线对应上
感谢您的回复,波特率是对的,我再研究研究,有个主板能收到串口数据。不知道这样的报错有没有影响,代码中串口是可读写的,但是控制台有输出2023-04-14 10:58:48.556 yxl.b...str I type=1400 audit(0.0:26779): avc: denied { write } for name="ttyS5" dev="tmpfs" ino=10395 scontext=u:r:untrusted_app:s0:c127,c256,c512,c768 tcontext=u:object_r:serial_device:s0 tclass=chr_file permissive=1 app=yxl.buyhoo.str
串口打开状态:ttyS5---打开状态:SUCCESS_OPENED 2023-04-14 10:58:48.556 yxl.b...str I type=1400 audit(0.0:26779): avc: denied { write } for name="ttyS5" dev="tmpfs" ino=10395 scontext=u:r:untrusted_app:s0:c127,c256,c512,c768 tcontext=u:object_r:serial_device:s0 tclass=chr_file permissive=1 app=yxl.buyhoo.str 是应为报ttyS5没有权限导致的吗?怎么处理呢