Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QT Serial port communication for Android
Forum Updated to NodeBB v4.3 + New Features

QT Serial port communication for Android

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
5 Posts 4 Posters 2.2k 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.
  • G Offline
    G Offline
    gokulmaha
    wrote on last edited by
    #1

    Hi there, I am working on a cross-platform application which is about getting a data(commonly weight) from precision balance and to display it on the connected (target)device.

    FOR Windows PC
    Using <QtSerialport> I can get the list of connected ports and I am able to get the data.

    FOR Android

    • The same code is not working

    • How to access the port

    • Is there any 3rd party library available?

    Note: Connection is done with RS232 to USB for PC(windows)
    RS232 to OTG for mobile devices.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      Avtansh Sharma
      wrote on last edited by Avtansh Sharma
      #2

      @gokulmaha Can you please elaborate your problem.

      I am not getting it.
      It would be best if you can provide some of the code snippet

      Are you able to make build file for Android.? Or you are able to build it but the code is not working on Android?

      1 Reply Last reply
      0
      • tomasz3dkT Offline
        tomasz3dkT Offline
        tomasz3dk
        wrote on last edited by tomasz3dk
        #3

        AFAIK QSerialPort requires root, so probably it doesn't work because you don't have root permissions on your android device.

        jsulmJ 1 Reply Last reply
        0
        • tomasz3dkT tomasz3dk

          AFAIK QSerialPort requires root, so probably it doesn't work because you don't have root permissions on your android device.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @tomasz3dk Do you mean QSerialPort requires root on Android? Because on Linux you don't have to be root to use QSerialPort if you set up access rights for the serial device properly.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • tomasz3dkT Offline
            tomasz3dkT Offline
            tomasz3dk
            wrote on last edited by
            #5

            Yes it requires root on Android (look here) probably it's the same problem, and yes you don't have to be root on Linux, if you have access rights to serial device as normal user.

            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