Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5164

Interfacing (DSI, CSI, I2C, etc.) • Re: ttyAMA10 belongs to tty group, can't be used as normal serial

$
0
0
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:

Code:

sudo fuser -v /dev/ttyAMA10                     USER        PID ACCESS COMMAND/dev/ttyAMA10:       root       1411 F.... agetty                     pi         2106 F.... opencpn                     
after:

Code:

sudo fuser -v /dev/ttyAMA10                     USER        PID ACCESS COMMAND/dev/ttyAMA10:       root       2203 F.... agetty
Even though opencpn has already opened the port, plugging in the serial connection makes the permissions change from:

Code:

ls -l /dev/ttyAMA10crw-rw---- 1 root dialout 204, 74 Feb  5 06:35 /dev/ttyAMA10
To:

Code:

ls -l /dev/ttyAMA10crw--w---- 1 root tty 204, 74 Feb  5 06:36 /dev/ttyAMA10
And now I have to go to work. I'll have to come back to this later. Thanks for your help so far.

Statistics: Posted by jimseng — Mon Feb 05, 2024 6:39 am



Viewing all articles
Browse latest Browse all 5164

Trending Articles