Linux reboot PCan configuration

Windows® Compatible Software for Displaying CAN Messages
Post Reply
vasensio
Posts: 4
Joined: Wed 17. Apr 2019, 08:10

Linux reboot PCan configuration

Post by vasensio » Wed 12. Jun 2019, 10:59

Hello everybody,

I have detected a difference between PCan View on Windows and Linux, maybe you can help me to understand which is the difference and how can we avoid it.
Well, in both systems we can configure a specific configuration for PCan device:
- Clock frequency
- CAN FD or not
- Nominal bit rate
- Data bit rate
- Filter settings

Once we put this configuration, we can close the application and if we open again the application it keeps the same configuration.
However, if we reboot the OS the behavior is different because on Windows it keeps the same configuration but in Linux, this configuration is reset every time.

Can you help me with that, please? I need this configuration is keeping and doesn't change on Linux.

Best regards,

Víctor

User avatar
S.Grosjean
Software Development
Software Development
Posts: 357
Joined: Wed 4. Jul 2012, 17:02

Re: Linux reboot PCan configuration

Post by S.Grosjean » Wed 12. Jun 2019, 12:26

Hello,

When the pcan driver is (re)loaded then the bitrate settings are reset to their defaults. The pcanview application simply displays them. If you want to set a specific bitrate to a specific device, you might use the command line. For example:

Code: Select all

./pcanview -b 1M -c 80M /dev/pcanpcifd0
This command launches pcanview to watch the 1st channel of the PCAN-PCIe FD device, selecting its 80 Mhz clock and the 1Mbps bitrate (see also $ pcanview --help).

Another workaround would be to change the default bitrate of the pcan driver (see modules parameters "btr0btr1", "bitrate" and "dbitrate").

Best regards,
— Stéphane

vasensio
Posts: 4
Joined: Wed 17. Apr 2019, 08:10

Re: Linux reboot PCan configuration

Post by vasensio » Wed 12. Jun 2019, 15:03

Hello Grosjean,

Thanks for your quick answer.
I see we can change configurations like bitrate, clock, dbitrate and so on. I would like to know if we have the possibility to establish a previously "sample point" value from parameters. I haven't seen anything related to these parameters, probably you can guide me a little bit to change these specific values.

Another time, thank you very much.

Best regards,

Víctor

User avatar
S.Grosjean
Software Development
Software Development
Posts: 357
Joined: Wed 4. Jul 2012, 17:02

Re: Linux reboot PCan configuration

Post by S.Grosjean » Wed 12. Jun 2019, 16:03

Hi,

The reason is that you don't run the last version of pcanview-ncurses. Please send an e-mail to linux@peak-system.com, asking for the last version of pcanview-ncurses for linux. Please include the outputs of:

Code: Select all

$ uname -a
$ cat /etc/os-release
in the body of your email and then we will send you the corresponding debian package.

Regards,
— Stéphane

stanhausc
Posts: 3
Joined: Wed 4. May 2022, 00:36

Re: Linux reboot PCan configuration

Post by stanhausc » Wed 4. May 2022, 00:54

Hi! Can someone help me please?
How do I configure the clock?

The settings on Ubuntu:
Captura de tela de 2022-05-03 19-40-35.png
Captura de tela de 2022-05-03 19-40-35.png (41.48 KiB) Viewed 5633 times
When I try to change it with "pcanview --clock 240000" this screen opens:
pcan0.png
pcan0.png (6.34 KiB) Viewed 5633 times
pcan1.png
pcan1.png (28.31 KiB) Viewed 5633 times
The Cerbo GX settings I'm trying to communicate with Ubuntu:
pcanCERBO.png
pcanCERBO.png (11.37 KiB) Viewed 5633 times
I'm not sure but I think the communication doesn't work due to the clock!

equipment layout:
settings.png
settings.png (72.76 KiB) Viewed 5633 times
On the PCAN-USB the Can-L is connected to pin 2 and the CAN-H to pin 7
pinagem.png
pinagem.png (18.7 KiB) Viewed 5633 times
Regards,

Cristian

M.Maidhof
Support
Support
Posts: 1751
Joined: Wed 22. Sep 2010, 14:00

Re: Linux reboot PCan configuration

Post by M.Maidhof » Wed 4. May 2022, 09:42

Hi,

first of all, please don't post your issue in an existing thread, please use a new topic next time!

To use pcanview for Linux your have to install the peak-linux-driver in chardev mode, with the kernel SocketCAN driver it is not possible to use pcanview. Please see all details here:

http://www.peak-system.com/fileadmin/me ... /index.htm

regards

Michael

stanhausc
Posts: 3
Joined: Wed 4. May 2022, 00:36

Re: Linux reboot PCan configuration

Post by stanhausc » Wed 4. May 2022, 22:54

Hi, sorry for posting in the wrong place.

But is it possible to change the PCAN-USB clock?

The option to change does not appear in the PC-VIEW software
pcanview.png
pcanview.png (112.35 KiB) Viewed 5618 times
I tried to communicate from windows - Cerbo GX (I couldn't install the driver on Linux)

M.Maidhof
Support
Support
Posts: 1751
Joined: Wed 22. Sep 2010, 14:00

Re: Linux reboot PCan configuration

Post by M.Maidhof » Thu 5. May 2022, 09:07

Hi,

setting the clock frequency is only possible with CAN FD devices (PCAN-USB FD, PCAN-USB-Pro FD, PCAN-PCIe FD, etc.), the PCAN-USB for CAN 2.0 has a fixed clock frequency of 8Mhz.

regards

Michael

Post Reply