Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QT Serial port communication for Android
gokulmaha last edited by
Hi there, I am working on a cross-platform application which is about getting a data(commonly weight) from precision balance and to display it on the connected (target)device.
FOR Windows PC
Using <QtSerialport> I can get the list of connected ports and I am able to get the data.
The same code is not working
How to access the port
Is there any 3rd party library available?
Note: Connection is done with RS232 to USB for PC(windows)
RS232 to OTG for mobile devices.
Avtansh Sharma last edited by Avtansh Sharma
@gokulmaha Can you please elaborate your problem.
I am not getting it.
It would be best if you can provide some of the code snippet
Are you able to make build file for Android.? Or you are able to build it but the code is not working on Android?
tomasz3dk last edited by tomasz3dk
AFAIK QSerialPort requires root, so probably it doesn't work because you don't have root permissions on your android device.
@tomasz3dk Do you mean QSerialPort requires root on Android? Because on Linux you don't have to be root to use QSerialPort if you set up access rights for the serial device properly.
tomasz3dk last edited by
Yes it requires root on Android (look here) probably it's the same problem, and yes you don't have to be root on Linux, if you have access rights to serial device as normal user.