Help: Transmitted Data is not to be received by other Application

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Help: Transmitted Data is not to be received by other Application

Olli
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!
Reply | Threaded
Open this post in threaded view
|

Re: Help: Transmitted Data is not to be received by other Application

Gary Thomas
On 2013-03-28 06:08, Olli 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?
>
> 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!
>

How do you distinguish the data?  Surely the "permanently receiving"
application wants to see some part of the data and the other application
needs to see other parts?  How do you know which is which?  Are you
running some sort of higher-level protocol, e.g. CanFestival, on the
CAN bus?

--
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
_______________________________________________
Socketcan-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/socketcan-users
Reply | Threaded
Open this post in threaded view
|

Re: Help: Transmitted Data is not to be received by other Application

sanders
In reply to this post by Olli
Hi,

you have to disable the internal loopback in your application which sends messages out.

int loopback = 0;
setsockopt(s, SOL_CAN_RAW, CAN_RAW_LOOPBACK, &loopback, sizeof(loopback));

Cheers,
Sandro
Reply | Threaded
Open this post in threaded view
|

Re: Help: Transmitted Data is not to be received by other Application

Olli
In reply to this post by Gary Thomas
You are right, the Identifier of the message specifies the target of the information.
It is probably not necessary to disable this "local loopback" function.

I have already tried to disable the loopback function.
I used this code:
int loopback = 0;
setsockopt(s, SOL_CAN_RAW, CAN_RAW_LOOPBACK, &loopback, sizeof(loopback));

I had an error in my code, so that the loopback function was turned on again.

Now it's working perfectly!

Many thanks to all!


Am 28.03.2013 13:40, schrieb Gary Thomas [via Socket-CAN]:
On 2013-03-28 06:08, Olli 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?
>
> 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!
>

How do you distinguish the data?  Surely the "permanently receiving"
application wants to see some part of the data and the other application
needs to see other parts?  How do you know which is which?  Are you
running some sort of higher-level protocol, e.g. CanFestival, on the
CAN bus?

--
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
_______________________________________________
Socketcan-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/socketcan-users



If you reply to this email, your message will be added to the discussion below:
http://socket-can.996257.n3.nabble.com/Help-Transmitted-Data-is-not-to-be-received-by-other-Application-tp7635p7636.html
To unsubscribe from Help: Transmitted Data is not to be received by other Application, click here.
NAML