Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QSerialPort and android, permission error
Forum Updated to NodeBB v4.3 + New Features

QSerialPort and android, permission error

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 4 Posters 1.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • mrdebugM Offline
    mrdebugM Offline
    mrdebug
    wrote on last edited by
    #1

    Hi. My device has got many serial com ports. I have no problem to open the device ttyS0, when I try to open the device ttyUSB0 I obtain the error
    "ttyUSB0" Error "Permission denied"
    How can I resolve it?

    Need programmers to hire?
    www.labcsp.com
    www.denisgottardello.it
    GMT+1
    Skype: mrdebug

    1 Reply Last reply
    0
    • O Offline
      O Offline
      ovadi
      wrote on last edited by ovadi
      #2

      you have to use java to get permission. Then you can use ioctl functions on cpp side. I'm not sure that you can use QSerialPort after java part. If you can, please write here or mail to me pls.

      1 Reply Last reply
      0
      • Kent-DorfmanK Offline
        Kent-DorfmanK Offline
        Kent-Dorfman
        wrote on last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        0
        • mrdebugM Offline
          mrdebugM Offline
          mrdebug
          wrote on last edited by
          #4

          Sorry can you explain? Have I to grant permission using java code before to try to use QSerialPort or are you saying that QSerialPort does not support Android 10?

          Need programmers to hire?
          www.labcsp.com
          www.denisgottardello.it
          GMT+1
          Skype: mrdebug

          J.HilkJ 1 Reply Last reply
          0
          • mrdebugM mrdebug

            Sorry can you explain? Have I to grant permission using java code before to try to use QSerialPort or are you saying that QSerialPort does not support Android 10?

            J.HilkJ Offline
            J.HilkJ Offline
            J.Hilk
            Moderators
            wrote on last edited by
            #5

            @mrdebug said in QSerialPort and android, permission error:

            QSerialPort does not support Android 10

            it never did.

            Since you would need a rooted android device to access the port/api anyway, no-one ever bothered to make it an official supported part of the library (for Android)

            You'll have to go native c++


            Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


            Q: What's that?
            A: It's blue light.
            Q: What does it do?
            A: It turns blue.

            1 Reply Last reply
            0
            • mrdebugM Offline
              mrdebugM Offline
              mrdebug
              wrote on last edited by
              #6

              Firstly an app that wants to use serial com ports on Android, seems that has to be run with
              android:sharedUserId="android.uid.system"
              after that, the QSerialPort object requires the right usev implementation and, my device Android 10 aosp does not have it.

              Need programmers to hire?
              www.labcsp.com
              www.denisgottardello.it
              GMT+1
              Skype: mrdebug

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved