vsomeip configuration file for client and server

  automotive, c++, udp

I am unable to establish communication between server and client when using seperate JSON configuration files for client and server
My requirement is to transmit SOME/IP data using the vsomeip framework. I am transmitting the data on the same system.
However, I am able to transmit data when using the same JSON file for transmitter and receiver.
Below is the JSON file used.

{
    "unicast" : "160.48.199.102",
    "logging" :
    { 
        "level" : "trace",
        "console" : "true",
        "file" : { "enable" : "false", "path" : "/tmp/vsomeip.log" },
        "dlt" : "false"
    },
    "applications" : 
    [
        {
            "name" : "master_tx",
            "id" : "0x1277"
        },
        {    
            "name" : "master_rx",
            "id" : "0x1344"
        }
    ],
    "services" :
    [
        {
            "service" : "0x3556",
            "instance" : "0x0001",
            "reliable" : { "port" : "30490", "magic-cookies" : "false" },
            "events" : 
            [
                {
                    "event" : "0x8001",
                    "is_field" : "true",
                    "is_reliable" : "false"
                }
            ]
        }
    ]
    "max-payload-size" : "5000",
    "max-payload-size-unreliable" : "5000",
    "routing" : "master_tx",
    "service-discovery" :
    {
        "enable" : "true",
        "port" : "30490",
        "protocol" : "_udp_",
        "initial_delay_min" : "100",
        "initial_delay_max" : "200",
        "repetitions_base_delay" : "200",
        "repetitions_max" : "15",
        "ttl" : "100",
        "cyclic_offer_delay" : "2000",
        "request_response_delay" : "1500"
    }
}

But, when using different JSON files for transmitter and receiver, I am not able to establish any connection. Below are the JSON files used.

server.json

{
    "unicast" : "192.168.0.178",
    "logging" :
    { 
        "level" : "trace",
        "console" : "true",
        "file" : { "enable" : "false", "path" : "/tmp/vsomeip.log" },
        "dlt" : "false"
    },
    "applications" : 
    [
        {
            "name" : "master_tx",
            "id" : "0x1277"
        }
    ],
    "services" :
    [
        {
            "service" : "0x3556",
            "instance" : "0x0001",
            "reliable" : { "port" : "30490", "magic-cookies" : "false" },
            "events" : 
            [
                {
                    "event" : "0x8001",
                    "is_field" : "true",
                    "is_reliable" : "false"
                }
            ],
            "eventgroups" :
            [
                {
                    "eventgroup" : "0x001",
                    "events" : [ "0x8001" ]
                }
            ]
        }
    ],
    "max-payload-size" : "5000",
    "max-payload-size-unreliable" : "5000",
    "routing" : "master_tx",
    "service-discovery" :
    {
        "enable" : "true",
        "port" : "30490",
        "protocol" : "_udp_",
        "initial_delay_min" : "100",
        "initial_delay_max" : "200",
        "repetitions_base_delay" : "200",
        "repetitions_max" : "15",
        "ttl" : "100",
        "cyclic_offer_delay" : "2000",
        "request_response_delay" : "1500"
    }
}

client.json

{
    "unicast" : "192.168.0.178",
    "network" : "vsomeip-rx",
    "logging" :
    { 
        "level" : "trace",
        "console" : "true",
        "file" : { "enable" : "false", "path" : "/tmp/vsomeip.log" },
        "dlt" : "true"
    },
    "applications" : 
    [
        {    
            "name" : "master_rx",
            "id" : "0x1344"
        }
    ],
    "clients" :
    [
        {
            "service" : "0x3556",
            "instance" : "0x0001",
            "unreliable" : [ "30490" ]
        }
    ],
    "max-payload-size" : "5000",
    "max-payload-size-unreliable" : "5000",
    "routing" : "master_rx",
    "service-discovery" :
    {
        "enable" : "true",
        "port" : "30490",
        "protocol" : "_udp_",
        "initial_delay_min" : "100",
        "initial_delay_max" : "200",
        "repetitions_base_delay" : "200",
        "repetitions_max" : "15",
        "ttl" : "100",
        "cyclic_offer_delay" : "2000",
        "request_response_delay" : "1500"
    }
}

Can someone please help me if something is wrong in JSON files or if I am missing something else.

Source: Windows Questions C++

LEAVE A COMMENT