Qt 6.11 is out! See what's new in the release
blog
[SOLVED]Serialport permission programmatically
General and Desktop
3
Posts
2
Posters
1.8k
Views
1
Watching
-
Hi!
In my application I'm using a virtual serial port which is actually a USB-UART converter chip. If it is connected it recognized as /dev/ttyUSBx, where x=0...3. Each time I want to use that particular port I have to fire up the terminal and look it up with dmesg | grep ttyUSB*, then sudo chmod 0666 ttyUSBx to gain access. How can I do this programmatically?
Thank you.
-
Hi,
Simpler (and more secure) way: check the group of ttyUSB* (if on *buntu should be dialout) and add your user to that group (don't forget to logout/login).
If the group is root, add an udev rule to make so that the device gets another group and add your user to that group.
Hope it helps.