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. [Solved]QSerialPortInfo::availablePorts() outputting a lot of information to stdout? (linux and libudev related)

[Solved]QSerialPortInfo::availablePorts() outputting a lot of information to stdout? (linux and libudev related)

Scheduled Pinned Locked Moved General and Desktop
qserialportlinux
15 Posts 5 Posters 7.9k Views 4 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #6

    Hi,

    Same thing on kubuntu, no special output from udev. You might have some logging option turned on on your machine

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    shaveraS 1 Reply Last reply
    2
    • K Offline
      K Offline
      kuzulis
      Qt Champions 2020
      wrote on last edited by
      #7

      @Wieland ,

      This output:

      ttyS0 ... ttyS30

      also is bad. This happens only if are not used nor udev, nor sysfs.

      Anyway, need to use the latest Qt 5.4.1 release to try reproduce it.

      @shavera ,

      yes, as says @SGaist , most likely, your PC has some extended debug output configuration (in systemd ?), so, it is no Qt-specific.

      1 Reply Last reply
      2
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #8

        @kuzulis
        These devices are in /sys/class/tty. Don't know if there is actually hardware in this computer that would justify the presence of these device files but I really doubt it. I suppose Ubuntu is doing something wrong.

        1 Reply Last reply
        1
        • SGaistS SGaist

          Hi,

          Same thing on kubuntu, no special output from udev. You might have some logging option turned on on your machine

          shaveraS Offline
          shaveraS Offline
          shavera
          wrote on last edited by
          #9

          @SGaist That sounds likely, actually. I feel like I'd turned on some logging to debug some other problem eons ago, and now I couldn't possibly tell you what or where it is. But that it's not reproducing for others strikes me that it's my computer so... that's fine then.

          1 Reply Last reply
          0
          • K Offline
            K Offline
            kuzulis
            Qt Champions 2020
            wrote on last edited by
            #10

            @Wieland ,

            hmm it is strange, because this https://qt.gitorious.org/qt/qtserialport/commit/52e0a7c73dc5ac3352e4cec8ac7c9295b94eef97 patch (for Qt since 5.4.0) should solve this problem...

            ? shaveraS 2 Replies Last reply
            0
            • K kuzulis

              @Wieland ,

              hmm it is strange, because this https://qt.gitorious.org/qt/qtserialport/commit/52e0a7c73dc5ac3352e4cec8ac7c9295b94eef97 patch (for Qt since 5.4.0) should solve this problem...

              ? Offline
              ? Offline
              A Former User
              wrote on last edited by
              #11

              @kuzulis Unfortunately I don't have the expertise to debug this.

              1 Reply Last reply
              0
              • K kuzulis

                @Wieland ,

                hmm it is strange, because this https://qt.gitorious.org/qt/qtserialport/commit/52e0a7c73dc5ac3352e4cec8ac7c9295b94eef97 patch (for Qt since 5.4.0) should solve this problem...

                shaveraS Offline
                shaveraS Offline
                shavera
                wrote on last edited by
                #12

                @kuzulis

                I just upgraded my suite to 5.4.1 locally, and I still have the same issue.

                1 Reply Last reply
                0
                • K Offline
                  K Offline
                  kuzulis
                  Qt Champions 2020
                  wrote on last edited by
                  #13

                  @shavera ,

                  what issue? If you about:

                  libudev: udev_device_new_from_syspath: device 0x13daf10 has devpath '/devices/virtual/tty/tty62'

                  then it is not a QtSerialPort issue..

                  Besides, in your case QSerialPortInfo returns one valid device ttyS0:

                  ttyS0

                  that is right.

                  @Wieland ,

                  Unfortunately I don't have the expertise to debug this.

                  You can read this: http://forum.qt.io/topic/46253/solved-qserialport-error-message-qiodevice-read-device-not-open/11

                  shaveraS 1 Reply Last reply
                  1
                  • K kuzulis

                    @shavera ,

                    what issue? If you about:

                    libudev: udev_device_new_from_syspath: device 0x13daf10 has devpath '/devices/virtual/tty/tty62'

                    then it is not a QtSerialPort issue..

                    Besides, in your case QSerialPortInfo returns one valid device ttyS0:

                    ttyS0

                    that is right.

                    @Wieland ,

                    Unfortunately I don't have the expertise to debug this.

                    You can read this: http://forum.qt.io/topic/46253/solved-qserialport-error-message-qiodevice-read-device-not-open/11

                    shaveraS Offline
                    shaveraS Offline
                    shavera
                    wrote on last edited by
                    #14

                    @kuzulis
                    The problem is that it creates a lot of clutter in a terminal window if I'm running it from a terminal or if I'm debugging from a terminal with debug statements.

                    However, I didn't know if it was a thing generally observed in Qt, or if it was specific to my local machine, so I thought I'd ask on the forums to see if others have observed the behaviour. They have not, therefore it's some sort of logging on my computer whenever the serial ports are queried. Not sure exactly what, but at least now I know the problem is constrained to my workspace, and not likely to appear 'in production' as it were.

                    1 Reply Last reply
                    0
                    • vikramgV Offline
                      vikramgV Offline
                      vikramg
                      wrote on last edited by
                      #15

                      Resurrecting this ancient thread with a concrete solution in case it helps someone: I just ran into this as well; libudev debug messages were cluttering the Application Output. It turns out you don't even have to query serial ports -- the messages are emitted just by virtue of including the serialport module.

                      Like the OP, turned out that I too had turned on some logging to debug a different problem ages ago. After some hunting, I discovered that this logging had been enabled by adding the line

                      udev_log="debug"

                      in /etc/udev/udev.conf. After I commented out that line and rebooted, the libudev messages are gone!

                      1 Reply Last reply
                      2

                      • Login

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