Some progress at last, thanks to Oliver and Rene!

I built the ip tool from the 2.6.38 tag. Decided to ignore its struggles with 
the misc directory and found that the ip tool does seem to work. So, I can set 
the bitrate etc.

On to the next problem...

When I try to bring the interface up (ip link set can0 up) I get two error 
messages:
"setting trigger mode 2 for irq 157 failed (gpio_irq_type+0x0/0x2c)" and
"mcp251x spi0.1: failed to acquire irq157"
RNETLINK answers: Invalid argument

Now, 157 corresponds to port D pin 29 which is where the irq is wired to. So I 
guess the fault may be in the board setup.

Any ideas guys?




> -----Original Message-----
> From: Oliver Hartkopp [mailto:[email protected]]
> Sent: 22 August 2011 18:14
> To: Ansell, John
> Cc: [email protected]
> Subject: Re: [Socketcan-users] Need help starting socketCAN
> 
> On 22.08.2011 14:22, Ansell, John wrote:
> 
> > Hi guys,
> 
> 
> 
> Hi John,
> 
> i'll try to enhance the answer from Rene a bit ;-)
> 
> > I need some advice regarding starting up the can0 and can1 devices
> please.
> >
> >
> >
> > Hardware is an AT91SAM9 (ARM) driving two MCP2515 controllers, one on
> each of
> > the SPI ports. SocketCAN support is built into the kernel, 2.6.38.
> dmesg shows
> > probes are successful and the CAN drivers are being loaded.
> 
> 
> Then you should see the CAN netdevices also in /proc/net/dev
> 
> There are no CAN files created in /dev/xxx as the CAN devices use the
> network
> driver model like ethernet cards.
> 
> >
> > I'm using busybox to handle the commands. Trouble is, its ip command
> doesn't
> > support the 'type can' or 'bitrate' parameters so the can devices
> stay ‘down’.
> >
> > How can I get my can interfaces ‘up’? Can I set the bitrate from a
> userland
> > task, maybe via ioctls or something?
> 
> 
> As Rene wrote, you need a 'recent' 'ip' from the iproute2 package:
> 
> http://git.kernel.org/?p=network/iproute2/iproute2.git;a=summary
> 
> >
> > Has anybody got a busybox build to work?
> 
> 
> In our setup we disabled the 'ip' tool in busybox and compiled the 'ip'
> from
> iproute2 ...
> 
> >
> > I don’t see a CAN device in /dev – should I?
> 
> 
> That's correct that you don't see things in /dev/xxx .-)
> 
> Regards,
> Oliver

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

Reply via email to