Re: Resources for Linux SocketCAN
Steinhoff <[email protected]>
| Newsgroups | gmane.comp.hardware.bus.can |
|---|---|
| Message-ID | <[email protected]> |
Hi Dinesh,
I wouldn't use that SocketCAN ... its simply a complete overkill for the
transmission of 8 bytes of user data !
I prefer UIO based drivers ... they running in user space and need only
very small kernel modules which are more or less independent from the
kernel version.
An user space driver can be written in plain POSIX code, avoids a lot of
context switches, and can be used for LINUX and PREEMPT_RT Linux.
URLs:
https://www.osadl.org/Realtime-Linux.projects-realtime-linux.0.html ,
https://www.osadl.org/UIO.uio0.0.html
Best Regards
Armin Steinhoff
http://www.steinhoff-automation.com
Dinesh Guleria wrote:
> >>http://www.can-wiki.info/can4linux/man/index.html
> I have read this link before, As per this link Can4linux for version
> 3.4.6 supports many devices.
> But only point which i did not get is, udev will create nodes for
> these multiple devices which we have configured in kernel. Or for
> every single device there will be maximum 10 nodes...... ?????? :--
>
> Since version 3.4.6 can4linux assumes that your distribution uses
> *udev* to have the device `/dev/can[0-9]' automatically created.
> It is usually necessary to change the device access rights set
> by*udev* . With the Fedora Core >= 4 or SuSE/novell you can do
>
>
> >> Your knowledge needs to be updated :-)
>
> Means only one application can control underlying hardware at a time.
>
> What i mean to say here is suppose there is one -- MCP2515 device
> connected to controller.
> Now is it possible for two process running on Linux environment to
> Open same driver & send & receive the messages through same device ?
>
> http://de.wikipedia.org/wiki/Can4linux
> fd= open("/ dev/can0", O_RDWR);
>
>
>
> http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:drivers:can_module
> There are two frameworks for CAN drivers in Linux now. CAN4LINUX
> provides read/write/ioctl interfaces based on the framework of Linux
> character device drivers, butSocketCAN
> <http://en.wikipedia.org/wiki/SocketCAN> provides an API for
> CAN devices based on BSD sockets.
>
>
> Regards,
>
> Dinesh
>
> On Thu, Jan 31, 2013 at 7:00 PM, Heinz-Jürgen Oertel <[email protected]
> <mailto:[email protected]>> wrote:
>
> Am Donnerstag, 31. Januar 2013, 18:36:47 schrieb Dinesh Guleria:
> > What i knows .
> >
> > Socket CAN :--
> > Allows many application to send & receive packets from same device
> > simultaneously.
> >
> > can4linux :--
> > It can be used as an character driver. Means only one
> application can
> > control underlying hardware at a time.
> >
> > //Dinesh
>
> Your knowledge needs to be updated :-)
> If you like, look at:
> http://www.can-wiki.info/can4linux/man/index.html
>
> Regards
> Heinz
> --
> Archives and useful links: http://groups.yahoo.com/group/CANbus
> Subscribe and unsubscribe at www.vector.com/canlist/
> <http://www.vector.com/canlist/>
> Report any problems to <[email protected]
> <mailto:[email protected]>>
>
>