0

I'm trying to connect an Arduino device to my Qt Android App. When I run it from ubuntu, first I'm not able to connect to my serial port because I need to give permissions, it's easy solved typing this on Ubuntu terminal:

sudo chmod a+rw /dev/ttyACM0

When I connect Arduino on the App running on Android Device, I'm not able to connect and I don't know what I have to do (if it's possible I would like to solve it without having to root my Android device). There is a way to give permissions inside Qt Code?

I've tried with:

mySerialPort->open(QSerialPort::ReadWrite);

And then to see the permissions:

if(mySerialPort->isWritable())
      qInfo("Is writable");
else
      qInfo("Is not writable");
if(mySerialPort->isReadable())
      qInfo("Is readable");
else
      qInfo("Is not readable");

And until I set permissions through Ubuntu terminal, I haven't got Read/Write permissions. So on my Android device, I'm not able to connect.

Any help will be very appreciated,

Thank you very much.

carles.sole.grau
  • 123
  • 1
  • 1
  • 6
  • `trying to connect an Arduino device to my Qt Android App`. Think that you first should connect your Arduino device to an Android device. Now how did you? – greenapps Feb 07 '17 at 13:46
  • I have already done it, using an OTG USB hub. Using DroidTerm I can read whatever I send with Arduino. – carles.sole.grau Feb 07 '17 at 16:10

0 Answers0