Communication problems between RTI Micro and RTI

4 posts / 0 new
Last post
Offline
Last seen: 2 years 4 months ago
Joined: 06/12/2022
Posts: 5
Communication problems between RTI Micro and RTI

Hi,

    I used Freertos + LWIP to run RTI on MCU and RTI on PC for communication. Through Wireshark, I found that when RTI sent 4 frames of ping and 4 frames of Data(P), MCU could not reply immediately and would wait for 30 seconds to recover. However, when I change the number of frames sent by RTI to 3 for ping and 3 for Data(P), MCU can immediately reply to the message. I suspect that packet loss may be caused by insufficient LWIP space, However, I have modified some sizes in lwipopts.h but there is still no effect. What might cause this problem?Attached is the message I recorded

MCU IP:192.168.1.10

PC IP:192.168.1.1

Thank you and look forward to your reply

AttachmentSize
Binary Data rti_micro_log.pcapng61.77 KB
Offline
Last seen: 9 months 1 day ago
Joined: 11/19/2015
Posts: 21

Hello,

When Connext Micro runs on lwIP it cannot read the local list of network interfaces. For this reason the list of locators in the data(p) is empty, so the remote Domain Participant does not know what IP use to communicate with.

You can fix that by applying the following changes in the application running in FreeRTO+lwIP:

- In the UDP properties set field disable_auto_interface_config equal to RTI_TRUE.

- Use API UDP_InterfaceTable_add_entry() with the local IP address, network mask, etc.

Example:

    struct UDP_InterfaceFactoryProperty *udp_property = NULL;
....

    udp_property->disable_auto_interface_config = RTI_TRUE;

    if (!UDP_InterfaceTable_add_entry(&udp_property->if_table,
                                      0x7f000001,0xff000000,"loopback",
                                      UDP_INTERFACE_INTERFACE_UP_FLAG |
                                      UDP_INTERFACE_INTERFACE_MULTICAST_FLAG))

    {
        printf("failed to add interface\n");
        goto done;
    }

 

Instead of 0x7f000001 you should use the local IP address.

 

You can see an example on <Connext Micro install folder>/examples/windows|unix/C/HelloWorld_static_udp.

In case you are using Connext Micro 2.4.14 you can generate this example using command: "rtiddsgen -example -exampleTemplate static_udp -language C <idl_file>

 

Offline
Last seen: 2 years 4 months ago
Joined: 06/12/2022
Posts: 5

Hello,

    I know you're talking about this setup, and I do the same thing, but I'm describing a different problem. At present, I can communicate normally, but when the PC sends more than three frames of ping and data(P), MCU will not immediately respond to the received data, but wait 30 seconds to respond and start normal communication.

Thank you

Offline
Last seen: 9 months 1 day ago
Joined: 11/19/2015
Posts: 21

Hello,

I checked the wireshark trace that you attached, and the data(p) packets from 192.168.1.10 don't have locators. That means that the UDP transport is not configured properly. This is the reason for my previous comment.

The data(p) are sent by default every 30 seconds, this is why you see those packets every 30 seconds.

Regards,

Francis.