Open OckyKristanto-TomTom opened 1 year ago
Dear @OckyKristanto-TomTom,
to help you, we need more information.
errorString
contain when the availableDevices()
call fails?QCoreApplication
:
#include <QLoggingCategory>
...
QLoggingCategory::setFilterRules("qt.canbus* = true");
Then you should see the output in the Terminal or in QtCreator. Please post it here.
Hi @andre-hartmann , just today I found the solution into it.
Indeed in the errorString
, it is mentioned that Qt can't find pcanbasic
in any library locations.
This command solves the issue:
sudo ln -s libPCBUSB.0.11.2.dylib pcanbasic.dylib
Maybe it is worth to be added into install.sh
?
This command solves the issue:
sudo ln -s libPCBUSB.0.11.2.dylib pcanbasic.dylib
Maybe it is worth to be added into
install.sh
?
The name of the library is libPCBUSB
. "PCAN" and "PCANBasic" are registered word marks of company PEAK-System Technik GmbH, Darmstadt.
If the symbolic link pcanbasic.dylib
is a required for use with the Qt Serial Bus API, I can write a note in the installation instructions. @andre-hartmann Is this a prerequisite for working with the Qt Serial Bus API?
The name of the library is libPCBUSB.
Which is what I expected:
#ifdef Q_OS_MACOS
pcanLibrary->setFileName(QStringLiteral("PCBUSB"));
#else
pcanLibrary->setFileName(QStringLiteral("pcanbasic"));
#endif
is the code in https://code.qt.io/cgit/qt/qtserialbus.git/tree/src/plugins/canbus/peakcan/peakcan_symbols_p.h?h=6.4#n325
So what we originaly demanded was the unversioned name PCBUSB
. Maybe that broke with MacOS on ARM CPUs, i.e. Q_OS_MACOS is no longer valid? Will need to check.
@OckyKristanto-TomTom
Please tell us, which Qt version that is. Also, did you build Qt from source or did you download the binaries? Thanks!
I used Qt5.12.6
. Download the binaries (installer)
Do you know in which Qt version does the fix being introduced?
Once we know the version, then maybe we can write in the note that for Qt Version < <fixed-version>
extra linkage is needed.
Well, its getting complicated here.
Official support for PCBUSB 0.8 was added in Qt 5.14.0, and this support continues until now with the Qt 6 series.
Unfortunately, PCBUSB 0.9 changed the binary format of some API calls, and therefore we don't have official support from Qt side yet. I have a Qt patch ready for testing [1], but there is currently no review progress. Any help (especially testing) in that regard is welcome.
[1] https://codereview.qt-project.org/c/qt/qtserialbus/+/381442
PeakCanUSB is not scanned under QtCanBus PeakCan Plugin
Steps to reproduce: