LabVIEW Automotive Ethernet

cancel
Showing results for 
Search instead for 
Did you mean: 

SOME/IP Client / Server Examples

This example contains SOME/IP Client and Server VIs which demonstrate

  • how a SOME/IP Server offers available services and sends responses to a Client request
  • how a SOME/IP Server offers events
  • how a SOME/IP Client can send a request to a SOME/IP Server and gathers the response from the Server
  • how a SOME/IP Client receives notifications from subscribed eventgroups

There are two versions of the SOME/IP examples contained in the LabVIEW project:

  • one which supports one service only
  • one which demonstrates a SOME/IP Client calling methods in 2 services
  • one which supports an event and a field
  • one which demonstrates serialization and deserialization of user parameters

Every SOME/IP application requires a \etc\vsomeip.json configuration file on the same logical drive as the application. For more information regarding the JSON configuration file refer to the attached readme.txt.

 

SOME/IP Features supported in this example:

SOME/IP Feature

Supported by Example

Supported by used

Genivi SOME/IP Stack

Serialization

Yes (0.3)

No

Service Discovery

Yes

Yes

Publish/Subsribe

Yes (0.2)

Yes

Method incl. response

Yes

Yes

Method without response

(Fire and Forget)

Yes

Yes

Event

Yes (0.2)

 

Field

Yes (0.2)

Yes

Event Group

Yes (0.2)

Yes

Segmentation of UDP Messages

No

No

E2E Protection

Yes *

Yes **

* = undocumented   ** = uncomplete, with user defined DLLs possible

 

SOME/IP (Scalable Service-Oriented Middleware over IP) Overview

SOME/IP is an automotive middleware solution for control message data exchange of automotive devices like cameras, head units or telematics devices. SOME/IP supports features of various domains in the vehicle, allowing SOME/IP to be used as a replacement for a lot of traditional communication implementations.

SOME/IP has been introduced by BMW Group in 2011 and meanwhile is maintained by the AUTOSAR organization. SOME/IP (Scalable Service-Oriented Middleware over IP) relies on using Ethernet and TCP/IP. Use case of a middleware typically concentrates around serialization and deserialization between ECU internal and external network representations, as well as sending and receiving of data. For serialization, SOME/IP uses a straight forward approach of converting datatypes without complex conversion algorithms. Supported data types of SOME/IP are unsigned integer 8/16/32/64, signed integer 8/16/32/64, float 32/64, enumeration, Boolean, bitfield, struct union, static array and dynamic array. Arrays can be defined in multi dimensions. Simple data types like uint8 are identical in the network representation as well as for the internal representation. In opposite to CAN SOME/IP can transport large data packets as Ethernet offers higher payloads. SOME/IP communication is executed between a service producer (Server) and a Service Consumer (Client). A SOME/IP service can contain

  • Methods including response
    • request from a Client to a Server, which answers with a response
  • Method without response (Fire and Forget Method)
    • request from a Client to a Server which is not answered
  • Event
    • Information from a Server to registered Clients, eg executed on State change
  • Field
    • Logical representation of a property on the Server used for a request methods (Getter), change methods (Setter) or Events (Notification)
  • Event Group
    • Logical grouping of events

Services can get instantiated several times in a car as so called Service Instances. SOME/IP transmits any message based on UDP or TCP. A SOME/IP message consists of header and data payload.

 

The header contains

  • Message ID (32 bit) - Service and Method ID
  • Length (32 bit)
  • Request ID (32 bit) - Client and Session ID
  • Protocol Verion (8 bit)
  • Interface Version (8 bit)
  • Message Type (8 bit)
  • Return Code (8 bit)
  • Payload (0 to …)

SOME/IP Message FormatSOME/IP Message Format

SOME/IP supports a wide range of middleware features:

  • Serialization – transforming into and from on-wire representation
  • Remote Procedure Call (RPC) – implementing remote invocation of functions
  • Service Discovery (SD) – dynamically finding and functionality and configuring its access
  • Publish/Subscribe (Pub/Sub) – dynamically configuring which data is needed and shall be sent to the client
  • Segmentation of UDP messages – allowing the transport of large SOME/IP messages over UDP without the need of fragmentation

The attached zip folder contains the following files:

SOMEIP Example.JPG

 

0 Kudos
Message 1 of 23
(41,149 Views)

Hi,

 

Can the attached projects be converted to LabVIEW 2012? At the moment I have LabVIEW 2012.

 

Thank you in advance,

0 Kudos
Message 2 of 23
(39,296 Views)

Hi Borsanu,

