Hi Oliver,

Thanks a lot for your ideas. Reading again the documentation help me a lot to understand better what I need to do. Now I'm struggling with the creation of a vcan, because the iproute that I have in my embedded linux distribution doesn't bring me the possibility to use the add option; typing 'ip link help' I just got
Usage: ip link set DEVICE { up | down |
                             arp { on | off } |
                             dynamic { on | off } |
                             multicast { on | off } |
                             allmulticast { on | off } |
                             promisc { on | off } |
                             trailers { on | off } |
                             txqueuelen PACKETS |
                             name NEWNAME |
                             address LLADDR | broadcast LLADDR |
                             mtu MTU }
       ip link show [ DEVICE ]

If you have any idea on how can I make the netdevice (an alternative way) will be great.

Another question. I'm thinking in cross compile the can-utils to used them in my ARM processor board, do you have any suggestion about it?

Best regards.

Jorge Castro

On 08/27/2010 11:40 AM, Oliver Hartkopp wrote:
On 26.08.2010 23:26, Jorge A. Castro wrote:
Hi,
Hi Jorge,

I'm dealing with an embedded system and trying to implement the CAN bus
for communication with some different modules. In the kernel
configuration, I'm able to enable the CAN bus subsystem support and some
CAN device drivers like the Virtual Local CAN Interface (vcan).
Have you already created your own vcan0, vcan1, etc. netdevices?
(see Documentation/networking/can.txt)

I
understand I can use CAN as chardev or netdev
The CAN subsystem of the Linux Kernel supports the netdevice driver model.

, but I can't see any
interface of those available in the system.
Best is to create some vcan devices to check if everything works.

They should appear in

    cat /proc/net/dev

then.

Any ideas on what I need to do in order to use the CAN bus?
See above. You can try out the tools in the SocketCAN SVN

http://developer.berlios.de/svn/?group_id=6475

E.g. candump, cansend, cangen and friends should be able to guide you through
the first steps ...

My target is an ARM-57TS-LPC3250 board from Future Design Inc. and I'm
running Linux 2.6.27 on it. When I boot the system I got this:

TCP cubic registered
NET: Registered protocol family 17
/can: controller area network core (rev 20071116 abi 8)/
NET: Registered protocol family 29
/can: raw protocol (rev 20071116)
can: broadcast manager protocol (rev 20080415)/
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
VFP support v0.3: implementor 41 architecture 1 part 10 variant 9 rev 1
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
IP-Config: Guessing netmask 255.255.255.0

where I can see some CAN configuration in it.
This is only the networklayer stuff - that fine, but there's no CAN
networkdriver that provides a can0, can1, vcan0, ... interfaces.

In my host machine I have
a PCAN-PCI card from Peak Systems to communicate with the target and
check this bus functioning.
You can either use the PEAK driver (with netdev support) which would create
can0 and can1 netdevices for you. Please read the PEAK documentation - there's
also some information about the CAN netdevices.

Or you may take the peak_pci driver which is in the SocketCAN SVN sources.
The latter supports the the netlink configuration interface - but AFAIK only
for newer kernels.

Regards,
Oliver



--
Jorge A. Castro
Canam-Technology, Inc.

_______________________________________________
Socketcan-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-users

Reply via email to