SOME/IP Client Demo

There is an example implementation of SOME/IP client demo available in apps folder.Initially SOME/IP server started the UDP socket connection. Once client connected to the server SOME/IP client broadcast the Find service request. Once client connected, send the request to the server.Server send the response to the client.

In this implementation, a simple command line interface (CLI) is used to trigger various services on to the ECU/server like eventgroup subscribe, read and write data using SOME/IP request response method.

The below diagram captures the high level flow of client and server of SOME/IP.

Service Discovery Process

SOME/IP Discovery process Sequence Diagram

Notification Process

SOME/IP Notification process Sequence Diagram

Read data by Event ID (0x427) service

Few Event IDs are supported in the demo where many of them are automatically incrementing so that it can be read to find the differences.

Write Data By Event ID (0x428) service

Event ID specified as Read/Write are allowed to be written

SOME/IP Client Running Example

Refer to the Supported Platforms page to setup your environmental setup and follow further.

User Configuration for Client

Client Configuration

Socket configuration

Value

Clients IP address

IP address of client running PC or machine

SOMEIP SD PORT

30490

SOMEIP NOTIFY PORT NUM

30509

  • Once run the execution command the (./someip_client_demo) SOME/IP client connecting to SOME/IP server via UDP.

  • Note : Before run the client we need to run the SOME/IP server on another terminal or eclipse

  • Note : The below execution steps are same for both windows and linux.

  • After initial communication has been done, Its shows the SOME/IP services menu look like below

For Linux

SOME/IP Client Menu
  • Note : After execution,the follwing procedure will be same for both client and server.

Find service & Eventgroup subscription

In SOME/IP, first we need to find the service to subscribe to the eventgroup for accessing the event ID for request and response, notification events.

  • To find the service, Type 1 and press enter

  • Then it will ask “Please enter the Number of services need to FIND?”

  • Type 1 and press enter

  • Then it will ask “Please enter the 1 Service id to read in hex”

  • Type 1234 and press enter

  • “Please enter the 1 instance id to read in hex”

  • Type 5678 and press enter

Find Service Menu

After that, find service request sent from the client to the server. server responses with an offer service. Now we need to send an eventgroup subscribe request for an eventgroup subscription. SOME/IP client automatically parse the offer service and list down the eventgroups of available services.

  • We need to choose from the eventgroup list.

  • List of eventgroup to subscribe

    • 1.Eventgroup - 0x4425

    • 2.Eventgroup - 0x4465

  • It asks “Enter the number of eventgroup need to subscribe “

  • Type 1 or 2 and press enter (recommended give 2)

  • Enter the 1 eventgrp number (without 0x)

  • Type 4425 and press enter

  • Enter the 2 eventgrp number (without 0x)

  • Type 4465 and press enter

Find Service Menu

Then ACK received for both eventgroup 0X4425 and 0X4465 and also Notification events receives for every 5 seconds

Find Service Menu

Read data by Event ID

  • Note : If we need to access the event ID, like read or write, first we need to subscribe to the eventgroup of those event IDs.

  • To get the value of particular event ID in server side we need to choose the read data by Event ID.

  • Type 2 and press enter

  • Then it will ask “Please enter the Service id to read in hex”

  • Type 1234 and press enter

  • After enter service ID, it will ask event ID “Please enter the event id to read in hex”

  • Now enter the event ID given in the above list of read event ID to read. (eg. 8776)

  • Then the server will response with reading value for given event id.(vehicle speed value displayed)

Read data by event ID

Write data by Event ID

  • Note : If we need to access the event ID, like read or write, first we need to subscribe to the eventgroup of those event IDs.

  • To write the value of particular event ID in server side we need to choose the write data by Event ID.

  • Type 3 and press enter

  • Then it will ask “Please enter the Service id to read in hex”

  • Type 1234 and press enter

  • After enter service ID, it will ask event ID “Please enter the event id to read in hex”

  • Now enter the event ID given in the above list of read event ID to read. (eg. 8776)

  • Then it ask to enter value to write “Enter the Speed value to write”

  • Now enter the value to write on respective event id on server side. (eg. 40 or 50 or 70)

  • Then the server will sent positive response after written the given value on give Event id.

Write data by event ID

Stop subscribe eventgroup

  • To stop subscribe eventgroup, we need to choose stop subscribe eventgroup menu

  • Type 4 and press enter

  • After select the menu, the subscribed eventgroup list are shown. we have to which eventgroup need to unsubscribe.like below

    • Enter the Service ID, instance ID , Eventgrp ID in hex format with space to unsubscribe

    • 1, service ID - 0x1234 , Instance ID - 0x5678 , Eventgrp ID - 0x4425

    • 2, service ID - 0x1234 , Instance ID - 0x5678 , Eventgrp ID - 0x4465

  • If Event group ID 4425 need to unsubscribe,

  • Type 1234 and press enter, type 5678 and press enter, type 4425 and press enter

  • stop subscription request for corresponding eventgroup ID will send to server.

  • After that we did not received notification events from those eventgroup’s event ID

Stop Subscribe Eventgroup Request
  • After unsubscribing the eventgroup, if we try to read the value from the event ID of the unsubscribed eventgroup,.

  • It will response as “The given Event ID’s 0x8777 eventgroup not subscribed so unable to send request” like below

Unsubscribe event ID read request