Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Issue with permissions to /dev/ttyUSB0, yes I'm in the group
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
clytle374
Apprentice
Apprentice


Joined: 01 Aug 2006
Posts: 226

PostPosted: Fri May 09, 2025 9:43 pm    Post subject: Issue with permissions to /dev/ttyUSB0, yes I'm in the group Reply with quote

Problem only exists when not logged in as root. I'm trying to run a program called uTmax that interfaces with a curve tracer board for vacuum tubes called a utracer.
I've had such problems before with not being in the correct group. Or a driver issue which being root doesn't fix. Any suggestions?


Code:
ls -la /dev/ttyU*
crw-rw----+ 1 root plugdev 188, 0 May  9 17:07 /dev/ttyUSB0



Code:
cory@workbench ~ $ groups
wheel audio video docker usb portage plugdev vboxusers cory


I'm using a USB to RS232 converter I've used a lot on other devices, it's not a cheap clone.

Code:
Bus 002 Device 003: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC


The program does rely on the package dev-qt/qtserialport-6.8.3 if that matters. Lots of references to rfcomm which I can't find data on.

Here is the output of the program
Code:
Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead.
If this causes problems, reconfigure your locale. See the locale(1) manual
for more information.
qt.core.qmetaobject.connectslotsbyname: QMetaObject::connectSlotsByName: No matching signal for on_TLsort_changed()
SerialPortDiscovery: comport= "rfcomm0" available= "ttyUSB0"
SerialPortDiscovery: comport= "rfcomm0" available= "ttyS0"
SerialPortDiscovery: comport= "rfcomm0" available= "ttyS1"
SerialPortDiscovery: comport= "rfcomm0" available= "ttyS2"
SerialPortDiscovery: comport= "rfcomm0" available= "ttyS3"
setting serPortInfo, comport: "ttyUSB0" "rfcomm0"
setting serPortInfo, comport: "ttyS0" "rfcomm0"
setting serPortInfo, comport: "ttyS1" "rfcomm0"
setting serPortInfo, comport: "ttyS2" "rfcomm0"
setting serPortInfo, comport: "ttyS3" "rfcomm0"


When ran as root, I get the same thing that ends with connected.
Code:
Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead.
If this causes problems, reconfigure your locale. See the locale(1) manual
for more information.
qt.core.qmetaobject.connectslotsbyname: QMetaObject::connectSlotsByName: No matching signal for on_TLsort_changed()
QIODevice::write (QFile, "/root/uTmax_files/cal.txt"): device not open
SerialPortDiscovery: comport= "" available= "ttyUSB0"
SerialPortDiscovery: comport= "" available= "ttyS0"
SerialPortDiscovery: comport= "" available= "ttyS1"
SerialPortDiscovery: comport= "" available= "ttyS2"
SerialPortDiscovery: comport= "" available= "ttyS3"
setting serPortInfo, comport: "ttyUSB0" ""
setting serPortInfo, comport: "ttyS0" ""
setting serPortInfo, comport: "ttyS1" ""
setting serPortInfo, comport: "ttyS2" ""
setting serPortInfo, comport: "ttyS3" ""
Open "ttyUSB0"

_________________
NooB since RedHat 6.1
Back to top
View user's profile Send private message
bstaletic
Guru
Guru


Joined: 05 Apr 2014
Posts: 506

PostPosted: Sat May 10, 2025 11:12 am    Post subject: Reply with quote

Were you in the plugdev group before you logged into your computer?
If not, you'll have to log out everywhere and log in again, or restart.
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1875
Location: South America

PostPosted: Sat May 10, 2025 11:35 am    Post subject: Re: Issue with permissions to /dev/ttyUSB0 Reply with quote

clytle374 wrote:
Code:
ls -la /dev/ttyU*
crw-rw----+ 1 root plugdev 188, 0 May  9 17:07 /dev/ttyUSB0

Note that there is a "+" in the output. There's probably an access control list (ACL), so ls is not telling the full story. Post the output of getfacl /dev/ttyUSB0.
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
clytle374
Apprentice
Apprentice


Joined: 01 Aug 2006
Posts: 226

PostPosted: Sat May 10, 2025 1:46 pm    Post subject: Re: Issue with permissions to /dev/ttyUSB0 Reply with quote

bstaletic wrote:
Were you in the plugdev group before you logged into your computer?
If not, you'll have to log out everywhere and log in again, or restart.


Yes, I even rebooted to be sure.

GDH-gentoo wrote:
clytle374 wrote:
Code:
ls -la /dev/ttyU*
crw-rw----+ 1 root plugdev 188, 0 May  9 17:07 /dev/ttyUSB0

Note that there is a "+" in the output. There's probably an access control list (ACL), so ls is not telling the full story. Post the output of getfacl /dev/ttyUSB0.


Interesting, that's new territory to me. Here's the output

Code:
 getfacl /dev/ttyUSB0
getfacl: Removing leading '/' from absolute path names
# file: dev/ttyUSB0
# owner: root
# group: plugdev
user::rw-
user:cory:rw-
group::rw-
mask::rw-
other::---

_________________
NooB since RedHat 6.1
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23405

PostPosted: Sat May 10, 2025 2:21 pm    Post subject: Reply with quote

What does strace report to be failing? If we knew specifically which system call fails for your user, we might better understand what to fix.
Back to top
View user's profile Send private message
clytle374
Apprentice
Apprentice


Joined: 01 Aug 2006
Posts: 226

PostPosted: Sat May 10, 2025 2:53 pm    Post subject: Reply with quote

Hu wrote:
What does strace report to be failing? If we knew specifically which system call fails for your user, we might better understand what to fix.


I'm not knowledgeable in the use of strace. It completely overruns the 10000 lines in the buffer in seconds. After a quick search I tried the following options without effect.

Code:
strace ./do_not_run_uTmax -e trace=/dev/ttyUSB0


Code:
strace ./do_not_run_uTmax -P /dev/ttyUSB0


Obviously I don't know what I'm doing there.
_________________
NooB since RedHat 6.1
Back to top
View user's profile Send private message
bstaletic
Guru
Guru


Joined: 05 Apr 2014
Posts: 506

PostPosted: Sat May 10, 2025 3:03 pm    Post subject: Reply with quote

Try
Code:
strace -o output.log ./do_not_run_uTmax -e trace=/dev/ttyUSB0
and then upload the output.log somewhere for us.
Back to top
View user's profile Send private message
clytle374
Apprentice
Apprentice


Joined: 01 Aug 2006
Posts: 226

PostPosted: Sat May 10, 2025 3:37 pm    Post subject: Reply with quote

bstaletic wrote:
Try
Code:
strace -o output.log ./do_not_run_uTmax -e trace=/dev/ttyUSB0
and then upload the output.log somewhere for us.


https://drive.google.com/file/d/1ZzCn73UhwnaW5NDTB64RGrpIeWdpcHxb/view?usp=sharing

I might really have a problem here. I didn't realize that using the do_not_run was skipping setting a path to local libs. It will not run using them at all. I found the source code to the program and will try that later if all else fails
_________________
NooB since RedHat 6.1
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum