Hi Alexandre,

Alexandre Vézina wrote:
> On Sat, Apr 10, 2010 at 12:18 PM, Wolfgang Grandegger 
> <[email protected]>wrote:
> 
>> Hi Alexandre,
>>
> 
> Hi Wolfgang
> 
> 
>> Alexandre Vézina wrote:
>>> On Tue, Apr 6, 2010 at 12:23 PM, Oliver Hartkopp <[email protected]
>>> wrote:
>>>
>>>> Lei Luo wrote:
>>>>
>>>>>>> I am a newbie of socketcan, I compiled and installed it in the
>>>>> direction of http://dave.limoilux.org/trac/wiki/UseSocketCAN   There
>> are
>>>>> two mcp2510 can  controllers in my arm at91rm9200 board.
>>>>>>> It failed when run "can_setup start", saying that "cannot creat
>>>>> /sys/class/net/can0".
>>>>>> If you look in SocketCAN's makefile, did you uncomment export
>>>>> CONFIG_CAN_MCP251X=m?
>>>>>> You will also need to uncomment export CONFIG_CAN_DEV_SYSFS=y which is
>>>>> legacy.
>>>> Yep!
>>>>
>>>>> Yes, I have done it. I used the newest source code from the svn server
>>>>> and patched it manually. Configration is as follows:
>>>>> CONFIG_CAN=y;
>>>>> CONFIG_CAN_RAW=y;
>>>>> CONFIG_CAN_BCM=y;
>>>>> CONFIG_CAN_GW=y;
>>>>> CONFIG_CAN_ISOTP=y;
>>>>>
>>>>> CONFIG_CAN_VCAN=y;
>>>>> CONFIG_CAN_DEV=y;
>>>>> CONFIG_CAN_CALC_BITTIMING=y;
>>>>> CONFIG_CAN_MCP251X=y;
>>>>>
>>>>>>> Then I use "ip link add type vcan" to create the a vcan interface.
>>>>> But cmd "add" is not recognised, ip tool is the newest one which is
>>>>> compiled with iproute2-2.6.33.tar.bz2. Linux kernel I used is  2.6.28.
>>>> Is vcan.ko loaded? Please try
>>>>
>>>>   modprobe vcan
>>>>
>>>> before invoking
>>>>
>>>>   ip link add type vcan
>>>>
>>>> There should be this startup message in the kernel log:
>>>> "vcan: Virtual CAN interface driver"
>>>>
>>>> You can see all network interfaces with
>>>>
>>>>   cat /proc/net/dev
>>>>
>>>> or
>>>>
>>>>   ip link show
>>>>
>>>>
>>>>> The problem of "ip link add" is OK after recompiling kernel,
>>>>> /sys/class/net/can0 is created if I type in "ip link add dev can0 type
>>>>> vcan". But it says "cannot create /sys/class/net/can0" whenever I did
>> it
>>>>> or not.
>>>> As said above the sysfs configuration interface is depricated.
>>>>
>>>> For that reason the "can_setup" script is also not usable here.
>>>>
>>> I juste updated the wiki with can_setup:
>>> http://dave.limoilux.org/trac/wiki/UseSocketCAN#can_setup
>> I don't think your "ip link set" command does work. "type can" is
>> missing and "up" is not recognized at the end of the line (after "type
>> can").

Good.

> I add "type can", but I am not sure to understand the "up" part. Are you
> talking about the line "ifconfig $1 up"?

Yes, but it's correct. I read ifconfig as ip :-(. Sorry for the noise.

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

Reply via email to