I think I'm close to getting the
PICAN (
http://skpang.co.uk/catalog/pican-canbu ... -1196.html) to work with the
mcp2515 driver on the
Model B, but cannot get
can0 to appear. Any help would be greatly appreciated!
The mc251x kernel on the PICAN page (
http://lnxpps.de/rpie/) superficially appears to work, but the kernel is missing a WIFI driver, and has a reputation for instability.
The story thus far:
I started with the
2014-01-03 Raspbian image and did not install any other packages or modules, or even expand the file system.
Code: Select all
$ uname -a
Linux raspberrypi 3.10.25+ #622 PREEMPT Fri Jan 3 18:41:00 GMT 2014 armv6l GNU/Linux
I then:
- Downloaded canmods-3.10.25+.tgz described in post "by tz1 » Mon Feb 24, 2014 8:47 pm”
Overlaid mcpupdate.tgz described in post "by tz1 » Tue Mar 11, 2014 6:41 pm”
Overlaid isotp.zip described in post "by tz1 » Tue Mar 11, 2014 7:44 pm”
Moved these into place, and chmod -R root.root:
Code: Select all
$ ls -l /lib/modules/3.10.25+/extra/
total 180
-rw-r--r-- 1 root root 23731 Feb 24 04:58 can-bcm.ko
-rw-r--r-- 1 root root 18027 Feb 24 04:58 can-dev.ko
-rw-r--r-- 1 root root 16588 Feb 24 04:58 can-gw.ko
-rw-r--r-- 1 root root 14610 Feb 24 04:58 can-raw.ko
-rw-r--r-- 1 root root 28595 Feb 24 04:58 can.ko
-rw-r--r-- 1 root root 18769 Mar 11 12:38 isotp.ko
-rw-r--r-- 1 root root 13091 Mar 11 17:15 mcp2515.ko
-rw-r--r-- 1 root root 16119 Mar 11 17:15 spi-bcm2708.ko
-rw-r--r-- 1 root root 17370 Feb 14 22:11 spi-config.ko
Executed:
Added these to the autoload module list:
Code: Select all
$ cat /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# Parameters can be specified after the module name.
snd-bcm2835
spi-bcm2708
spi-config
can
mcp2515
can-bcm
can-dev
can-gw
can-raw
isotp
Before rebooting, to minimize interactions, I removed USB devices so that the board only has fixed Ethernet, HDMI and 5V power from a 10W iPad power supply:
Code: Select all
Mar 29 06:03:14 raspberrypi kernel: [ 12.768380] bcm2708_spi bcm2708_spi.0: DMA channel 4 at address 0xf2007400 with irq 20
Mar 29 06:03:14 raspberrypi kernel: [ 12.784896] bcm2708_spi bcm2708_spi.0: DMA channel 5 at address 0xf2007500 with irq 21
Mar 29 06:03:14 raspberrypi kernel: [ 12.806249] bcm2708_spi bcm2708_spi.0: SPI Controller at 0x20204000 (irq 80)
Mar 29 06:03:14 raspberrypi kernel: [ 12.832938] bcm2708_spi bcm2708_spi.0: SPI Controller running in dma mode
Mar 29 06:03:14 raspberrypi kernel: [ 13.099516] can: controller area network core (rev 20120528 abi 9)
Mar 29 06:03:14 raspberrypi kernel: [ 13.127241] NET: Registered protocol family 29
Mar 29 06:03:14 raspberrypi kernel: [ 13.215359] CAN device driver interface
Mar 29 06:03:14 raspberrypi kernel: [ 13.338698] can: broadcast manager protocol (rev 20120528 t)
Mar 29 06:03:14 raspberrypi kernel: [ 13.501203] can: netlink gateway (rev 20130117) max_hops=1
Mar 29 06:03:14 raspberrypi kernel: [ 13.590164] can: raw protocol (rev 20120528)
Mar 29 06:03:14 raspberrypi kernel: [ 13.782641] can: isotp protocol (rev 20120528 alpha)
These appear to have loaded without problem:
Code: Select all
$ lsmod
Module Size Used by
isotp 8641 0
can_raw 6183 0
can_gw 8137 0
can_bcm 11476 0
mcp2515 6494 0
can_dev 9884 1 mcp2515
can 23591 4 isotp,can_gw,can_bcm,can_raw
spi_config 9367 0
spi_bcm2708 7488 0
snd_bcm2835 16165 0
snd_soc_bcm2708_i2s 5474 0
regmap_mmio 2806 1 snd_soc_bcm2708_i2s
snd_soc_core 131268 1 snd_soc_bcm2708_i2s
snd_compress 8076 1 snd_soc_core
regmap_i2c 1645 1 snd_soc_core
regmap_spi 1897 1 snd_soc_core
snd_pcm 81593 2 snd_bcm2835,snd_soc_core
snd_page_alloc 5156 1 snd_pcm
evdev 9419 2
snd_seq 53769 0
snd_seq_device 6473 1 snd_seq
8192cu 550816 0
snd_timer 20133 2 snd_pcm,snd_seq
leds_gpio 2059 0
led_class 3688 1 leds_gpio
snd 61291 7 snd_bcm2835,snd_soc_core,snd_timer,snd_pcm,snd_seq,snd_seq_device,snd_compress
And interrupts appear as follows:
Code: Select all
$ cat /proc/interrupts
CPU0
3: 6098 ARMCTRL BCM2708 Timer Tick
16: 0 ARMCTRL bcm2708_fb dma
20: 0 ARMCTRL bcm2708_spi.0
32: 52080 ARMCTRL dwc_otg, dwc_otg_pcd, dwc_otg_hcd:usb1
52: 0 ARMCTRL BCM2708 GPIO catchall handler
65: 7 ARMCTRL ARM Mailbox IRQ
66: 1 ARMCTRL VCHIQ doorbell
75: 1 ARMCTRL
77: 6216 ARMCTRL bcm2708_sdhci (dma)
80: 0 ARMCTRL bcm2708_spi.0
83: 20 ARMCTRL uart-pl011
84: 9204 ARMCTRL mmc0
FIQ: usb_fiq
Err: 0
And FWIW the LED on the PICAN board is on (I don't know who is using it). But
can0 is not created:
Code: Select all
$ ip link set can0 up type can bitrate 125000
Cannot find device “can0"
$ ls /dev/*can*
ls: cannot access /dev/*can*: No such file or directory
Thanks in advance!