[Interest] QtSerialBus on Android

Christian Gagneraud chgans at gmail.com
Fri Dec 13 03:28:26 CET 2019


On Fri, 13 Dec 2019 at 01:55, Denis Shienkov <denis.shienkov at gmail.com> wrote:
>
> Hi,
>
> > Yes I saw that, but same apply to QtSerialPort, i don't see why it's
> not available on Android. Android IS a Linux system, and it does have
> the tty bits.
>
> Because it requires the root right to use the serial ports in Android.
> Do you have a root rights for any device? Do you have the USB/Serial drivers for any device in a device kernel? :)
>
> You can build QSerialPort on Android manually and use it if you want.

I've just build qt for android, and i have QtSerialPort and
QtSerialBus, now just need to test it on target.
My understanding is that these 2 modules are buildable for Android,
but are not provided by default due to the 'app developer' use case as
explained by Denis.

A stock Android NDK has the kernel headers for CAN, but doesn't have
libsocketcan.
libsocketcan doesn't seem to be necessary, as per configure's output
----
Qt SerialBus:
  Socket CAN ............................. yes
  Socket CAN FD .......................... yes
----
This was on the 5.12 git branch.

And looking at the source code, it seems QtSerialPort authors took the
right decision to use low level Linux API only. Thanks for that!

Chris


More information about the Interest mailing list