PDA

View Full Version : doubt about QserialPortInfo



Eduardo Huerta
6th January 2019, 01:00
How can I get the name of my USB device (serial) connected to my serial port?
thanks

ChrisW67
6th January 2019, 07:24
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).

Eduardo Huerta
6th January 2019, 20:37
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.