QtSerialPort on Android (Qt.5.12.x)
-
Hi,
Today I was working on a little project that reads some data from a sensor by a CP210x serial/USB device.
on my ubuntu, I use ttyUSB0 to connect to my device but on the Android device it's not working and the serial port open function returns false for the operation result.
I also tried ttyUSB1,2,3,4 and no luck.
With the help of some other software looks like the device is located in /dev/bus/001/131 not in /dev/tty*.
Any idea what is wrong or what should i do? -
What's error code returned? (I suspect that is is 'permisison' error).
BTW: QSerialPort don't supported on Android. Use it on own risk.
-
Hi,
Today I was working on a little project that reads some data from a sensor by a CP210x serial/USB device.
on my ubuntu, I use ttyUSB0 to connect to my device but on the Android device it's not working and the serial port open function returns false for the operation result.
I also tried ttyUSB1,2,3,4 and no luck.
With the help of some other software looks like the device is located in /dev/bus/001/131 not in /dev/tty*.
Any idea what is wrong or what should i do?@md2012 said in QtSerialPort on Android (Qt.5.12.x):
Any idea what is wrong or what should i do?
Are you sure this hardware is supported by Android? Which version of Android you are using?
To me, it looks like Android did not recognize the hardware. -
@md2012 said in QtSerialPort on Android (Qt.5.12.x):
There is no actual error code.
There are QSerialPort::error()
With the help of some other software looks like the device is located in /dev/bus/001/131 not in /dev/tty*.
No, the serial port should be located in /dev/tty. If there are no serial port exists, this means that the Android kernel don't see that device (there are no appropriate drivers).
-
so according to this link and the evidence cp210x is not supported by the android and i need to take another approach to the matter.
Anyway, I will share the result as soon as it's done.