0

I am working on Android project using Qt and i need to communicate between mobile phone and computer. I want to make little demo with using Putty.I want to send data mobile phone over USB cable and display on Putty to ensure communication. When i search Serial port on mobile phone const QList<QSerialPortInfo> &info = QSerialPortInfo::availablePorts(); info.count() is equal zero. Application can not find any serial port on mobile phone but i can send or receive data (drag and drop) over USB cable. How can i communicate to Android device with using Serial Port?

Thank you for answers..

  • If you can use Bluetooth or WiFi (Ethernet) then is more simple. As Marcos G. mentioned not all phones supporting USB Serial cable. – Shazter Apr 28 '21 at 18:33

2 Answers2

0

Not many mobile phones that come with a native serial port as far as I know.

If what you mean is you have a USB serial port connected to your mobile phone through an OTG cable maybe you need to take a look here. There is also an app on the Play Store based on the same code.

Marcos G.
  • 3,371
  • 2
  • 8
  • 16
0

I have discovered what i did wrong. The phone does not support OTG feature, so i could not see serial port by using qt serialport library. If anyone faces this problem, i hope this works for him/her.