We do support only 3 latest versions of LabVIEW when creating new VIs. However it should be possible that you would install a new demo version of LabVIEW (time limited) and use File->Save For Previous Version to save the VIs for your version.

Thanks,

Waldemar

0 Kudos
Message 3 of 23
(39,279 Views)

I was looking through the examples, and it appears that the SOME/IP examples cannot be modified to allow for a multi-UP tester (i.e. 16 different networks, regardless of whether they use different subnets or not).  It looks like you only allow one source, defined by the unicast line in the json file.

 

Is this correct, or am I missing something fundamental?

0 Kudos
Message 4 of 23
(38,683 Views)

You are correct. The open source library used in the examples allows binding to only one IP address, so if you are using a configuration requiring distinct IP address per network, this is unfortunately not supported.

0 Kudos
Message 5 of 23
(38,674 Views)

This is a limitation of the current examples, their corresponding instructions, and the underlying vsomeip libary. Referring to the vsomeip documentation, I have found a way to make this work on Windows, but it is not a very convenient solution.

 

Limitations of this approach:

  1. Each network interface must be on a unique subnet.
    • This is a limitation of the OS network stack, and will apply to any solution written on top of a typical IP stack.
  2. Each network interface must be used from a separate process.
  3. This approach works only on Windows.

 

I have not tested this extensively. I am using only the simple Client_Response and Server_Response examples.

I have verified they work independently by disconnecting one network interface at a time, and verifying that the other Client/Server pair continues to communicate.

 

 

The procedure I used it as follows:

 

  1. Generate two JSON files. The name and location do not matter. They must differ in the following ways:
    • Provide a unique unicast address in each file, corresponding to the desired network interface.
    • Add a 'network' line to each file, with a unique name in each. Just after the unicast address is fine. It will look something like this:
      "unicast" : "192.168.1.107",
      "network" : "vsomeip-dut2",   
  2. Build your LabVIEW example into an executable.
  3. Modify the test executable to allow multiple instances to run, by adding the following line to its .INI file:
    AllowMultipleInstances=True
  4. Each instance should be launched from the command line, after setting the VSOMEIP_CONFIGURATION environment variable to point to the proper JSON file. I used the following batch file to launch two instances on my machine:

    set VSOMEIP_CONFIGURATION=C:\MyTest\vsomeip-udp-server.json 
    start C:\MyTest\Application.exe
     
    set VSOMEIP_CONFIGURATION=C:\MyTest\vsomeip-udp-server-alt.json 
    start C:\MyTest\Application.exe 
    

 

 

 

Message 6 of 23
(38,606 Views)

Hi,

 

First of all thank you for posting this useful example on SOME/IP in LabVIEW.

 

I am trying to remotely control a media gateway from Technica Engineering ( user manual --> MediaGateway User Manual (PDF) ) using this example but with no success. The communication is over UDP with port n 30491. 

As stated in the user manual the service id is 0x0124 but they do not specify the instance id for this service.

I am also using Wireshark with someip lua plugin to know a little more about what is happening.

Basically my first try is to get the Media Gateway to reset by using method 0x0001 but it is not doing anything. I can connect to the media gateway through internet browser connecting to its IP and I can perform reset and modify its internal switches configuration.

When I run the Client_Request.vi with:

FrontPanel_Values.PNG

 I see the following packets through Wireshark:Wireshark_Packets.PNG image.pngCould anyone provide me some hints about what I might be doing wrong or if i'm missing something about SOME/IP protocol?

Also find attached the .json file i am currently using (in txt format since i cannot attach .json files).

 

Thank you very much in advance,

 

Best regards.

0 Kudos
Message 7 of 23
(38,162 Views)

Do anyone have a sample arxml which is used for some/ip interface definition. If yes, can you kindly share

0 Kudos
Message 8 of 23
(36,997 Views)

Hi Gibson,

Refer to the 'README.txt', I can not find a 'User Defined Installation' option on 'Software and select Install or Remove Software' in Max, like attached picture.

so how to detailedly setup SOMEIP Examples on Linux 64bit RT system? 

捕获.PNG

0 Kudos
Message 9 of 23
(33,399 Views)

Hi Linna.ma,

User Defined Installation is on the page before the page you are showing on the bottom. Maybe you have already selected it.

If you have copied the files correctly to RT Images before, you should see SOME IP Examples in the selector like below.

Note that you have restart MAX after you have copied the files to RT Images due to cashing.

 

SOMEIP2.PNG

 

0 Kudos
Message 10 of 23
(33,387 Views)