Yes. I noticed that the permissions on this occasion were correct after I posted my response. What seems to be happening is that as soon as data is received on the port the permissions change and I cannot access it. What was different is that I started looking at this again this morning having switched everything off over night and not turned on my (nmea 183) device before booting the Pi and running sudo udevadm test /dev/ttyAMA10. (And posting my response)
So it seems that even if my program grabs the port, as soon as I connect the serial device the group changes to tty and it can't read from it.
Before connecting the serial device:after:Even though opencpn has already opened the port, plugging in the serial connection makes the permissions change from:To:And now I have to go to work. I'll have to come back to this later. Thanks for your help so far.
So it seems that even if my program grabs the port, as soon as I connect the serial device the group changes to tty and it can't read from it.
Before connecting the serial device:
Code:
sudo fuser -v /dev/ttyAMA10 USER PID ACCESS COMMAND/dev/ttyAMA10: root 1411 F.... agetty pi 2106 F.... opencpn
Code:
sudo fuser -v /dev/ttyAMA10 USER PID ACCESS COMMAND/dev/ttyAMA10: root 2203 F.... agetty
Code:
ls -l /dev/ttyAMA10crw-rw---- 1 root dialout 204, 74 Feb 5 06:35 /dev/ttyAMA10
Code:
ls -l /dev/ttyAMA10crw--w---- 1 root tty 204, 74 Feb 5 06:36 /dev/ttyAMA10
Statistics: Posted by jimseng — Mon Feb 05, 2024 6:39 am