Unsolved Multi serial port application
-
yes having two ports only ttyS4 and ttyS5 i am not using any usb to serial converter i am directly connecting with serial port only .....i have tried terminal example its giving the permission error means sudo permission .....
-
permission is denied error while opening the port in Terminal Sample...
-
-
Are you in dialout group?
-
i tried using this command on the qt project path also not able to open the serial ports.....
-
yes i am in dialout group....
-
crw-rw---- 1 root dialout 4, 68 Dec 11 13:22 /dev/ttyS4
-
@jsulm said in multi serial port application:
ls -lh /dev/ttyS4
crw-rw---- 1 root dialout 4, 68 Dec 11 13:22 /dev/ttyS4
-
Are you sure you really have 4 serial ports? Which kind of machine have you got?
In some case, with a beaglebone board for example, you have to enable the third and fourth serial port with a special kernel parameter. -
Hi
Often you have to add your user to the dialout group to be allowed to use itusermod -a -G dialout MY_USER_NAME
as @mrdebug asks/says
-
@mrdebug
I have only two serial ports i am connecting slot machine to my desktop computer.....need to connect from desktop to slot machine i am struggling to open the serial port please help me i have added like this -
sudo usermod -a -G dialout veera
-
in my desktop using two serial ports using right now may be in built its four i guess.....
-
@veera Make sure your user is member of dialout group
-
Also if you are having ONLY 2 serial ports why are you then
trying the /dev/ttyS4 port ???
i would giess on
/dev/ttyS0
or
/dev/ttyS1 -
i have verified with minicom slot machine cable is connected with ttyS4 so i am trying with this port
-
i have tried ttyS0 and ttyS1 also it is not able to open the serial port....
-
ok. not sure what could be wrong with your linux if you have added
yourself (your username) to dial out group and you are sure that the port exists.What linux are you using ?
-
ubuntu 16.04 LTS ,i opened serial port now if i choose the run in terminal its opening please help how to set sudo password in qt instead of choosing run in terminal directly need to open
-
@veera said in multi serial port application:
ubuntu 16.04 LTS ,i opened serial port now if i choose the run in terminal its opening please help how to set sudo password in qt instead of choosing run in terminal directly need to open
If you need the sudo password than setting yourself into dialout group did not work!
Have your rebooted your PC after you put yourself into dialout?
Hint: call
error()
when opening the serial port fails to get more information about the error.