How to communicate with FTDI with Qt Android
-
wrote on 28 Jan 2021, 11:26 last edited by Kyeiv
Hello,
i ran through some threads here and stackoverflow, most of them was very partial info and messy, so I am asking myself. What is the best/easiest way to read/write data from/to device connected to Qt Android app by FTDI?@edit it's about FTDI via USB/serial interface
-
Hello,
i ran through some threads here and stackoverflow, most of them was very partial info and messy, so I am asking myself. What is the best/easiest way to read/write data from/to device connected to Qt Android app by FTDI?@edit it's about FTDI via USB/serial interface
wrote on 28 Jan 2021, 12:18 last edited by@Kyeiv you haven't stated what FTDI product.
Have you checked FTDI forums for assistance? -
Hello,
i ran through some threads here and stackoverflow, most of them was very partial info and messy, so I am asking myself. What is the best/easiest way to read/write data from/to device connected to Qt Android app by FTDI?@edit it's about FTDI via USB/serial interface
@Kyeiv
i assume you mean FTDI via USB/serial interface?
IIRC serial ports are only accessible in Android when the device is rooted. -
@Kyeiv
i assume you mean FTDI via USB/serial interface?
IIRC serial ports are only accessible in Android when the device is rooted.wrote on 28 Jan 2021, 12:28 last edited by@raven-worx so there's no c++ way to handle without rooting?
-
@raven-worx so there's no c++ way to handle without rooting?
@Kyeiv so is no java way without rooting either
Apparently outdated information, that I had -
@Kyeiv so is no java way without rooting either
Apparently outdated information, that I hadwrote on 28 Jan 2021, 12:31 last edited by@J-Hilk said in How to communicate with FTDI with Qt Android:
so is no java way without rooting either
Not that I have tried, but FTDI support Java example page says:
This native JAVA driver does not require the Android platform to be rooted and may be used with Android version 3.2 onwards.
so at some point a JNI approach from Qt Android app could be feasible
@Kyeiv you still haven't clarified what FTDI product you're using...
-
@J-Hilk said in How to communicate with FTDI with Qt Android:
so is no java way without rooting either
Not that I have tried, but FTDI support Java example page says:
This native JAVA driver does not require the Android platform to be rooted and may be used with Android version 3.2 onwards.
so at some point a JNI approach from Qt Android app could be feasible
@Kyeiv you still haven't clarified what FTDI product you're using...
@Pablo-J-Rogina
I'll be damned, you learn something new every day 👍 -
That API use the USB host JAVA API. It has nothing with the serial port API. ;) ... AFAIK, you can use this USB API for any USB device if you know the communication protocol trough the USB end-points for the device.
-
That API use the USB host JAVA API. It has nothing with the serial port API. ;) ... AFAIK, you can use this USB API for any USB device if you know the communication protocol trough the USB end-points for the device.
-
@kuzulis so you suggest that normal usb api will be enough? i do not see any ftdi configurations for this API.
Qt Champions 2020wrote on 8 Feb 2021, 11:10 last edited by kuzulis 2 Aug 2021, 11:10@Kyeiv ,
I think yes, because a lot time ago, a mr. Mike Goza tried to add the QtSerialPort support to android (for FTDI, CP, PL and other chips): https://codereview.qt-project.org/c/qt/qtserialport/+/83480 (but unsuccessfull). There are used the USB API, directly.
But, you can take the FTDI example provided by @Pablo-J-Rogina , if it will be simpler.