Hello
I'm having a problem using the peak-driver with my raspberries. They initialize unpredictable.
Is it ok to capture this thread? Its all raspberry-related....
Compilation and loading the driver is mastered:
---
pi@raspberrypi ~ $ uname -a
Linux raspberrypi 3.12.23+ #3 PREEMPT Sat Jul 26 09:42:32 UTC 2014 armv6l GNU/Linux
pi@raspberrypi ~ $ cat /proc/pcan
*------------- PEAK-System CAN interfaces (
www.peak-system.com) -------------
*------------- Release_20140430_n (7.11.0) Jul 26 2014 10:05:06 --------------
*---------------------------- [mod] [usb] [net] -----------------------------
*--------------------- 1 interfaces @ major 248 found -----------------------
*n -type- ndev --base-- irq --btr- --read-- --write- --irqs-- -errors- status
32 usb can0 ffffffff 255 0x031c 00000000 00000000 00000000 00000000 0x0000
---
This works correctly after every reboot.
The PCAN Dongle is connect to another PCAN Dongle connected to a PC which sends messages all the time.
Im using libSocketCAN which I start with the following script.
---
#!/bin/bash
#start moduls
sudo modprobe can
sudo modprobe can-dev
sudo modprobe can-raw
sudo modprobe can-bcm
#setup the can interface
sudo ip link set up can0
#set baudrate
echo "i 0x031C e" > /dev/pcan32 #125k
---
Sometimes I get a connection after reboot, sometimes I have to close and reopen the connection from the PC-side to get a working connection, sometimes Im not able to figure out what is going wrong and nothing is received.
If the connection is working once there are no further problems, everything seems to be transferred.
Do you have a hint for me how I can solve this?
Thanks and greetings
Klaus