Transmitted Data is not to be received by other Application
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!
Marc Kleine-Budde
maintainerQuoted 8 lines · Oliver Stefan
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
Signature · 4 lines
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 |