Here is an implementation of a Qt plugin for the IXXAT USB adapter V2. The plugin should be installed in the Qt root plugin folder then it will be available in any Qt CAN example tools, like "CAN Example" (see Testing).
Tested on Windows 7.
(any support and feedback is welcome!)
- Windows (by now tested on "Windows 7")
- Qt Creator 5.13
follow these steps to install the plugin in Qt.
[These tests used the toolchain MSVC2017 64bit]
clone in C:\Qt\5.13.0\Src\qtserialbus\src\plugins\canbus
Edit the file C:\Qt\5.13.0\Src\qtserialbus\src\plugins\canbus\canbus.pro
and add ixxatcan as SUBDIRS in qtConfig(library).
Open project C:\Qt\5.13.0\Src\qtserialbus\src\plugins\canbus\ixxatcan\ixxatcan.pro
in Qt Creator and compile for Release
from C:\Qt\5.13.0\Src\qtserialbus\src\plugins\canbus\build-ixxatcan-Desktop_Qt_5_13_0_**MSVC2017_64bit**-Debug\plugins\canbus
copy qtixxatcanbus.dll and qtixxatcanbusd.pdb
to C:\Qt\5.13.0\\**msvc2017_64*\plugins\canbus
I use msys2 with mingw64. So for me installtion proccess looks like:
Clone repository in any place
- Cd into clonned repository
- Create build directory
mkdir build
and cd into itcd build
- Run qmake to generate Makefile
qmake ..
- Run make to compile plugin
make
(On windows you probably need to runmingw32-make
)
compiled dll will be in build/plugins/
Copy it to your qt folder(for me it's /share/qt5/plugins/canbus/
)
[Tested on "Window 7"] Launch the tool "CAN Example" from Qt Creator opening folder "C:\Qt\Examples\Qt-5.13.0\serialbus\can"
- Could be useful have a deploy target to copy dll and pdb files automatically in Qt folder
- Add Linux support
- Tests
Starting from the QT manual and from some google search I follow these two links.
Reading the first link, starting from a plugin in the folder C:\Qt\5.13.0\Src\qtserialbus\src\plugins\canbus
the generic..
https://doc.qt.io/qt-5/qtcanbus-backends.html
If the plugins provided by Qt are not suitable for the required target platform, a custom CAN bus plugin can be implemented. The implementation follows the standard way of implementing Qt plug-ins. The custom plugin must be deployed to $QTDIR/plugins/canbus.
plugin.json:
{
"Key": "ixxatcan"
}
http://gitlab.unique-conception.org/qt-can-2.0
See section/repository:
Qt CAN - IXXAT USB driver