[Interest] Serial port / Bluetooth port to Android

Murphy, Sean smurphy at walbro.com
Fri Aug 25 22:25:27 CEST 2017

I have an application that currently works on Windows that we would like to port to Android. Under Windows, the application can communicate to an external device over either a USB to Serial converter or over Bluetooth. I can accomplish both of those connections using a class that inherits from QSerialPort to accomplish the communication. This works fine on Windows since both paths show up as COM ports, which QSerialPort plays nicely with: 
  - the USB to Serial device shows up as COM24
  - the Bluetooth device shows up as COM40
So just a simple call to QSerialPort::setPortName() allows me to switch between the usb serial connection and the Bluetooth connection.

On the Android device, we really only care about connected to the external device via Bluetooth. But does this same behavior, where Bluetooth looks like a serial device, exist under Android and I can still use QSerialPort? Or do I need some other device (i.e. QBluetoothSocket)?


More information about the Interest mailing list