1 DoIP规范
13400-1:DoIP协议基础
13400-2:DoIP 3/4层
13400-3:DoIP 1/2层
13400-4:DoIP引脚定义
14229-2:UDS5层
14229-5:UDS7层
https://www.iso.org/standards.html
13400表示DoIP TCP服务器端监听的端口号是13400,或者UDP发送的IPv4广播报文的端口号是13400。
2 OBD-Ethernet诊断口
16 PIN OBD接口
PIN3:ETH RX+
PIN11:ETH RX-
PIN12:ETH TX+
PIN13:ETH TX-
PIN8:ETH Activation Line,使能网关的以太网诊断功能
PIN6:CAN+
PIN14:CAN-
3 基本概念
VIN:V码
EID:Entity Identification,一般使用以太网卡的MAC地址
GID:Logical address of the GW,一般使用以太网卡的MAC地址
4 协议
每个请求后,对方首先回ACK或者NAK,然后对方才发送真正的Response。GW需要对DoIP测试仪发送的报文做SNAT转换。
5 socat
socat -t100 -x -v UNIX-LISTEN:/dev/socket/sock.socat,mode=777,reuseaddr,fork UNIX-CONNECT:/dev/socket/sock 2>/data/my_socket.log &
/dev/socket/sock is created by Android deamon
/dev/socket/sock.socat is created by socat
Framework or client APPs connect to /dev/socket/sock.socat
-t
-x verbose data traffic, hexadecimal
-v verbose data traffic, text
6 Abbreviations
DoIP:读作du ip
UDS:Unified Diagnostic Services,统一诊断服务