FreeRTOS porting RTI Micro issues

6 posts / 0 new
Last post
Offline
Last seen: 52 min 49 sec ago
Joined: 06/12/2022
Posts: 5
FreeRTOS porting RTI Micro issues

Hi,

  I use FreeRTOS+LWIP on TC397 to execute RTI Micro and RTI Micro of Linux system for cross-computer communication verification, but maybe because some of my configuration items are incorrect, the communication has not been successful. I find that the configuration item NETIO_CONFIG_HAVE_IFCONF in FreeRTOS is 0, so UDP_Interface_get_next_interface always returns false, while the value in POSIX is 1. Is this the cause?

Thank you

AttachmentSize
Binary Data rti_micro_log.pcapng61.77 KB
Offline
Last seen: 2 weeks 2 days ago
Joined: 12/14/2021
Posts: 8

Hi Liumeng15,

I don't know if i can help you much, but i would first like to ask if you can give a bit more background. I don't really know from this if what you are suggesting is indeed the problem. For example, what version of DDS micro are you using? 2.4.14? 3.0.3?

Also the capture you attached, can you maybe explain what IP belongs to what? What i do notice is that all the RTPS messages from 192.168.1.10 don't have any locators.

Kind regards,

Mikisugi

Offline
Last seen: 52 min 49 sec ago
Joined: 06/12/2022
Posts: 5

Hi,Mikisugi

  The version I'm using is 2.4.14, the IP address of TC397 is 192.168.1.10, and the IP address of PC is 192.168.1.9. I executed Pub on TC397 and sub on PC for cross-computer communication, but Sub could not be monitored on TC397. Attached is the message I tested. I am not sure whether it is my incorrect configuration.

thanks for your reply

Offline
Last seen: 13 hours 33 min ago
Joined: 11/19/2015
Posts: 18

Hi Liumeng15,

When running Connext Micro on FreeRTOS + lwIP you need to use the static ip configuration in Connext Micro. This is why the data(p) from the AUTOSAR board don't have any locators, so the application running on the PC does not know where to answer.

See API UDP_InterfaceTable_add_entry() https://community.rti.com/static/documentation/connext-micro/2.4.14/doc/api_c/html/group__UDPPluginModule.html#gaa4eb35c3990b9e4139c77a4c069e5fdd

As an example of how to use this API:

   
    .....
    *udp_property = UDP_INTERFACE_FACTORY_PROPERTY_DEFAULT;
 
 
    /* In this example we manually configure what interfaces are available.
    * First we disable reading out the interface list. Note that on some
    * platforms reading out the interface list has been compiled out, so
    * this property has no effect.
    */
    udp_property->disable_auto_interface_config = RTI_TRUE;


    /* This function takes the following arguments:

     * Param 1 is the iftable in the UDP property
     * Param 2 is the IP address of the interface in host order
     * Param 3 is the Netmask of the interface
     * Param 4 is the name of the interface
     * Param 5 are flags. The following flags are supported (use OR for multiple):
     *      UDP_INTERFACE_INTERFACE_UP_FLAG - Interface is up
     *      UDP_INTERFACE_INTERFACE_MULTICAST_FLAG - Interface supports multicast
     */
     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;
    }
    .....

 

 

 

This would add the interface with address 127.0.0.1 (0x7f000001). The name is not important. For the rest of parameters please see https://community.rti.com/static/documentation/connext-micro/2.4.14/doc/api_c/html/group__UDPPluginModule.html#gaa4eb35c3990b9e4139c77a4c069e5fdd

You need to use the local IP address on the FreeRTOS + lwIP system instead of 0x7f000001

 

 

 

Offline
Last seen: 52 min 49 sec ago
Joined: 06/12/2022
Posts: 5

Hi:

  Thanks for your advice. I added the following code on TC397, but I still didn't see locator in the message.

int publisher_test_throughput(ThroughputPublisherArgs * args)
{

...

    struct UDP_InterfaceFactoryProperty udp_property =
    UDP_INTERFACE_FACTORY_PROPERTY_DEFAULT;

    udp_property.disable_auto_interface_config = RTI_TRUE;
    if (!UDP_InterfaceTable_add_entry(
    &udp_property.if_table,
    0xC0A8010A,//192.168.1.10
    0xffffff00,//255.255.255.0
    "TC397",
    //UDP_INTERFACE_INTERFACE_UP_FLAG |
    UDP_INTERFACE_INTERFACE_MULTICAST_FLAG))
    {
        goto done;
    }

...

}

Best Regards

Offline
Last seen: 13 hours 33 min ago
Joined: 11/19/2015
Posts: 18

Hello liumeng15,

Is UDP_INTERFACE_INTERFACE_UP_FLAG commented out? If so, why?

Regards,

Francis.