Cannot open Serial Port using CuteCom
-
I am using Cutecom to connect to my device
When i "open device", Error "could not open /dev/ttyUSB0sudo apt-get install cutecom
may i know where is cutecom installed. <Which CuteCom not working>Finding ports ttyUSB0 connected
dmesg |grep tty shows ttyUSB0 connected
usb 2-1.3:pl203 now attached to ttyUSB0I have check with lsusb, and device is connected
I set the baud rate, data bits, stops bits and hex input at the right bottom.
I tried with minicom, but i can't open serial port too -
Hi,
Not really a Qt question but anyway, do you have the rights to access your device ?
-
And that's a security hole wide open.
You should rather add your user to the correct group.
-
Yes there is. What I suggested in my last message
-
I do not know what is the benefit of doing so.
Below is the steps on 'how to add user to correct Group'?
What is the difference between primary and secondary group@
First, list all group $ cut -d: -f1 /etc/group
Second, login as root user, $ su -
Third, add user: $ sudo adduser new_username
& add group: $ groupadd groupname
& add user into group $ useradd -G groupname new_username
Fouth, grant sudo privilege $visudo
below root, add newuser ALL=(ALL:ALL) ALL
Fifth, save and closed Ctrl + X
@ -
The benefit ? You don't allow everybody and anybody the rights to access the serial port.
The secondary groups are just the additional groups your user is part of e.g. dial out
@useradd -G dialout username@
is a bit simpler -
Is there a pattern when it fails to open the device ? Did you check if there's an error message returned by QSerialPort ?