1、BS ISO 17987-2:2016Road vehicles LocalInterconnect Network (LIN)Part 2: Transport protocol and networklayer servicesBSI Standards PublicationWB11885_BSI_StandardCovs_2013_AW.indd 1 15/05/2013 15:06BS ISO 17987-2:2016 BRITISH STANDARDNational forewordThis British Standard is the UK implementation of
2、ISO 17987-2:2016.The UK participation in its preparation was entrusted to TechnicalCommittee AUE/16, Data Communication (Road Vehicles).A list of organizations represented on this committee can beobtained on request to its secretary.This publication does not purport to include all the necessaryprovi
3、sions of a contract. Users are responsible for its correctapplication. The British Standards Institution 2016. Published by BSI StandardsLimited 2016ISBN 978 0 580 81729 8ICS 35.240.60; 43.040.15Compliance with a British Standard cannot confer immunity fromlegal obligations.This British Standard was
4、 published under the authority of theStandards Policy and Strategy Committee on 31 August 2016.Amendments issued since publicationDate Text affectedBS ISO 17987-2:2016 ISO 2016Road vehicles Local Interconnect Network (LIN) Part 2: Transport protocol and network layer servicesVhicules routiers Rseau
5、Internet local (LIN) Partie 2: Protocole de transport et couches de services rseauINTERNATIONAL STANDARDISO17987-2First edition2016-08-15Reference numberISO 17987-2:2016(E)BS ISO 17987-2:2016ISO 17987-2:2016(E)ii ISO 2016 All rights reservedCOPYRIGHT PROTECTED DOCUMENT ISO 2016, Published in Switzer
6、landAll rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized otherwise in any form or by any means, electronic or mechanical, including photocopying, or posting on the internet or an intranet, without prior written permission. Permission can be reque
7、sted from either ISO at the address below or ISOs member body in the country of the requester.ISO copyright officeCh. de Blandonnet 8 CP 401CH-1214 Vernier, Geneva, SwitzerlandTel. +41 22 749 01 11Fax +41 22 749 09 47copyrightiso.orgwww.iso.orgBS ISO 17987-2:2016ISO 17987-2:2016(E)Foreword viIntrodu
8、ction vii1 Scope . 12 Normative references 23 Terms, definitions, symbols and abbreviated terms . 23.1 Terms and definitions . 23.2 Symbols . 43.3 Abbreviated terms . 44 Conventions . 55 Network management 55.1 Network management general information 55.2 LIN node communication state diagram 55.3 Wak
9、e up . 65.3.1 Wake up general information . 65.3.2 Master generated wake up 65.3.3 Slave generated wake up . 65.4 Go-to-sleep . 86 Network layer overview 86.1 General . 86.2 Format description of network layer services . 96.3 Internal operation of network layer . 96.4 Service data unit specification
10、 106.4.1 N_AI, address information 106.4.2 116.4.3 116.4.4 . 116.5 Services provided by network layer to higher layers .126.5.1 Specification of network layer service primitives 126.5.2 N_USData.request .136.5.3 N_USData.confirm 136.5.4 N_USData_FF.indication 136.5.5 N_USData.indication 137 Transpor
11、t layer protocol .147.1 Protocol functions . 147.2 Single frame transmission 147.3 Multiple frame transmission 147.4 Transport layer protocol data units . 167.4.1 Protocol data unit types 167.4.2 SF N_PDU . 167.4.3 FF N_PDU . 167.4.4 CF N_PDU . 167.4.5 Protocol data unit field description 167.5 Prot
12、ocol control information specification . 177.5.1 N_PCI . 177.5.2 SingleFrame N_PCI parameter definition 187.5.3 FirstFrame N_PCI parameter definition 197.5.4 ConsecutiveFrame N_PCI parameter definition .197.6 Network layer timing 207.6.1 Timing constraints 207.6.2 Network layer timeouts 257.6.3 Netw
13、ork layer error handling 257.6.4 Unexpected arrival of N_PDU . 26 ISO 2016 All rights reserved iiiContents PageBS ISO 17987-2:2016ISO 17987-2:2016(E)8 Data link layer usage .278.1 Data link layer service parameters . 288.2 Data link layer interface services . 288.2.1 L_Data.request 288.2.2 L_Data.co
14、nfirm 288.2.3 L_Data.indication 288.3 Mapping of the N_PDU fields 288.4 Transport layer PDU structure and communication .298.4.1 PDU structure 298.4.2 Communication 319 Diagnostic communication requirements 319.1 Definition of diagnostic classes . 319.1.1 General. 319.1.2 Diagnostic class I .319.1.3
15、 Diagnostic class II .319.1.4 Diagnostic class III .319.1.5 Summary of slave node diagnostic classes .329.2 Diagnostic messages . 329.3 Using the transport layer 329.4 Slave node diagnostic timing requirements . 349.5 Response pending . 369.6 Transport protocol handling in LIN master 369.6.1 General
16、. 369.6.2 Diagnostic master request schedule 369.6.3 Diagnostic slave response schedule .379.6.4 Diagnostic schedule execution 379.7 Transmission handler requirements 429.7.1 General. 429.7.2 Master node transmission handler .429.7.3 Slave node transmission handler 469.8 Diagnostic service prioritiz
17、ation 4810 LIN node capability language (NCL) 4810.1 General 4810.2 Plug and play workflow concept. 4910.2.1 General. 4910.2.2 LIN node generation 5010.2.3 LIN cluster design 5010.2.4 Debugging . 5111 Node capability file (NCF) 5111.1 Overview of NCF syntax . 5111.2 Global structure definition 5111.
18、2.1 Node capability file marker . 5111.2.2 Language version number definition 5211.2.3 NCF revision 5211.2.4 Big-endian signal encoding variant 5211.3 Node definition 5211.3.1 General node definition 5211.3.2 Diagnostic definition .5311.3.3 Frame definition 5411.3.4 Signal encoding type definition 5
19、511.3.5 Status management 5611.3.6 Free text definition 5611.4 NCF example 5612 LIN description file (LDF) .5712.1 General 5712.2 Overview of LDF syntax . 57iv ISO 2016 All rights reservedBS ISO 17987-2:2016ISO 17987-2:2016(E)12.3 LDF definition . 5812.3.1 Global structure definition . 5812.3.2 Sign
20、al definition .5912.3.3 Frame definition 6012.3.4 Node definition .6212.3.5 Schedule table definition . 6512.3.6 Signal encoding type definition 6712.3.7 Signal representation definition 6912.4 LDF example . 69Bibliography .72 ISO 2016 All rights reserved vBS ISO 17987-2:2016ISO 17987-2:2016(E)Forew
21、ordISO (the International Organization for Standardization) is a worldwide federation of national standards bodies (ISO member bodies). The work of preparing International Standards is normally carried out through ISO technical committees. Each member body interested in a subject for which a technic
22、al committee has been established has the right to be represented on that committee. International organizations, governmental and non-governmental, in liaison with ISO, also take part in the work. ISO collaborates closely with the International Electrotechnical Commission (IEC) on all matters of el
23、ectrotechnical standardization.The procedures used to develop this document and those intended for its further maintenance are described in the ISO/IEC Directives, Part 1. In particular the different approval criteria needed for the different types of ISO documents should be noted. This document was
24、 drafted in accordance with the editorial rules of the ISO/IEC Directives, Part 2 (see www.iso.org/directives).Attention is drawn to the possibility that some of the elements of this document may be the subject of patent rights. ISO shall not be held responsible for identifying any or all such paten
25、t rights. Details of any patent rights identified during the development of the document will be in the Introduction and/or on the ISO list of patent declarations received (see www.iso.org/patents).Any trade name used in this document is information given for the convenience of users and does not co
26、nstitute an endorsement.For an explanation on the meaning of ISO specific terms and expressions related to conformity assessment, as well as information about ISOs adherence to the World Trade Organization (WTO) principles in the Technical Barriers to Trade (TBT) see the following URL: www.iso.org/i
27、so/foreword.html.The committee responsible for this document is ISO/TC 22, Road vehicles, SC 31, Data communication.A list of all parts in the ISO 17987 series can be found on the ISO website.vi ISO 2016 All rights reservedBS ISO 17987-2:2016ISO 17987-2:2016(E)IntroductionThis ISO 17987 (all parts)
28、specifies the use cases, the communication protocol and physical layer requirements of an in-vehicle communication network called Local Interconnect Network (LIN).The LIN protocol as proposed is an automotive focused low speed universal asynchronous receiver transmitter (UART) based network. Some of
29、 the key characteristics of the LIN protocol are signal based communication, schedule table based frame transfer, master/slave communication with error detection, node configuration and diagnostic service transportation.The LIN protocol is for low cost automotive control applications, for example, d
30、oor module and air condition systems. It serves as a communication infrastructure for low-speed control applications in vehicles by providing: signal based communication to exchange information between applications in different nodes; bitrate support from 1 kbit/s to 20 kbit/s; deterministic schedul
31、e table based frame communication; network management that wakes up and puts the LIN cluster into sleep mode in a controlled manner; status management that provides error handling and error signalling; transport layer that allows large amount of data to be transported (such as diagnostic services);
32、specification of how to handle diagnostic services; electrical physical layer specifications; node description language describing properties of slave nodes; network description file describing behaviour of communication; application programmers interface.ISO 17987 (all parts) is based on the open s
33、ystems interconnection (OSI) basic reference model as specified in ISO/IEC 7498-1 which structures communication systems into seven layers.The OSI model structures data communication into seven layers called (top down) application layer (layer 7), presentation layer, session layer, transport layer,
34、network layer, data link layer and physical layer (layer 1). A subset of these layers is used in ISO 17987 (all parts).ISO 17987 (all parts) distinguishes between the services provided by a layer to the layer above it and the protocol used by the layer to send a message between the peer entities of
35、that layer. The reason for this distinction is to make the services, especially the application layer services and the transport layer services, reusable also for other types of networks than LIN. In this way, the protocol is hidden from the service user and it is possible to change the protocol if
36、special system requirements demand it.ISO 17987 (all parts) provides all documents and references required to support the implementation of the requirements related to the following. ISO 17987-1: This part provides an overview of the ISO 17987 (all parts) and structure along with the use case defini
37、tions and a common set of resources (definitions, references) for use by all subsequent parts. ISO 17987-2: This part specifies the requirements related to the transport protocol and the network layer requirements to transport the PDU of a message between LIN nodes. ISO 17987-3: This part specifies
38、the requirements for implementations of the LIN protocol on the logical level of abstraction. Hardware related properties are hidden in the defined constraints. ISO 2016 All rights reserved viiBS ISO 17987-2:2016ISO 17987-2:2016(E) ISO 17987-4: This part specifies the requirements for implementation
39、s of active hardware components which are necessary to interconnect the protocol implementation. ISO/TR 17987-5: This part specifies the LIN application programmers interface (API) and the node configuration and identification services. The node configuration and identification services are specifie
40、d in the API and define how a slave node is configured and how a slave node uses the identification service. ISO 17987-6: This part specifies tests to check the conformance of the LIN protocol implementation according to ISO 17987-2 and ISO 17987-3. This comprises tests for the data link layer, the
41、network layer and the transport layer. ISO 17987-7: This part specifies tests to check the conformance of the LIN electrical physical layer implementation (logical level of abstraction) according to ISO 17987-4.viii ISO 2016 All rights reservedBS ISO 17987-2:2016INTERNATIONAL STANDARD ISO 17987-2:20
42、16(E)Road vehicles Local Interconnect Network (LIN) Part 2: Transport protocol and network layer services1 ScopeThis document specifies a transport protocol and network layer services tailored to meet the requirements of LIN-based vehicle network systems on local interconnect networks. The protocol
43、specifies an unconfirmed communication.The LIN protocol supports the standardized service primitive interface as specified in ISO 14229-2.This document provides the transport protocol and network layer services to support different application layer implementations like normal communication messages
44、, and diagnostic communication messages.The transport layer defines transportation of data that is contained in one or more frames. The transport layer messages are transported by diagnostic frames. A standardized API is specified for the transport layer.Use of the transport layer is targeting syste
45、ms where diagnostics are performed on the backbone bus (e.g. CAN) and where the system builder wants to use the same diagnostic capabilities on the LIN sub-bus clusters. The messages are in fact identical to the ISO 15765-2 and the PDUs carrying the messages are very similar.The goals of the transpo
46、rt layer are low load on LIN master node, to provide full (or a subset thereof) diagnostics directly on the LIN slave nodes, and targeting clusters built with powerful LIN nodes (not the mainstream low cost).A typical system configuration is shown in Figure 1. ISO 2016 All rights reserved 1BS ISO 17
47、987-2:2016ISO 17987-2:2016(E)Figure 1 Typical system setup for a LIN cluster using the transport layer2 Normative referencesThe following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the ed
48、ition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.ISO 14229-1, Road vehicles Unified diagnostic services (UDS) Part 1: Specification and requirementsISO 14229-2, Road vehicles Unified diagnostic services (UDS) Part 2: Sessio
49、n layer servicesISO 14229-7:2015, Road vehicles Unified diagnostic services (UDS) Part 7: UDS on local interconnect network (UDSonLIN)ISO 17987-3:2016, Road vehicles Local Interconnect Network (LIN) Part 3: Protocol specification3 Terms, definitions, symbols and abbreviated terms3.1 Terms and definitionsFor the purposes of this document, the terms and definitions given in ISO/IEC 7498-1 and the following apply.ISO and IEC maintain terminological databases for use in standardization at the following a