On 27/2/21 7:04 am, Kurt McCullum wrote:
Once you plug your USB to serial adapter into your system, it will show up under /dev. You have to have permissions to access it so you will likely need to use chmod on it before you can use it.
Because the permissions are ephemeral and will disappear when you unplug the USB device (unless you hack at udev, the subsystem responsible for creating the device entry when the USB device is plugged in), a more persistent method is to add yourself to the supplementary group that /dev/ttyUSB* belongs to. e.g. $ ls -l /dev/ttyUSB0 crw-rw---- 1 root dialout 188, 0 Feb 27 09:59 /dev/ttyUSB0 $ id -a uid=1000(dt) gid=1000(dt) groups=1000(dt),4(adm),20(dialout),24(cdrom),27(sudo),30(dip),46(plugdev),116(lpadmin),126(sambashare),129(libvirt),999(docker) If you're not a member, add yourself with the following command: $ sudo usermod -a -G dialout <YOUR_USERNAME_HERE> Then logout, and back in, so your process will pick up the new group membership. Cheers, --dt