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

Client Service Details Information

Supported Service Information

Service ID

Instance ID

TTL

Major Ver

Minor Ver

0x1234

0x5678

15

1

0

0x1234

0x5678

26

2

5

0x1235

0x5679

17

1

0

0x1234

0x5678

10

4

4

0x1235

0x5678

30

1

0

Client Eventgroup Details Information

Supported Service Details

Service ID

Instance ID

Eventgroup

Multicast Port

0x1234

0x5678

0x4425

35689

0x1234

0x5678

0x4426

0

0x1234

0x5678

0x4425

35689

0x1234

0x5678

0x4426

35689

0x1235

0x5679

0x4425

0

0x1235

0x5678

0x4425

0

0x1235

0x5678

0x4425

0

Client Event Information

Supported Event Information

Service ID

Instance ID

Major Version

Eventgroup ID

Event ID

0x1234

0x5678

1

0x4425

0x8001

0x1234

0x5678

1

0x4425

0x8002

0x1234

0x5678

1

0x4425

0x8003

0x1234

0x5678

1

0x4426

0x8004

0x1234

0x5678

1

0x4426

0x8005

0x1234

0x5678

1

0x4426

0x8006

0x1234

0x5678

2

0x4425

0x8007

0x1234

0x5678

2

0x4425

0x8008

0x1234

0x5678

2

0x4426

0x8009

0x1235

0x5679

1

0x4425

0x800A

0x1235

0x5679

1

0x4425

0x800B

0x1234

0x5678

4

0x4425

0x800C

0x1235

0x5678

1

0x4425

0x800D

0x1235

0x5678

1

0x4425

0x800E

Client Event Data Information

Supported Event Data Details

Event ID

User Data Type

Description

0x8001

uint8

Wheel Slip Status

0x8002

uint16

Speed Data

0x8003

uint32

RPM Data

0x8004

int8

Engine State

0x8005

int16

Steering Data

0x8006

int32

Yaw State

0x8007

One-D Array

Peak Vol Current

0x8008

One Dimensional Array

State of charge

0x8009

Multi Dimensional Array

Battery Heat Grid

0x800A

One Dimensional Array

ota state message

0x800B

One Dimensional Array

ota error message

0x800C

Structure (float …, float .., uint32_t .., uint32_t …)

Vehicle Pos Event data (latitude, longitude, speed, heading_direction)

0x800D

union (uint8_t, uint16_t, uint32_t)

Diag Payload Data 1 (status_flags, error_type, fault_code)

0x800E

union (uint8_t, uint16_t, uint32_t)

Diag Payload Data 2 (status_flags, error_type, fault_code)

Read data by Method ID services:

Read (Getter) data by method id

Event ID

Method ID in hex

0x8001

11

0x8002

12

0x8003

13

0x8004

14

0x8005

15

0x8006

16

0x8007

17

0x8008

18

0x8009

19

0x800A

1A

0x800B

1B

0x800C

1C

0x800D

1D

0x800E

1E

Write data by Method ID services:

Write(Setter) data by method id

Event ID

Method ID in hex

0x8001

01

0x8002

02

0x8003

03

0x8004

04

0x8005

05

0x8006

06

0x8007

07

0x8008

08

0x8009

09

0x800A

0A

0x800B

0B

0x800C

0C

0x800D

0D

0x800E

0E

SOME/IP Client Running Example

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

User Configuration for Client (IPV4)

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

SOMEIP Client ID in Hex value without hex

1234

SOME/IP client Discovery Multicast Addr(224.0.0.0 - 239.255.255.255)

224.0.0.0

SOME/IP client initial delay (ms)

500

SOME/IP client repetition base delay (ms)

200

SOME/IP client repetitions maximum

5

SOME/IP client log level in hex without(0x)

1

Server Menu

User Configuration for Client (IPV6)

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

SOMEIP Client ID in Hex value without hex

1234

SOME/IP Service Discovery Multicast Addr( FF00:0000:0000:0000:0000:0000:0000:0000 to FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF)

FF05:0000:0000:0000:0000:0000:0000:0000

SOME/IP client initial delay (ms)

500

SOME/IP client repetition base delay (ms)

200

SOME/IP client repetitions maximum

5

SOME/IP client log level in hex without(0x)

1

Server Menu
  • 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

  • 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

SOME/IP Client Menu:

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.

  • Based on the client service details provided, find the service to get framed and send it to the configured service discovery multicast address with an initial delay in milliseconds.

  • In between the server sending any offer, the client receives the offer service and frames the subscribe event group message with corresponding service details and sends the subscribe event group service request to the server.

Read data by Method ID

  • To get the value of a particular method ID on the server side, we need to choose to read data by method 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 entering the service ID, it will ask for the instance ID: “Please enter the instance ID to read in hex.”

  • Type 5678 and press enter.

  • Now enter the method ID; it will ask for the method ID, “Please enter the method ID to read in hex.”

  • Type 11 and press enter.

  • Then the server will respond with the reading value for the given method ID. (wheel slip value displayed)

Read data by event ID

Write data by Method ID

  • To write the value of a particular method ID on the server side, we need to choose to write data by method 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 entering the service ID, it will ask for the event ID: “Please enter the instance ID to read in hex.”

  • Type 5678 and press enter.

  • Now enter the method ID; it will ask for the event ID: “Please enter the method ID to read in hex.”

  • Type 1 and press enter.

  • Now enter the event ID in hex to read. (e.g., 8001)

  • Then it will ask to select the request type. ‘1’ for request with return response, ‘2’ for fire-and-forget mode.

  • Type 1 and press enter.

  • Then it asks to enter a value to write “Enter the Wheel Slip value to write,” i.e., corresponding data of event ID 0x8001.

  • Now enter the value to write on the respective event ID on the server side. (e.g., 0 or 1 or 3)

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

  • Based on the client service details we have provided, stop subscription get framed and send to the configured service discovery multicast address with initial delay in milliseconds.

  • Refer to the SOME/IP protocol page for more details SOME/IP Protocol