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 PermissionError

QSerialPort PermissionError

Scheduled Pinned Locked Moved Unsolved General and Desktop
qserialport perpermissionerror
3 Posts 2 Posters 1.4k Views
  • 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.
  • I Offline
    I Offline
    ingdb
    wrote on last edited by
    #1

    Hello everyone,

    we're using QSerialPort to access a FTDI USB converter on Ubuntu 16.04 LTS.
    The program is working fine when we start QtCreator in root mode.
    But in user mode but we get permission errors opening our device (resp. any COM port device).
    We added our user to the device group and we also set the access rights to 666:
    crw-rw-rw- 1 root plugdev 188, 0 Sep 28 10:59 /dev/ttyUSB0
    But still no success. Other tools (e.g. a terminal program) are working in user mode.

    Is this a Linux problem or might this be related to Qt? Any ideas would be helpful.

    best regards
    Matthias

    JonBJ 1 Reply Last reply
    0
    • I ingdb

      Hello everyone,

      we're using QSerialPort to access a FTDI USB converter on Ubuntu 16.04 LTS.
      The program is working fine when we start QtCreator in root mode.
      But in user mode but we get permission errors opening our device (resp. any COM port device).
      We added our user to the device group and we also set the access rights to 666:
      crw-rw-rw- 1 root plugdev 188, 0 Sep 28 10:59 /dev/ttyUSB0
      But still no success. Other tools (e.g. a terminal program) are working in user mode.

      Is this a Linux problem or might this be related to Qt? Any ideas would be helpful.

      best regards
      Matthias

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @ingdb
      I do not know the answer, you may get a better answer from a Qt expert here in due course. But just a heads-up if you do not: you should be able to use strace to monitor system calls made by your app and I believe in the case of opening devices that it shows the /dev device it uses and what error it gets back.

      1 Reply Last reply
      4
      • I Offline
        I Offline
        ingdb
        wrote on last edited by
        #3

        ok, that's it :-)
        With strace I found out the problem was a lock in /var/lock
        I removed this now its working.
        Thanks a lot

        1 Reply Last reply
        1

        • Login

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