SocketCAN - Cannot load library
-
Hi ,
I am learning using Openstlinux-eglfs on embedded device.
In my device I turned on the CAN socked in device tree, and socket can0 is available in device:can0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 UP RUNNING NOARP MTU:16 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:10 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:60
Now I would like to access to can0 using qt libraries and, so I try run below example :
if (QCanBus::instance()->plugins().contains(QStringLiteral("socketcan"))) { QString errorString; QCanBusDevice *device = QCanBus::instance()->createDevice(QStringLiteral("socketcan"), QStringLiteral("can0"), &errorString); if (!device) qDebug() << device; else device->setConfigurationParameter(QCanBusDevice::BitRateKey, 1000000); device->connectDevice(); } else qDebug() << "Plugin are not available";
But when I deploy my app I get errors:
qt.canbus.plugins.socketcan: Cannot load library socketcan: (socketcan: cannot open shared object file: No such file or directory)
qt.canbus.plugins.socketcan: Cannot load library libsocketcan, some functionality will not be available.
Cannot load library socketcan: (socketcan: cannot open shared object file: No such file or directory)
qt.canbus.plugins.socketcan: Function can_set_bitrate() is not available.
qt.canbus.plugins.socketcan: Cannot apply parameter: 4 with value: 1000000Any idea what can be wrong ?
-
@Damian7546
Cannot load library libsocketcan, some functionality will not be available
https://forum.qt.io/post/692971Did you try read/write on the canbus? I remember seeing this issue and it still worked and was able to do everything I wanted to on the CANbus.
Read/write OK. Worked.
?
-