No such plugin:"peakcan" on Raspi
-
I have use peakcan with raspi but it not working.(Qt version 5.7.1)
According to debug output the peakcan interface also available, createDevice(…) always returns false.
I have using QT on rasberry pi should I have to change any setting?? and how can I check USB??
if(QCanBus::instance()->plugins().contains("peakcan")){ // plugin available } const QString errorString; device = QCanBus::instance()->createDevice("peakcan",QStringLiteral("usb0"),(QString*)&errorString); if(!device){ //Error handling goes here qDebug() << errorString; return; }else{ connect(device, &QCanBusDevice::framesReceived, this , &MainWindow::canreceived); device->setConfigurationParameter(QCanBusDevice::BitRateKey,500000); if(device->connectDevice() == false){ ui->label->setText(QString(" not connected")); return; } } -
but I already installed qtserialbus by using
sudo apt-get install libqt5serialbus5-devthis one, doesn't install qtserialbus plugins ??
@y-exars said in No such plugin:"peakcan" on Raspi:
doesn't install qtserialbus plugins ??
No
libqt5serialbus5-plugins does -
@ChrisW67
at debug window I got this:09:25:01: Debugging starts
&"warning: GDB: Failed to set controlling terminal: \343\203\207\343\203\220\343\202\244\343\202\271\343\201\253\345\257\276\343\201\231\343\202\213\344\270\215\351\201\251\345\210\207\343\201\252ioctl\343\201\247\343\201\231\n"
libEGL warning: DRI2: failed to authenticate
qt5ct: using qt5ct plugin
qt5ct: D-Bus global menu: no
"No such plugin: 'peakcan'"
09:25:16: Debugging has finished -
That means that you has did not installed the
peack-canplugin in yourRaspi. Maybe it is in theRaspirepository, also maybe something else. You can search for this shared library in yourRaspifile system where the Qt installed.It is a question to the Raspi maintainers.
-
Besides, to use the PEAKCAN you need to install to the
Raspithe PEAK-CAN vendor drivers and specific shared libraries downloaded from the PEAK-CAN WEB site. Are you sure that you have all these requirements? Read the documentation at first: https://doc.qt.io/qt-6/qtserialbus-peakcan-overview.htmlUPD: You can use the
socket-canplugin with the PEAK-CAN adapters, that does work by default. The PEAK-CAN adapter is detected in Linux as usual socket-can device (AFAIK). -
Besides, to use the PEAKCAN you need to install to the
Raspithe PEAK-CAN vendor drivers and specific shared libraries downloaded from the PEAK-CAN WEB site. Are you sure that you have all these requirements? Read the documentation at first: https://doc.qt.io/qt-6/qtserialbus-peakcan-overview.htmlUPD: You can use the
socket-canplugin with the PEAK-CAN adapters, that does work by default. The PEAK-CAN adapter is detected in Linux as usual socket-can device (AFAIK).@kuzulis
I already Installed Peakcan driver before. but I had wrote the below code and didn't have any return or deivces showedconst QStringList plugins = QCanBus::instance()->plugins(); for (auto plugin : plugins) { QString errorString; const QList<QCanBusDeviceInfo> devices = QCanBus::instance()->availableDevices( plugin, &errorString); if (!errorString.isEmpty()) qDebug() << plugin << errorString; for (auto device : devices) qDebug() << plugin << device.name(); } -
@y-exars said in No such plugin:"peakcan" on Raspi:
const QStringList plugins = QCanBus::instance()->plugins();
does
pluginscontainspeakcan? -
@y-exars said in No such plugin:"peakcan" on Raspi:
const QStringList plugins = QCanBus::instance()->plugins();
does
pluginscontainspeakcan? -
Well, it means that your
Raspihas not anyqtserialbusplugins installed. Maybe they are in the different packages ofRaspirepository. You need to install them. -
Well, it means that your
Raspihas not anyqtserialbusplugins installed. Maybe they are in the different packages ofRaspirepository. You need to install them. -
but I already installed qtserialbus by using
sudo apt-get install libqt5serialbus5-devthis one, doesn't install qtserialbus plugins ??
@y-exars said in No such plugin:"peakcan" on Raspi:
doesn't install qtserialbus plugins ??
No
libqt5serialbus5-plugins does