opening of serial port
-
@jsulm
where am I lacking I don't understand.
Or maybe this is the problem in MOXA port. -
@Nimika
That's wrong:serial.open(QIODevice::ReadWrite); qDebug() << "port connected"; qDebug() << serial.open(QIODevice::ReadWrite);
do it like this (do not call open twice!):
qDebug() << "port connected"; qDebug() << serial.open(QIODevice::ReadWrite);
-
@Nimika If it still not able to open the connection then check all the connection parameters you're specifying.
-
Ok but still it is not working when I am using the single open function.
-
@Nimika
Hi are you 100% sure about portname ?
serial.setPortName("ttyM");
I would expect a number ttyM0 -
@mrjj
Oh sorry by mistake I have written that but I am using ttyM0 only. -
@Nimika
Ok. Just checking.Did you try with minicom or any other serial programs if it will open it ?
-
@mrjj
Its not working with any case. -
Well if minicom or friends dont like it either, my guess would be
Its brand new, you never gave anyone (user) permissions to ttyMX
its a monday one and broken :)
-
-
@Nimika "made on Monday" :-)
Usually people are not fully operable on Monday after weekend and do more mistakes and produce more broken products :-) -
@jsulm
Lol!
but I think I am nowhere lacking in this regard. -
Hi,
Looks like you're on linux, wouldn't that be
/dev/ttyM0
?One other thing: do you have the rights to access the serial port ?
-
Hello all thank you for your replies.
I sorted out my problem, its there in installation.
Now all ports are working fine.@SGaist
Yeah I have used /dev/ttyM0 only.
Thank you!