QCanBus - List devices?
-
Hello there,
Is there a way to list connected devices using QCanBus class before creating the device? For example I could have an USB PCAN and PCI PCAN devices connected and I would likee to list them and choose which one to use. I would apreciate all help. -
Is there a way to list connected devices using QCanBus class before creating the device?
no
-
@Bremenpl: I know this thread is quite old, but since Qt 5.9 there is a function that does exactly what you were asking for: https://doc.qt.io/qt-5/qcanbus.html#availableDevices
Just wanted to mention this and I guess this thread can now be closed.
-
Hi @Bremenpl
In Qt 5.9 and 5.10 you can list the devices available. For you case, PCAN will list the interfaces as usb0 and pci0 and not give you two different devices. Look at the CANbus example in the SerialBus section. It is a simple little program that does all that for you.