Why no discovery message from Micro?

5 posts / 0 new
Last post
Offline
Joined: 03/25/2018
Posts: 10
Why no discovery message from Micro?

Hi,

I can't get my DDS Micro project to interoperate with my client's DDS Connext. Below are some information, and hope somebody can help me please. My project deadline is approaching.

  1. I run a DDS Micro application in a labtop running Windows, sending just one topic to a network. I configured the DDS Micro as multicast.
  2. I launched the Admin Console but the DDS Micro application was not discovered as participant.
  3. However, when I launched my client's DDS Connext application (developed to work with my DDS Micro), Admin Console captured the DDS Micro participant and displayed the data live.
  4. From the Amin Console, we observed that DDS Micro did publish a "join" message, but there was no discovery message at all. We observed that the DDS Connext application published "join" and also discovery messages periodically.

It looks like Admin Console could not discover my DDS Micro without launching my client's DDS Connext application. Is it because DDS Micro did not send its discovery message?

Below is the codes I used to configure my discovery and transport.

Thanks for your help. Really appreciate it.

Chee-Beng

 

/******************************* Create Participant ******************************************/

DDS_Entity* entity;

DDS_DomainParticipantFactory *factoryParticipant = NULL;
struct DDS_DomainParticipantFactoryQos dpfQos = DDS_DomainParticipantFactoryQos_INITIALIZER;
//struct DDS_DomainParticipantQos dpQos = DDS_DomainParticipantQos_INITIALIZER;

// Get the singleton instance of participant
factoryParticipant = DDS_DomainParticipantFactory_get_instance();

// Get the value for participant factory QoS
DDS_DomainParticipantFactory_get_qos(factoryParticipant, &dpfQos);

dpfQos.entity_factory.autoenable_created_entities = DDS_BOOLEAN_FALSE;

// Set the value for participant factory QoS
DDS_DomainParticipantFactory_set_qos(factoryParticipant, &dpfQos);

// Assign a name to RT_ComponentFactoryId_T variable, such as the discovery plugin to use
if (!RT_ComponentFactoryId_set_name(&mdpQos.discovery.discovery.name, "dpde"))
{
    DDS_DomainParticipantQos_finalize(&mdpQos);
}

// Create Qos for participant
// if there are more remote or local endpoints, you need to increase these limits.
mdpQos.resource_limits.max_destination_ports = 32;
mdpQos.resource_limits.max_receive_ports = 32;
mdpQos.resource_limits.local_topic_allocation = 6; // Number of topic
mdpQos.resource_limits.local_type_allocation = 6; // Number of type
mdpQos.resource_limits.local_reader_allocation = 3; // Number of reader
mdpQos.resource_limits.local_writer_allocation = 3; // Number of writer
mdpQos.resource_limits.remote_participant_allocation = 8; // Maximum number of participant can be discovered
mdpQos.resource_limits.remote_reader_allocation = 8 + 24; // Maximum remote data reader can be discovered
mdpQos.resource_limits.remote_writer_allocation = 8 + 24; // Maximum remote data writer can be discovered

#define LWIP_LOCATOR_PREFIX "1@lwip://"

DDS_StringSeq_set_maximum(&(mdpQos.discovery.initial_peers), 1);
DDS_StringSeq_set_length(&(mdpQos.discovery.initial_peers), 1);
*DDS_StringSeq_get_reference(&(mdpQos.discovery.initial_peers), 0) = DDS_String_dup(LWIP_LOCATOR_PREFIX"239.255.0.1");

DDS_StringSeq_set_maximum(&(mdpQos.transports.enabled_transports), 1);
DDS_StringSeq_set_length(&(mdpQos.transports.enabled_transports), 1);
*DDS_StringSeq_get_reference(&(mdpQos.transports.enabled_transports), 0) = DDS_String_dup("lwip");

DDS_StringSeq_set_maximum(&(mdpQos.discovery.enabled_transports), 2);
DDS_StringSeq_set_length(&(mdpQos.discovery.enabled_transports), 2);
*DDS_StringSeq_get_reference(&(mdpQos.discovery.enabled_transports), 0) = DDS_String_dup("lwip");

*DDS_StringSeq_get_reference(&(mdpQos.discovery.enabled_transports), 1) = DDS_String_dup("lwip://239.255.0.1");

DDS_StringSeq_set_maximum(&(mdpQos.user_traffic.enabled_transports), 1);
DDS_StringSeq_set_length(&(mdpQos.user_traffic.enabled_transports), 1);
*DDS_StringSeq_get_reference(&(mdpQos.user_traffic.enabled_transports), 0) = DDS_String_dup("lwip://");

// if there are more remote or local endpoints, you need to increase these limits
mdpQos.resource_limits.matching_reader_writer_pair_allocation += 48;

// Create participant
mParticipant = DDS_DomainParticipantFactory_create_participant(factoryParticipant, mDomainId, &mdpQos, NULL, DDS_STATUS_MASK_NONE);
if (mParticipant == NULL)
{
   DDS_DomainParticipantQos_finalize(&mdpQos);
}

 

registerType();

createTopic();
createPublisher();
createDataWriter();
createSubscriber();
createDataReader();

entity = DDS_DomainParticipant_as_entity(mParticipant);

if(DDS_RETCODE_OK != DDS_Entity_enable(entity))
{
}

DDS_DomainParticipantQos_finalize(&mdpQos);

 

Organization:
Howard's picture
Offline
Joined: 11/29/2012
Posts: 14

Hi,

What DDS domain are you running on?

Is Admin Console configured to discover applications on that domain?  Or is it configured to "automagically" discover all domains?

If Admin Console is NOT configured specifically to discover and join the domain on which you're running your applications (and it's not by default), you should modify the configuration ("View" -> "Preferences" -> "Administration") to "Manually join and leave domains", and add the domain ID that you are using to join.

I don't think that Connext DDS Micro supports the protocol needed for Admin Console to automatically discover the domain on which a Micro app is running.

But when you ran your Connext DDS app, the Admin Console did automatically figure out the DDS domain ID that is used by the Connext DDS app and automatically will join that domain...which also caused it to discover your Connext Micro app.  Which basically describes what you are seeing.

I don't quite understand what you mean by :

  1. From the Amin Console, we observed that DDS Micro did publish a "join" message, but there was no discovery message at all. We observed that the DDS Connext application published "join" and also discovery messages periodically.

Admin Console doesn't capture or display discovery messages...so I don't know how you observed "join" messages.  What do you mean by "join" messages?  And how did you see this in Admin Console?

--Howard

Offline
Joined: 03/25/2018
Posts: 10

Hi Howard,

Thank yoU I will do as you say to configure the Admin Console.

Sorry I didn't make it clear that the "join" and discovery messages were observed using wireshark, not Admin Console.

Thanks, Howard. Thanks for helping. Really appreciate it.

Chee Beng

 

Offline
Joined: 03/25/2018
Posts: 10

Hi Howard,

Thanks for your help.

After we changed the Admin Console to discover my domain manually, it works.

Thanks.

Chee Beng

Howard's picture
Offline
Joined: 11/29/2012
Posts: 14

Glad it helped!