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. Opening a unique serial device

Opening a unique serial device

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 255 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.
  • V Offline
    V Offline
    viniltc
    wrote on last edited by viniltc
    #1

    Hi all,

    I am opening a FTDI based serial device by passing the port name every time as follows:

    serial->setPortName("com5")
    

    I looking for automatic port identification by making use of device serial number.
    Can you give me an example of using QSerialPortInfo for automatic port identification?

    jsulmJ 1 Reply Last reply
    0
    • V viniltc

      Hi all,

      I am opening a FTDI based serial device by passing the port name every time as follows:

      serial->setPortName("com5")
      

      I looking for automatic port identification by making use of device serial number.
      Can you give me an example of using QSerialPortInfo for automatic port identification?

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

      @viniltc Simply call https://doc.qt.io/qt-5/qserialportinfo.html#availablePorts and then iterate over the list it returns and check https://doc.qt.io/qt-5/qserialportinfo.html#serialNumber

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

      1 Reply Last reply
      4
      • V Offline
        V Offline
        viniltc
        wrote on last edited by
        #3

        Thank you @jsulm , that's fixed.

        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