what is mean this command?

This forum covers PCAN-Linux and Linux development issues concerning our products
Post Reply
jungcy37
Posts: 5
Joined: Fri 13. Mar 2020, 03:56

what is mean this command?

Post by jungcy37 » Thu 26. Mar 2020, 01:32

그림1.png
그림1.png (72.38 KiB) Viewed 6515 times
Q1. I checked the CAN device is initialized, but there are no response of 'peak_usb'.

when I find device through command 'ls /dev/pcan*', there are severa devices are exist.

also, I think, Linux example 'pcanread', 'pcanwrite' are worked.

is it okay without module 'peak_usb'?


Q2. in Linux PCANBasic API, there are JNI. Installation process are also contain in 'readmr.txt'. but I can't installation JNI properly because there are error during process. so i use is without install JNI but actually 'pcanread and pcanwrite' are worked. is is okay? what is role of JNI?

jungcy37
Posts: 5
Joined: Fri 13. Mar 2020, 03:56

Re: what is mean this command?

Post by jungcy37 » Thu 26. Mar 2020, 01:41

in Q2, terminal error are is
Screenshot from 2020-03-26 09-39-16.png
Screenshot from 2020-03-26 09-39-16.png (79.5 KiB) Viewed 6513 times

M.Heidemann
Sales & Support
Sales & Support
Posts: 1083
Joined: Fri 20. Sep 2019, 13:31

Re: what is mean this command?

Post by M.Heidemann » Thu 26. Mar 2020, 09:24

Hello,

To use PCANBasic you need to install the CharDev-version of our driver, which is part of our driver package, which you can download here:

http://www.peak-system.com/fileadmin/me ... 0.0.tar.gz


Take a look at the driver-documentation for an description on how to install the Char-Dev version of our driver:

http://www.peak-system.com/fileadmin/me ... an_eng.pdf

Here a little step by step guide to install the chardev-version of the driver:

1. Extract the driver package, if you haven't already:

Code: Select all

tar -xzf peak-linux-driver-8.10.0.tar.gz
Change into the driver directory:

Code: Select all

cd peak-linux-driver-8.10.0
Execute:

Code: Select all

make clean
Build the driver by executing (Note the parameters, take a look at the documentation(chapter 3.1), it will describe the usage of them):

Code: Select all

make PCC=NO ISA=NO DNG=NO
Install the driver by executing:

Code: Select all

sudo make install
Load the driver by exectuing:

Code: Select all

sudo modprobe pcan
Now ou can list your devices by executing:

Code: Select all

cat /proc/pcan
This should show all the connected PCAN-Devices

The installation of the CharDev-version of our driver is required to use PCANBasic.


'peak_usb' is the name of the PCAN-USB device if you use the mainline-driver, which is not compatible with PCANBasic:

If there is not PCAN-USB present on your machine 'peak_usb' will not show up.

'peak_usb' is just one device type, depending on which hardware you use, different hardwaretypes will be listed.


Once you have the CharDev-version of the driver installed:

Also: You have been trying to build a Java based PCANBasic application, make sure you have the OpenJDK Development Kit (JDK) installed on your machine.

The error message you see while building is telling you that it is missing dependencies to build the application.

The examples included (pcanwrite / pcanread) will work as a result that they are written in C++ or Python, depending on which one your have tried.

The file extension gives you a clue to which language is used.

The JNI-files are so called Java Native Interfaces, which enable Java code running in a Java virtual machine (JVM) to call and be called by native applications.

If you want to use Java as a basis for your own application, then you will need them. If you want to use the PCANBasic API with another language, these files are not relevant to you.


Maybe you tell us, what you want to do with PCANBasic so we can give you a tip on how to start?


Best Regards


Marvin
---
Marvin Heidemann
PEAK-Support Team

jungcy37
Posts: 5
Joined: Fri 13. Mar 2020, 03:56

Re: what is mean this command?

Post by jungcy37 » Fri 27. Mar 2020, 08:20

thank for your reply.

we are engineers of startup company in Korea.

we want using CAN comm between PC to VESC(vedder electric speed controller, ecu) to set RPM, duty or else for real time control.

if you had proper tool or skill how to make CAN camm with ESC, pls give me that.

thank you

M.Heidemann
Sales & Support
Sales & Support
Posts: 1083
Joined: Fri 20. Sep 2019, 13:31

Re: what is mean this command?

Post by M.Heidemann » Fri 27. Mar 2020, 10:26

Hello,

Unfortunately we do not have any experience with VESC.

If this device uses CAN/CAN FD you can use our tools to communicate with the device.

Which messages need to be sent and how to interpretate the incoming messages is something we cannot answer, you may want to contact the manufacturer of the VESC for this information.

Best Regards

Marvin
---
Marvin Heidemann
PEAK-Support Team

pablo_chen
Posts: 5
Joined: Thu 9. Apr 2020, 08:20

Re: what is mean this command?

Post by pablo_chen » Fri 10. Apr 2020, 07:04

Code: Select all

grep PEAK_ /boot/config-`uname -r`
CONFIG_CAN_PEAK_PCIEFD=m
CONFIG_CAN_PEAK_PCMCIA=m
CONFIG_CAN_PEAK_PCI=m
CONFIG_CAN_PEAK_PCIEC=y
CONFIG_CAN_PEAK_USB=m

Code: Select all

lsmod | grep ^peak
peak_usb               45056  0
when I entered that command and got those response, is that mean i don't need setup the driver any more?

M.Heidemann
Sales & Support
Sales & Support
Posts: 1083
Joined: Fri 20. Sep 2019, 13:31

Re: what is mean this command?

Post by M.Heidemann » Tue 14. Apr 2020, 08:14

Hello,

This means that a PCAN-USB is present on your system and was recognized by the driver.

This means you have the mainline-driver running.

You can use SocketCAN and the CAN-utils by setting up the device via:

Code: Select all

sudo ip link set can0 up type can bitrate 500000
Now you can use it with the CAN-Utilities (If installed) like candump, cansend etc:

Code: Select all

candump can0
Please refer to the SocketCan Documentation here:

https://www.kernel.org/doc/Documentatio ... ng/can.txt

And the documentation for our Linux-Driver-Package here:

https://www.kernel.org/doc/Documentatio ... ng/can.txt

Furthermore the CAN-Utils are described here:

https://github.com/linux-can/can-utils/ ... /README.md

Even more information can be found in the man-pages for the individual tools.

Note: Please don't open a new thread for the same issue if there is a post already, and if you do, please delete the post. You just received the same answer in two different places, this effectively doubles the work on a single issue. Thanks for understanding.

Best Regards

Marvin
---
Marvin Heidemann
PEAK-Support Team

Post Reply