Corndork2
Posts: 9
Joined: Tue Nov 27, 2012 4:09 pm

CAN bus on Pi

Wed Aug 07, 2013 3:50 pm

Hey everyone

Is anyone using CAN BUS on the Pi? I've got a couple USB to CAN BUS adapters connected to the Pi and am seeing them over the USB bus. I'm assuming that I will have to build a kernel with support for it. However, if anyone has already done so, would they please be kind enough to share their kernel?

I started building one, but my first attempt was not successful. I will be contuning to work on it, but would love any help or suggestions for others working with CAN on this platform

Thanks!

User avatar
Richard-TX
Posts: 1549
Joined: Tue May 28, 2013 3:24 pm
Location: North Texas

Re: CAN bus on Pi

Wed Aug 07, 2013 5:04 pm

Depending on the USB-> CAN adapter you should be able to do everything from user space and not have to touch the kernel. What does the output of lsusb look like? Who made the device?
Richard
Doing Unix since 1985.
The 9-25-2013 image of Wheezy can be found at:
http://downloads.raspberrypi.org/raspbian/images/raspbian-2013-09-27/2013-09-25-wheezy-raspbian.zip

Corndork2
Posts: 9
Joined: Tue Nov 27, 2012 4:09 pm

Re: CAN bus on Pi

Wed Aug 07, 2013 9:46 pm

Thanks very much for your reply.

Output of lsusb:

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 1ae0:0001
Bus 001 Device 005: ID 0878:1102

The bottom two devices are the USB to CAN adapters

One is a Sys-Tec Electronic USB to CAN adapter, and the other is a Axiomatic AX070501 USB to CAN adapter

I also have a Peak USB to CAN adapter I can try.

What would you suggest I do from here?

Corndork2
Posts: 9
Joined: Tue Nov 27, 2012 4:09 pm

Re: CAN bus on Pi

Thu Aug 08, 2013 6:37 pm

Well I tried building a kernel for it a couple times on a couple different systems, including a Raspberry pi, and keep getting a Kernel Panic

Kernel Panic - Not Syncing: No init found

However the modules did compile... so could those be added to /lib/modules/drivers on a working pi with the same 3.6 kernel version?

yhzyhzyhz
Posts: 1
Joined: Sat Aug 31, 2013 5:42 am

Re: CAN bus on Pi

Sat Aug 31, 2013 6:19 am

I used a stm32 micro controller as a bridge, I used a stm32f103vet6 it has a lot of port. It can be connect to RPi with SPI, I2C, or RS232.

Return to “Interfacing (DSI, CSI, I2C, etc.)”