Howto install the PEAK Linux driver on a fresh Ubuntu 11.10

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

Howto install the PEAK Linux driver on a fresh Ubuntu 11.10

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:

****************************
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
User avatar
M.Maidhof
Support
Support
 
Posts: 200
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 subversion:
sudo apt-get install subversion
- Get the SocketCAN Tools:
svn checkout svn://svn.berlios.de/socketcan/trunk/can-utils
- 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
User avatar
M.Maidhof
Support
Support
 
Posts: 200
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
User avatar
M.Maidhof
Support
Support
 
Posts: 200
Joined: Wed 22. Sep 2010, 14:00
Location: Darmstadt, Germany


Return to Linux