Howto install the PEAK Linux driver on a fresh Ubuntu

This forum covers PCAN-Linux and Linux development issues concerning our products

Howto install the PEAK Linux driver on a fresh Ubuntu

Postby M.Maidhof » Tue 21. Feb 2012, 13:05

Hi,

here is an info on howto install our peak-linux-driver-7.4 on a fresh installed Ubuntu 11.10 (same for 12.04, 12.10, 13.04, please use latest 7.x driver):

****************************
CHARDEV interface:
****************************

- download the driver peak-linux-driver-7.4.tar.gz from our linux website and copy it into your home directory.

- Install libpopt-dev: sudo apt-get install libpopt-dev
- Install g++: sudo apt-get install g++
(only necessary to build the test tool transmittest)

- unpack the driver: tar -xzf peak-linux-driver-7.4.tar.gz
- cd peak-linux-driver-7.4
- make clean
- make NET=NO
- sudo make install
- sudo modprobe pcan
- check with cat /proc/pcan that the driver was successfully installed.

*------------ PEAK-Systems CAN interfaces (http://www.peak-system.com) -------------
*-------------------------- Release_20110912_n (7.4.0) ----------------------
*---------------- [mod] [isa] [pci] [dng] [par] [usb] [pcc] -----------------
*--------------------- 1 interfaces @ major 250 found -----------------------
*n -type- ndev --base-- irq --btr- --read-- --write- --irqs-- -errors- status
32 usb -NA- 30520000 255 0x001c 00000000 00000000 00000000 00000000 0x0000

now you can use the chardev tools in the /test directory or use cat /dev/pcan32 to see the messages in the console.

- to change the baudrate to 250k and enable extended IDs use:
echo "i 0x011C e" > /dev/pcan32

best regards

Michael
M.Maidhof
Support
Support
 
Posts: 355
Joined: Wed 22. Sep 2010, 14:00
Location: Darmstadt, Germany

Re: Howto install the PEAK Linux driver on a fresh Ubuntu 11

Postby M.Maidhof » Wed 22. Feb 2012, 12:33

Hi,

here now the same for the NetDev Interface:

*************************
NETDEV interface:
*************************

- download the driver peak-linux-driver-7.4.tar.gz from our linux website and copy it into your home directory.

- Install libpopt-dev: sudo apt-get install libpopt-dev
- Install g++: sudo apt-get install g++
(only necessary to build the chardev test tool transmittest)

- unpack the driver: tar -xzf peak-linux-driver-7.4.tar.gz
- cd peak-linux-driver-7.4
- make clean
- make
- sudo make install
- sudo modprobe pcan
- check with cat /proc/pcan that the driver was successfully installed.

*------------ PEAK-Systems CAN interfaces (http://www.peak-system.com) -------------
*-------------------------- Release_20110912_n (7.4.0) ----------------------
*------------- [mod] [isa] [pci] [dng] [par] [usb] [pcc] [net] --------------
*--------------------- 1 interfaces @ major 250 found -----------------------
*n -type- ndev --base-- irq --btr- --read-- --write- --irqs-- -errors- status
32 usb can0 30520000 255 0x001c 00000000 00000000 00000000 00000000 0x0000

Now we are ready to install the SocketCAN Tools:

- goto home directory again:
cd
- Install git:
sudo apt-get install git
- Get the SocketCAN Tools:
git clone git://gitorious.org/linux-can/can-utils.git
- build and install the tools:
cd can-utils
make
sudo make install

Set the network up:
sudo ifconfig can0 up

Test the communication with candump:
candump can0

-available tools are:
candump
cangen
cansend
canbusload
canecho
canlogserver
cansniffer
canfdtest
canplayer

to change the baudrate use the echo call, as written in the first post with chardev driver.

regards

Michael
M.Maidhof
Support
Support
 
Posts: 355
Joined: Wed 22. Sep 2010, 14:00
Location: Darmstadt, Germany

Re: Howto install the PEAK Linux driver on a fresh Ubuntu 11

Postby vagnusde67 » Fri 3. Aug 2012, 17:05

Hi Micheal, I compiled and installed usb pcan 7.7 running under ubuntu 12.04
This is the ouput of cat /proc/pcan



*------------- PEAK-System CAN interfaces (www.peak-system.com) -------------
*-------------------------- Release_20120726_n (7.7.0) ----------------------
*------------- [dbg] [mod] [isa] [pci] [dng] [par] [usb] [pcc] --------------
*--------------------- 1 interfaces @ major 249 found -----------------------
*n -type- ndev --base-- irq --btr- --read-- --write- --irqs-- -errors- status
32 usb -NA- ffffffff 255 0x001c 0000001c 00000034 0000007b 0000001c 0x0008

What puzzles me is the base address.
is it correct?
vagnusde67
 
Posts: 4
Joined: Fri 3. Aug 2012, 14:34

Re: Howto install the PEAK Linux driver on a fresh Ubuntu 11

Postby M.Maidhof » Mon 6. Aug 2012, 13:53

Hi,

yes this is correct, USB does not use a baseaddress or IRQ. So those two parameters are used to display SerNo and DeviceNumber of the USB device.

regards

Michael
M.Maidhof
Support
Support
 
Posts: 355
Joined: Wed 22. Sep 2010, 14:00
Location: Darmstadt, Germany

Re: Howto install the PEAK Linux driver on a fresh Ubuntu

Postby aljosa_fer » Mon 3. Mar 2014, 22:17

*------------- PEAK-System CAN interfaces (www.peak-system.com) -------------
*------------- Release_20130814_n (7.9.0) Mar 3 2014 21:07:51 --------------
*---------------- [mod] [isa] [pci] [dng] [par] [usb] [pcc] -----------------
*--------------------- 0 interfaces @ major 250 found -----------------------
*n -type- ndev --base-- irq --btr- --read-- --write- --irqs-- -errors- status

is this ok why is 0 interfaces, maybe i dont have usb pcan connected ?
Thanks
aljosa_fer
 
Posts: 1
Joined: Thu 27. Feb 2014, 23:42

Re: Howto install the PEAK Linux driver on a fresh Ubuntu

Postby U.Wilhelm » Tue 4. Mar 2014, 10:13

when you do not have connected or plugged in a PEAK CAN card / adapter, the driver could not find one.
--------------------------------
PEAK-System Technik
Technical Support Team
support@peak-system.com
-------------------------------
U.Wilhelm
Sales & Support
Sales & Support
 
Posts: 377
Joined: Fri 10. Sep 2010, 19:34
Location: Darmstadt

Re: Howto install the PEAK Linux driver on a fresh Ubuntu

Postby mccabehm » Tue 1. Jul 2014, 22:23

Any complications when running Ubuntu 10.04 (Lucid, Linux version 2.6.32-38-generic) within VirtualBox? I always see "0 interfaces @ major 249 found" in /proc/pcan. The CAN/USB interface is physically attached. I have the USB device forwarded to the virtual machine. Using peak-linux-driver-7.11 as network device.

Harold
mccabehm
 
Posts: 2
Joined: Tue 1. Jul 2014, 22:12

Re: Howto install the PEAK Linux driver on a fresh Ubuntu

Postby mccabehm » Tue 1. Jul 2014, 23:55

I get around this problem when I run Ubuntu outside of VM. No further action required. Thanks,

Harold
mccabehm
 
Posts: 2
Joined: Tue 1. Jul 2014, 22:12

Re: Howto install the PEAK Linux driver on a fresh Ubuntu

Postby M.Maidhof » Wed 2. Jul 2014, 13:30

Hi,

looks like a VM problem, please check that the VM extensions are installed on your VM client. But this issue is not related to our linux driver or hardware, it is a support issue of VirtualBox.

regards

Michael
M.Maidhof
Support
Support
 
Posts: 355
Joined: Wed 22. Sep 2010, 14:00
Location: Darmstadt, Germany


Return to Linux