why can not I configure unicast in rti-dds

8 posts / 0 new
Last post
Offline
Last seen: 9 years 1 month ago
Joined: 10/13/2015
Posts: 4
why can not I configure unicast in rti-dds

hi,

I want to configure dds to use unicast refering following url,

https://community.rti.com/howto/configure-rti-connext-dds-not-use-multicast,

but it does not work.

Any one can give some helps?

btw, I use the trial version of RTI Connext 5.1.0

Gerardo Pardo's picture
Offline
Last seen: 1 month 1 week ago
Joined: 06/02/2010
Posts: 602

Hi,

Which of the two methods described in https://community.rti.com/howto/configure-rti-connext-dds-not-use-multicast are you using? XML Qos or Application API?

Also can you explain what specifically does not work? Do you mean you are seeing the application stil use multicast (e.g. via Wireshark) or do you mean that you cannot get discovery to work? Or do you mean something else does not work?

Gerardo

 
Offline
Last seen: 9 years 1 month ago
Joined: 10/13/2015
Posts: 4

Hi,

I am using XML.

Following is my conf where "192.168.0.123" is not existed and my local IP is "192.168.0.91".

I test send&recv in my machine, however I still can recv messge at local machine.

<discovery>

<initial_peers>
<element>builtin.udpv4://192.168.0.123</element>
</initial_peers>
<multicast_receive_addresses/>
</discovery>
<property>
<value>
<element>
<name>dds.transport.UDPv4.builtin.multicast_enabled</name>
<value>0</value>
</element>
</property>

Regards

Gerardo Pardo's picture
Offline
Last seen: 1 month 1 week ago
Joined: 06/02/2010
Posts: 602

Hi,

This should not be happening. Are you sure that the XML file is being read and used by both the sending and receiving applications? To test this quickly I would introduce an error in the XML to make sure it is being parsed.  You must make sure both sending and receiving applications set it otherwise the default initial_peers will include the shared memory transport and thus it will find the other application when running on the same computer. In other words they will discover each other--not using multicast. Rather they will use shared memory. The communication will also use shared memory so you will see the data which may be confusing you...

Perhaps you are not running the application from the directory where the XML is and thus it is not being picked up... Or perhaps you are somehow specifying a different Qos profile to be used instead of the one that disables multicast.

Just to make sure I validated that configuration with a simple example (see attached) and as expected the two applications do not communicate even if they are in the same computer...

Gerardo

File Attachments: 
Offline
Last seen: 9 years 1 month ago
Joined: 10/13/2015
Posts: 4

Hi,

I have built your code and it works fine.

When I merge recv code(which is from NewType_subscriber.cxx) into NewType_publisher.cxx, build and run publisher, however It can recv msg which is send from the same process.

I have attached the code which I changed.

Could you please give me some help?

Regards

File Attachments: 
Gerardo Pardo's picture
Offline
Last seen: 1 month 1 week ago
Joined: 06/02/2010
Posts: 602

Hi,

I am a bit confused about what you are trying to do... Looking at the NewType_publisher.cxx in the ZIP file you attached I see that you have added to the DomainParticipant both the DataWriter and the DataReader on the same Topic.  Therefore when you run the the NewType_publisher application it will send the data and receive the data itself.  This is the expected behavior and has nothing to do with the configuration of multicast... Since both the DataReader and DataWriter are in the same DomainParticipant they will discover each other via any transport they enable...

If you do not want the DataWriters in one DomainParticipant to communicate with DataReaders in the same DomainParticipant then you need to use the approach described in this post:  https://community.rti.com/kb/how-do-i-get-datareader-ignore-datawriter-belongs-same-domainparticipant

Gerardo

Offline
Last seen: 9 years 1 month ago
Joined: 10/13/2015
Posts: 4

Hi,

Yes. I don't want reader&writer in the same participant communicate with each other.

Now It works. Thank you.

btw, can I configue this feature in XML?

Regards.

Gerardo Pardo's picture
Offline
Last seen: 1 month 1 week ago
Joined: 06/02/2010
Posts: 602

No, unfortunately this cannot be configured using XML. It is a good idea.

Gerardo