Hi,
after all those offtopic posts, here some news regarding the use of the PCAN-USB with the latest RASPIAN Debian Wheezy from September 2014 (2014-09-09):
After setup the sd card, boot the system, expand the file system and connect your PI by WLAN or Ethernet to your network. Follow the following steps:
sudo apt-get update
sudo apt-get upgrade
sudo rpi-update
sudo reboot
sudo apt-get install linux-image-rpi-rpfv
sudo nano /boot/config.txt
- insert the following lines at the end of that file:
kernel=vmlinuz-3.12-1-rpi
initramfs initrd.img-3.12-1-rpi followkernel
- save the settings and call sudo reboot again.
- after the reboot uname -r will show:
3.12-1-rpi
- with that rpi kernel you could directly use the PCAN-USB with the netdev driver, ifconfig will show a can0 device:
ifconfig -a
can0 Link encap:UNSPEC Hardware Adresse 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
NOARP MTU:16 Metrik:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
Kollisionen:0 Sendewarteschlangenlänge:10
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
- set the baudrate and activate the device:
sudo ip link set can0 type can bitrate 500000
sudo ip link set can0 up
- now you can use the NetDev Tools to communicate with the PCAN-USB.
****************************************************************************************************************
- if you like to use our chardev driver instead, you have to install the kernel headers first:
sudo apt-get install linux-headers-3.12-1-rpi
- download the PEAK Linux driver:
wget
http://www.peak-system.com/fileadmin/me ... .13.tar.gz
- Install libpopt, to prevent a missing file error for the test tools:
sudo apt-get install libpopt-dev
- and unpack and install the driver:
tar -xzf peak-linux-driver-7.13.tar.gz
cd peak-linux-driver-7.13/
make clean
make NET=NO PCC=NO PCI=NO ISA=NO DNG=NO PAR=NO
sudo make install
sudo modprobe pcan
cat /proc/pcan
*------------- PEAK-System CAN interfaces (
www.peak-system.com) -------------
*------------- Release_20141017_n (7.13.0) Nov 21 2014 13:01:54 --------------
*------------------------------- [mod] [usb] --------------------------------
*--------------------- 1 interfaces @ major 247 found -----------------------
*n -type- -ndev- --base-- irq --btr- --read-- --write- --irqs-- -errors- status
32 usb -NA- ffffffff 003 0x001c 00000000 00000000 00000000 00000000 0x0000
- receive messages @500k:
cat /dev/pcan32
m s 0x00000111 8 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 93486 003
m s 0x00000111 8 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 94047 667
m s 0x00000112 8 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 95269 256
m s 0x00000112 8 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 95525 597
m s 0x00000113 8 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 96301 491
m s 0x00000113 8 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 96801 544
regards
Michael