Unsolved QCanBus - List devices?
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.
kuzulis Qt Champions 2020 last edited by
Is there a way to list connected devices using QCanBus class before creating the device?
aha_1980 Lifetime Qt Champion last edited by
@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.
Buckwheat last edited by
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.