[Development] Adding 3rdpary libraries to QtSerialBus

André Hartmann aha_1980 at gmx.de
Thu Aug 11 15:28:47 CEST 2016


Hi all,

[Re-sent as I think something went wrong the first time,
the mail did not appear in the archive.]

I'm working on a new feature for QCanBus to enumerate all available CAN 
interfaces and query more information about them [0].

As it turns out, the Linux SocketCAN API allows a lot, but exactly this 
task is a bit complicated, see mailing list thread [1].

In this thread, Kurt Van Dijck proposed his network interface 
enumeration library [2], licensed under LGPL V3, which perfectly allows 
to query all SocketCAN devices. QNetworkInterface::allInterfaces() lists 
them too, but there is for now no way to find out which of them are 
SocketCAN interfaces.

Now I really don't know how to proceed. I already saw some libs like 
pcre included in the Qt source tree, but I don't know if this is 
possible with libenumif too, and which technical and legal requirements 
are needed.

The same problem may occur with libsocketcan [3] which provides more 
low-level function like CAN controller hardware reset. But this library 
is more widely used and really stable, so dynamically loading with 
QLibrary may be enough here.

Thanks for any pointers!

Best regards,
Andre

[0] https://codereview.qt-project.org/#/c/166460
[1] https://marc.info/?l=linux-can&m=147074084303882&w=2
[2] https://github.com/kurt-vd/enumif
[3] http://git.pengutronix.de/?p=tools/libsocketcan.git



More information about the Development mailing list