Automatically gain chmod a+wr of the arduino's serial port

I've been having problems with a recent project of mine to do with the serial port. Basically, the way the project works is the Arduino writes to serial port /dev/ttyACM0 and then a rust program reads from that serial port and does something based on that.
The problem is, whenever I plug the Arduino UNO into my computer, it can't start writing to the serial port and the rust program can't start reading from it instantly because when it's plugged in and the serial port is created, I don't get read/write permissions to it straight away. I have to run sudo chmod a+wr /dev/ttyACM0 then upload the code again and run the rust program again.
I've tried adding myself to the group that has permissions for ttyACM0, which is "uucp" and chowning the whole /dev/ folder but nothing has worked.

Thanks in advance!

https://docs.arduino.cc/software/ide-v1/tutorials/Linux#please-read

Yep thats what I said i've tried. I ran ls -l /dev/ttyACM0 and it gave me crw-rw-rw- 1 root uucp 166, 0 Oct 2 18:33 /dev/ttyACM0 meaning the group is uucp. I added myself to uucp and it still isn't working. /etc/groups shows that I am in the uucp group.

Disclaimer: I'm no longer a real Linux user.

That should not be necessary; the executable is stored in the Arduino.

Which Linux and version are you using?

Ah sorry thats my bad I just tested and I don't need to reupload the code after running chmod, just rerun the rust script. But for reference anyway I'm running archlinux kernal version 6.5.5

You did log out and log in again after making yourself a member of the uucp group?

AHH i can't believe i forgot to do that tysm!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.