* using multiple buffer with mailbox
@ 2012-08-30 12:26 Mahesh.Maharjan-EXT
2012-08-30 16:22 ` Oliver Hartkopp
0 siblings, 1 reply; 2+ messages in thread
From: Mahesh.Maharjan-EXT @ 2012-08-30 12:26 UTC (permalink / raw)
To: linux-can
hello to all Again,
As I working with imx, I want to know , How do SocketCAN can be
implement with mailbox ( 64 message buffer) regarding flexcan flexibilti
and hardware filters. Or is there possible to implement along message
buffer using priority based CAN message using Socket CANin upperlayer ,
with CAN_buffer register Interrupts.
Another question , which interest me is ,CAN_ ISO TP implementaion , which
I check in linux-can, I could not find the sources & header files, but ,
CAN-util is using CAN_ISOTP- examples. Do, still ISO-TP in test mode Or
it is already beed implement.
~ Mahesh
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: using multiple buffer with mailbox
2012-08-30 12:26 using multiple buffer with mailbox Mahesh.Maharjan-EXT
@ 2012-08-30 16:22 ` Oliver Hartkopp
0 siblings, 0 replies; 2+ messages in thread
From: Oliver Hartkopp @ 2012-08-30 16:22 UTC (permalink / raw)
To: Mahesh.Maharjan-EXT; +Cc: linux-can
Hello Mahesh,
On 30.08.2012 14:26, Mahesh.Maharjan-EXT@continental-corporation.com wrote:
> As I working with imx, I want to know , How do SocketCAN can be
> implement with mailbox ( 64 message buffer) regarding flexcan flexibilti
> and hardware filters.
The CAN netdev driver model is as easy and simple as ethernet devices.
To fulfill multi-user requirements the CAN driver disables any CAN controller
specific filters and mailboxes to enable all different users on the host to
filter their own requires messages, using the CAN filter infrastructure:
http://lxr.linux.no/#linux+v3.5.3/Documentation/networking/can.txt#L393
You can also check out the filter capabilities with the 'candump' tool, see
'candump -?'
> Or is there possible to implement along message
> buffer using priority based CAN message using Socket CANin upperlayer ,
> with CAN_buffer register Interrupts.
Interrupts?, CAN_buffer?, upperlayer? ???
You can open a CAN_RAW socket and apply the filters if you only want specific
CAN-IDs in your receive data stream. You can also open more than one CAN_RAW
socket in your application and handle the different file descriptors with
different functions.
Another option is to use the CAN_BCM sockets, where you can filter for
specific CAN-IDs and also for
- content changes in the CAN payload (data[])
- timeouts for cyclic messages
- etc.
This is especially very elegant for (cyclic) automotive CAN messages and can
be used in cases where "CAN mailboxes in CAN controllers" are usually used
for. E.g. the cansniffer and the bcmserver tool uses the CAN_BCM.
Give it a try and keep in mind that you are able to handle more than one CAN
socket in your application too :-)
> Another question , which interest me is ,CAN_ ISO TP implementaion , which
> I check in linux-can, I could not find the sources & header files, but ,
> CAN-util is using CAN_ISOTP- examples. Do, still ISO-TP in test mode Or
> it is already beed implement.
The isotp implementation is fully implemented in the 'CAN modules' tree:
https://gitorious.org/linux-can/can-modules
There you can find the according includes (that are also in the can-utils tree
to build the isotp tools).
I added the missing README.isotp file a few minutes ago, see (and read!):
https://gitorious.org/linux-can/can-modules/blobs/master/README.isotp
The implementation (and especially the socket API) is pretty stable and it's
used every day for automated regression testing and prototyping. I just did
not find the time to push it to mainline - due to this issue:
https://gitorious.org/linux-can/can-modules/blobs/master/README.isotp#line212
But i'll do some time.
Regards,
Oliver
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-08-30 16:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-30 12:26 using multiple buffer with mailbox Mahesh.Maharjan-EXT
2012-08-30 16:22 ` Oliver Hartkopp
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).