Re: Resources for Linux SocketCAN

Heinz-Jürgen Oertel <[email protected]>
Newsgroups gmane.comp.hardware.bus.can
Organization privat
Message-ID <10228533.gbnRjeY3zF@linux-edhj>
Dinesh,
in can4linux we decided to use compile time for allocating resources.
Each receiving process needs its on receive queue for example
and memory for it.
To mange this, at compile time yo define 
-DCAN_MAX_OPEN=4
in the Makefile to allow,
in this example,
four processes to open one physical device at the same time.
Queue size too is a compile time constant.
That's all for predictable safety reasons.

Regards
  Heinz

Am Donnerstag 31 Januar 2013, 21:48:17 schrieb Dinesh Guleria:
> >> 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]> 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/
> > Report any problems to <[email protected]>
> >
--
Archives and useful links: http://groups.yahoo.com/group/CANbus
Subscribe and unsubscribe at www.vector.com/canlist/
Report any problems to <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.