SAE-J1939 Demo

The J1939 demo utilizes the J1939 protocol stack APIs, showcasing example use cases such as CAN bus communication, diagnostic services, and real-time data exchange between ECUs. This demo supports key J1939 features, including PGN-based message handling, network management, and multiple message handling (BAM, RTS/CTS, and request/response).

This J1939 demo will simulate a J1939 network where ECU1(0x90) and ECU2(0xFE) are communicating with each other via the cluster(0xFA). The user interface will display both ECUs and their respective messages to simulate the communication process.

Following CAN ID are available in the example:

Example J1939 DBC CAN-ID’s for cluster

CAN_ID

PGN

Data Bytes

Comment

18F021FE

F021

8

Engine speed sensor information

18FD15FE

FD15

8

Battery charger 1

18FDE5FE

FDE5

8

Maximum vehicle speed

18FE90FE

FE90

33

engine Torque history

18FEE9FE

FEE9

8

Fuel consuption(liquid)

18FEF2FE

FEF2

8

Fuel Economy (liquid)

1CFD19FE

FD19

200

Ignitor Loop information

1CFE91FE

FE91

8

Fuel Leakage

1CFEB0FE

FEB0

20

Trip time information 2

1CFEB4FE

FEB4

16

Trip time information 1

1CFEB7FE

FEB7

10

Engine speed/Load factor information

1CFEBCFE

FEBC

16

Compression/service brake information

Example J1939 DBC CAN-ID’s for ECU_1

CAN_ID

PGN

Data Bytes

Comment

18FD95FE

FD95

8

Transmission fluids 2

18FDE5FE

FDE5

8

Maximum vehicle speed

18FEE3FE

FEE3

39

Engine configuration 1

18FEFAFE

FEFA

8

Brakes

1CFD08FE

FD08

8

Engine oil message

1CFE9BFE

FE9B

8

Turbo charger information

1CFEB9FE

FEB9

22

Trip Fuel information Liquid

1CFEBAFE

FEBA

12

Trip Distance information

Example J1939 DBC CAN-ID’s for ECU_2

CAN_ID

PGN

Data Bytes

Comment

CFDE6FE

FDE6

8

Hydralic brake system

1CFEB4FE

FEB4

16

Trip time information 1

1CFEBCFE

FEBC

16

Compression/service brake information

18FD95FE

FD95

8

Transmission fluids 2

1CFE9BFE

FE9B

8

Turbo charger information

Following cluster DID’s are available in the example:

Example J1939 DID’s cluster signal Codes

CAN_ID

PGN

Data Bytes

Comment

DID

DID NAME

18F021FE

F021

8

Engine speed sensor information

FLINT_DATA_ID_MODEL_ENGINE_SPEED_SENSOR

292

18FD15FE

FD15

8

Battery charger 1

FLINT_DATA_ID_MODEL_BATTERYCHARGER

295

18FEE9FE

FEE9

8

Fuel consumption (liquid)

FLINT_DATA_ID_MODEL_ENGINETOTALFUELUSED

294

Following ECU1 DID’s are available in the example:

Example J1939 DID’s ECU1 signal Codes

CAN_ID

PGN

Data Bytes

Comment

DID

DID NAME

18FEFAFE

FEFA

8

Brakes

FLINT_DATA_ID_MODEL_BREAK_PRIMARY_PRESS

302

1CFD08FE

FD08

8

Engine oil message

FLINT_DATA_ID_MODEL_ENGINE_OIL

296

1CFE9BFE

FE9B

8

Turbo charger information

FLINT_DATA_ID_MODEL_ENGINE_TURBO_OIL_PRESS_2

316

Following ECU2 DID’s are available in the example:

Example J1939 DID’s ECU2 signal Codes

CAN_ID

PGN

Data Bytes

Comment

DID

DID NAME

1CFEB4FE

FEB4

16

Trip time information 1

FLINT_DATA_ID_MODEL_TRIP_TIMING_DERATE_BY_ENG

321

1CFEBCFE

FEBC

16

CBI Compression/service brake information

FLINT_DATA_ID_MODEL_TRIP_SERVICE_BRAKE_APPS

325

These are only example DID’s there are many examples DID’s which that are included in J1939-demo-app readme.txt

The user interface allows you to interact with the simulated ECUs (ECU1 and ECU2) and see the communication between them. The interface includes the following features:

Real-Time ECU Communication Simulation

This section describes how the user will interact with the system and monitor the communication between ECUs:

J1939 Stack

Supported target address for this j1939 example:

Example J1939 DID’s signal Codes

NAME

Target address

Cluster

0xFA

ECU1

0x90

ECU2

0xFE

Global address

0xFF

ECU1 (0x90) and ECU2 (0xFE) interact through a central Cluster (0xFA).

The demo allows users to select an ECU and initiate a request for a specific PGN (Parameter Group Number) to another ECU. The Cluster sends the selected ECU to request, and the other ECU responds in real time. This feature simulates real-world J1939 communication, enabling users to interact with the system, observe the request/response cycle.

J1939 Running Example

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

PGN-based Message Handling:

Users can interact with different Parameter Group Numbers (PGNs), which categorize various messages exchanged between ECUs.

Multiple Message Handling:

BAM (Broadcast Announce Message): Allows for the broadcasting of messages to multiple ECUs.

RTS/CTS (Request-to-Send/Clear-to-Send): Simulates the communication flow where one ECU requests permission to send a message, and the other ECU responds.

Request/Response: This feature demonstrates diagnostic communication between ECUs, where a request is sent, and the response includes diagnostic data.

Network Management:

Displays how ECU addressing, network status, and CAN message within a J1939 network.