ISO 9141-2 and ISO 14230-2 INITIALIZATION and DATA TRANSFER
http://ecad.tu-sofia.bg/et/2005/pdf/Paper097-P_Dzhelekarski1.pdf
INITIALIZATION
Prior to any diagnostic communication an initialization must be performed.
This is the process of activating the OBD system for starting communication.
The initialization can be started after an idle-time on the bus.
Two types of initialization can be used:
5-baud and fast initialization.
ISO 9141-2 supports only 5-baud initialization,
whereas ISO 14230-2 supports both types.
5-BAUD (CARB) INITIALIZATION
This initialization starts with sending of 5-baud address byte from the tester (client) to the OBD system (server).
If L-line exists, the address byte must be sent simultaneously on both K & L-lines, otherwise it should be sent only on K-line.
The address byte contains the functional address of the OBD system.
This is implemented in two ways in initSlow() method.
In K&L initialization, both lines are driven by simultaneous setting/clearing of RTS and TxD according to the bit values of the address byte:
this is computed 5-baud init. A system timer for 200 ms (5-baud bit time) is used.
For K-only initialization the port is configured at 5 baud rate; the address byte is sent; 2000 ms pause follows; baud rate is restored to 10,400 baud.
Fig. 3 shows the format of the 5-baud initialization. The server returns baud rate synchronization pattern ($55)
(standard baud rate 10,4 kbit/s, other rate is manufacturer specific). All subsequent communications are using this baud rate.
After sending the pattern, the server sends two keywords (KW) which carry information about the form of the subsequent serial communications.
From these keywords the tester identifies the diagnostic protocol to be used, ISO 14230-2 or ISO 9141-2.
After that the client confirms with sending logical inversion of keyword 2.
Then the server confirms with logical inversion of the address byte.
From this time on the communication link is established and the tester can start to request diagnostic data.
FAST INITIALIZATION
The fast initialization begins with wake-up pattern (WuP), transmitted by the tester simultaneously on K and L lines
(if provided L line is used, otherwise transmitted only on K-line) – see Fig. 4.
This is implemented in initFast() method by setting the TxD and RTS , followed by waiting for TiniL time interval and clearing of these signals.
After the time TWuP has elapsed the client sends StartComminication message request.
This message uses functional addressing and contains the target address of the OBD system and the source address of the tester.
The server responds with StartCommunication positive response(s), which contains the keywords.
DATA TRANSFER
After the communication link has been established, the tester can send request messages
and receive message response(s) from the ECU(s) of the OBD system (see Fig. 5).
This is referred to as data transfer and is performed by the transfer() method.
The transfer timing is very important and is determined by the periods P1…P4 with specified maximal and minimal allowable values.
The timing is implemented by using system timer for wait function and by using communication read timeouts.
In this way it is possible to group received response bytes into messages, based on separation period P2.
The period P3max has value of 5000 ms. After that time the communication link is automatically terminated by the server.
Therefore, to keep connection alive the tester must send periodically request messages.
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本