CAN-BUS sniffing for Volkswagen Golf MK7 (and most likely other MQB platform cars). Currently this is more a work log for future reference.

常用车辆CAN总线通讯协议,大多直接采用SAE-J1939的形式制定。电动汽车首先遇到了电池系统,电机系统等新加入电气需要重新设定PGN码等问题。CAN协议始终处在诸侯割据的状态。在过去的几年中,国家及相关机构也一直在对电动汽车的CAN通讯协议进行研究,希望形成统一的协议体系。统一的CAN协议,首先是零部件供应商的福音。当前主流主机厂,每家都有自己的整车通讯协议,各个供应商,需要根据整车厂的定义,修改零部件的CAN协议。

制定电动汽车的CAN协议,基本的思路是在SAE-J1939的基础上,根据自身电动汽车的需求,做出必要的调整。

ISO 11898-2003 download

星期二, 30 11月 2021 11898
download
Big-Endian和Little-Endian的定义如下:
1) Little-Endian就是低位字节排放在内存的低地址端,高位字节排放在内存的高地址端。
2) Big-Endian就是高位字节排放在内存的低地址端,低位字节排放在内存的高地址端

NXP S32K146 Evaluation Board

星期五, 19 11月 2021 NXP
NXP S32K146 Evaluation Board

ISO 15765-2协议-寻址方式

星期三, 13 10月 2021 J15765

网络层数据的交换支持三种寻址方式:

1.Normal addressing

2.Extended addressing

3.Mixed addressing

每一种寻址格式都需要不同数量的CAN帧数据字节来封装与要交换的数据相关的寻址信息。用户对于单个CAN帧内传输的数据字节数取决于所选寻址格式的类型。

Network layer
7 Network Iayer interface
8.Standardized diagnostic CAN identifiers
Addressing formats 

The exchange of network layer data is supported by three addressing formats: normal, extended and mixed addressing. Each addressing format requires a different number of CAN frame data bytes to encapsulate the addressing information associated with the data to be exchanged. Consequently, the number of data bytes transported within a single CAN frame depends on the type of addressing format chosen.

The following (7.3.2 to 7.3.5) specifies the mapping mechanisms for each addressing format, based on the data link layer services and service parameters defined in ISO 11898-1.

ISO 15765-2

星期六, 09 10月 2021 J15765

Road vehicles — Diagnostics on Controller Area Networks (CAN) —

Part 2:Network layer services : ISO 15765-2:2004(E)