collin80 / SavvyCAN

QT based cross platform canbus tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PeakCAN not setting speed?

collin80 opened this issue · comments

It seems possible that the PeakCAN driver is not taking into account the set speed. 500k seems to work as that's the default but other speeds might be impossible to set. More investigation is in order. But, be warned, Peak adapters might only work at 500k speed right now.

Is there any more information on this / why it happens? I'm currently running into this issue.

Just tested on the Peak CAN Pro FD adapter.At least 500, 250, 100 kbit works fine for me.

I still haven't tested it locally. I do have a PeakCAN adapter but I always use it through socketcan on linux so I'm setting it from the command line. I'll have to try this in Windows with the normal PeakCAN driver to see what is going on.

Hmh. Is there any kind of debug log what kind of errors happen, if the configuration worked, ...?

Because it works for me on Linux through socketcan, but on Windows it seems to have problems, as my pcan adapter starts to blink red and nothing gets received.

Add New Device Connection -> Create New Connection -> Select device (!) -> Change speed to 100000 -> Save Bus Settings.
It works for me.

@rusoku did you try it with the "nightly" built?

1999da8
Do you have a apple silicon (macOS 13.5) compatible build of 1999da8?

I have compiled several versions older than this for the arm64 Apple silicon (Qt 5.15.16)
And serial bus plugin for the Rusoku TouCAN USB adapter series only.Rusoku serial bus plugin is compiled like fat file with support x64 and arm64.
I will try this compile (1999da8) version as well in my spare time.

Thanks for you help. Will that version support all QT supported CAN dongles?
Is it hard to get the GitHub action build to compile an arm64 Apple silicon version?

Qt 5.15.x doesn't have build for the arm64 Qt libraries by default.
Need to rebuild all Qt libraries and plugins before.

SavvyCAN for arm64 aka Apple silicon, commit 1999da8 version:
https://www.rusoku.com/downloads/SavvyCAN_arm64_1999da8.zip
After download need to remove file from quarantine:
xattr -cr FILE_NAME

arm64 version works much faster for me on my M1 AirBook

SavvyCAN for arm64 aka Apple silicon, commit 1999da8 version: https://www.rusoku.com/downloads/SavvyCAN_arm64_1999da8.zip After download need to remove file from quarantine: xattr -cr FILE_NAME

arm64 version works much faster for me on my M1 AirBook

Thanks for your help. The app works and I can connect to a CAN bus.
The weird part is it misses a lot of messages on a busy bus. On a 250kbit bus with 180+ messages per second I only get around 40. If I use SavvytCAN with parallels on windows I receive all messages.
The app also seems very slow on my M1-Max macBook.

I don't see any frames lost.From 500 000 I have received 100% frames with about 780 frames per second on 1Mbit bus speed and 1mS interframe space.If I decrease interframe space down 500uS I get fps speed up to 2000 without frames losses.

Sender: Kvaser Leaf, receiver: Rusoku TouCAN with QtserialBus plugin and low level USB driver compiled for arm64 Apple silicon.
Screenshot 2023-10-26 at 19 38 36

I don't see any frames lost.From 500 000 I have received 100% frames with about 780 frames per second on 1Mbit bus speed and 1mS interframe space.If I decrease interframe space down 500uS I get fps speed up to 2000 without frames losses.

Sender: Kvaser Leaf, receiver: Rusoku TouCAN with QtserialBus plugin and low level USB driver compiled for arm64 Apple silicon. Screenshot 2023-10-26 at 19 38 36

I tried again but my PCAN is not usable with this build. It looses messages.

I tried again but my PCAN is not usable with this build. It looses messages.

Does it loose all messages or just some? Because I can also report bus instabilities with SavvyCAN + Peak that I don't have when I use the PCAN-View software. Also: Do you use CAN-FD or not, because there's a great difference there in how QT setups the PCan adapter.

Does it loose all messages or just some? Because I can also report bus instabilities with SavvyCAN + Peak that I don't have when I use the PCAN-View software. Also: Do you use CAN-FD or not, because there's a great difference there in how QT setups the PCan adapter.

I only lose a part of the messages. But quite a big part on a busy bus. The same setup with SavvyCAN and PCAN on Windows works fine.
I have not tried CAN FD.

Do you use mac-can dylib for the PCAN ? Which version do you use ?

Just tested PCAN and it works too. From 100 000 sent frames (Kvaser Leaf) I received 100% with interframe space 1uS.
Same results as with TouCAN adapter.
Low level driver: Mac-can libPCBUSB.0.12.1.dylib
PC: Macbook Air M1