I have a home-made device and I wrote a program for data acquisition from it. But each time I plug-in the device I have to change the permissions for /dev/ttyACM0
, so that the port can be used for data transfer. How can I make this device to have read/write permissions by default. The lsusb
output for this device is:
Bus 003 Device 005: ID ffff:0005
If you are a member of the
dialout
group you can access serial devices, includingttySx
,ttyUSBx
, andttyACMx
devices, without changing permissions.Alternatively, you could create a udev rule to set the permissions as the device is attached. See https://askubuntu.com/a/112573/471836
I will add an answer to my own question for anyone that will need this in the future. I followed an answer from @Adam Lussier and have created
/etc/udev/rules.d/50-ttyusb.rules
file with this content (proposed by @Sneetsher):Like this only this specific device is given the read/write permissions. Reference for anyone wanting to know more about writing rules file.