collin80 / SavvyCAN

QT based cross platform canbus tool
MIT License
1k stars 278 forks source link

AppImage Linux: Qt SerialBus Devices #640

Closed nicatec closed 1 year ago

nicatec commented 1 year ago

Hello,

running the AppImage on Linux I cannot select the PeakCan USB Device. Selecting NewConnection-->Connection Type --> QT SerialBus Devices (SocketCAN ...)

I get the following error (running as normal user or root):

./SavvyCAN-x86_64.AppImage qt.canbus.plugins.peakcan: Cannot load library: Cannot load library pcanbasic: (pcanbasic: cannot open shared object file: No such file or directory)

nicatec commented 1 year ago

I got the same result with SavvyCAN-f397a50-x86_64.AppImage and SavvyCAN-01953e6-x86_64.AppImage

rusoku commented 1 year ago

You have to install PeakCan adapter library before.

Hello,

running the AppImage on Linux I cannot select the PeakCan USB Device. Selecting NewConnection-->Connection Type --> QT SerialBus Devices (SocketCAN ...)

I get the following error (running as normal user or root):

./SavvyCAN-x86_64.AppImage qt.canbus.plugins.peakcan: Cannot load library: Cannot load library pcanbasic: (pcanbasic: cannot open shared object file: No such file or directory)

rusoku commented 1 year ago

Sorry I just saw that you need to run device under Linux.Not MacOS.

You have to install PeakCan adapter library before.

rusoku commented 1 year ago

Anyway why software is trying to load pcanbasic library and peakcan plugin when you choose SocketCAN

You have to install PeakCan adapter library before.

Hello, running the AppImage on Linux I cannot select the PeakCan USB Device. Selecting NewConnection-->Connection Type --> QT SerialBus Devices (SocketCAN ...) I get the following error (running as normal user or root): ./SavvyCAN-x86_64.AppImage qt.canbus.plugins.peakcan: Cannot load library: Cannot load library pcanbasic: (pcanbasic: cannot open shared object file: No such file or directory)

nicatec commented 1 year ago

Hi rusoko, thanks for the reply. I also just noticed the socketcan info on the peak-can webpage. However, I still get a similar result when I select socketcan 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)

What does this involve:

You have to install PeakCan adapter library before.

The PeakCan adapter looks ready to go (drivers etc.): Bus 001 Device 002: ID 0c72:000c PEAK System PCAN-USB

rusoku commented 1 year ago

Seems like your socketcan plugin dynamic library is not compatiblw with main software.

rusoku commented 1 year ago

Or socketcan.so file doesn't exist or in wrong place.

nicatec commented 1 year ago

Or socketcan.so file doesn't exist or in wrong place.

In Windows, I nedded to put the PCANBasic.dll in the savvycan folder. However with the .AppImage, I can't see where I should add other files such as PCANBasic.dll or socketcan.so.

Am I somehow supposed to access and edit files in the AppImage.?

rusoku commented 1 year ago

For socketcan under Linux and pcan you don't need to have or install any additional adapter drivers.You only need the socketcan plugin (socketcan.so) in /Serialbus plugins directory

nicatec commented 1 year ago

For socketcan under Linux and pcan you don't need to have or install any additional adapter drivers.You only need the socketcan plugin (socketcan.so) in /Serialbus plugins directory

Thanks! I was on the wrong track. To get socketcan up and running, I needed to install: can-utils libsocketcan2

Then run, sudo ip link set can0 type can bitrate 125000 restart-ms 100 sudo ip link set up can0

Prior to starting savvy can.

Then run savvycan and in the "Add New Device Connection" --> QT Serial Bus --> socketcan, there is a Port "can0", indicating that the above setup is good to go!