Results 1 to 3 of 3

Thread: doubt about QserialPortInfo

  1. #1
    Join Date
    Jun 2018
    Posts
    17
    Thanks
    4
    Qt products
    Qt5
    Platforms
    MacOS X Windows

    Default doubt about QserialPortInfo

    How can I get the name of my USB device (serial) connected to my serial port?
    thanks

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,513
    Thanks
    13
    Thanked 1,574 Times in 1,503 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: doubt about QserialPortInfo

    You cannot connect a USB device to a serial (RS232 or similar) interface. Based on your earlier question I assume that you mean you have a USB device that appears as a serial port.

    Do the various attributes of the QSerialPortInfo (manufacturer, portName, description, serialNumber) provide the "name" you are looking for?
    If not, then you are probably expecting to see information about the USB device itself, rather than the serial port it provides. The Qt library does not provide a generic USB interface, and you will have to find that either in the native operating system API or through a third-party library (e.g. libusb).

  3. #3
    Join Date
    Jun 2018
    Posts
    17
    Thanks
    4
    Qt products
    Qt5
    Platforms
    MacOS X Windows

    Default Re: doubt about QserialPortInfo

    Exactly, I want the USB device information. But I see that QSerialPortInfo provides only the information of the ports of the computer. Thanks for the information.

Similar Threads

  1. QSerialPortInfo error
    By GeneCode in forum Qt Programming
    Replies: 2
    Last Post: 13th September 2017, 18:45
  2. QSerialPortInfo - Bluetooth SPP devices
    By BrianNorman in forum Qt Programming
    Replies: 16
    Last Post: 22nd February 2016, 15:18
  3. trouble with the QSerialPortInfo::availablePorts()
    By xiongxiongchuan in forum Qt Programming
    Replies: 1
    Last Post: 22nd June 2014, 10:42
  4. Replies: 3
    Last Post: 7th October 2013, 15:58
  5. QSerialPortInfo Broken
    By RolandHughes in forum Qt Programming
    Replies: 0
    Last Post: 21st June 2013, 16:23

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.