linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Transmitted Data is not to be received by other Application
@ 2013-03-28 12:12 Oliver Stefan
  2013-03-28 12:21 ` Marc Kleine-Budde
  0 siblings, 1 reply; 2+ messages in thread
From: Oliver Stefan @ 2013-03-28 12:12 UTC (permalink / raw)
  To: linux-can

I'm developing Software for the Raspberry Pi with MCP2515 extension.

I have two applications running the same time.
One is in the receiving mode, and the other can transmit and receive.
Unfortunately the application that is permanently receiving, receives 
the data of the second application too.

How can I turn off this function?

I read the helpfile
http://svn.berlios.de/wsvn/socketcan/trunk/kernel/2.6/Documentation/networking/can.txt 

but I don't see there any possibility to eleminate this function.

Thank you very much!



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Transmitted Data is not to be received by other Application
  2013-03-28 12:12 Transmitted Data is not to be received by other Application Oliver Stefan
@ 2013-03-28 12:21 ` Marc Kleine-Budde
  0 siblings, 0 replies; 2+ messages in thread
From: Marc Kleine-Budde @ 2013-03-28 12:21 UTC (permalink / raw)
  To: Oliver Stefan; +Cc: linux-can

[-- Attachment #1: Type: text/plain, Size: 1170 bytes --]

On 03/28/2013 01:12 PM, Oliver Stefan wrote:
> I'm developing Software for the Raspberry Pi with MCP2515 extension.
> 
> I have two applications running the same time.
> One is in the receiving mode, and the other can transmit and receive.
> Unfortunately the application that is permanently receiving, receives
> the data of the second application too.
> 
> How can I turn off this function?

Have you tried this:

  4.1.3 RAW socket option CAN_RAW_LOOPBACK

  To meet multi user needs the local loopback is enabled by default
  (see chapter 3.2 for details). But in some embedded use-cases
  (e.g. when only one application uses the CAN bus) this loopback
  functionality can be disabled (separately for each socket):

    int loopback = 0; /* 0 = disabled, 1 = enabled (default) */

    setsockopt(s, SOL_CAN_RAW, CAN_RAW_LOOPBACK, &loopback, sizeof(loopback));

Marc
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-28 12:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-28 12:12 Transmitted Data is not to be received by other Application Oliver Stefan
2013-03-28 12:21 ` Marc Kleine-Budde

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).