home *** CD-ROM | disk | FTP | other *** search
/ DEFCON 12 / DEFCON_12_CD-ROM_2004.iso / Nothingface / doc / articlenetworks.txt < prev    next >
Text File  |  2004-07-08  |  10KB  |  204 lines

  1. Automotive On-Board Networks
  2.  
  3. Nothingface <alpha@area49.net>
  4.  
  5. 2004.5.11
  6.  
  7. Late model automobiles contain a considerable amount of 
  8. electronic equipment compared with vehicles in the 
  9. past. Although some of these electronic devices are 
  10. user visible appliances, such as entertainment and 
  11. navigation systems, many are devices under the hood 
  12. including controllers for fuel injection, anti-lock 
  13. brakes, and airbags. The number of devices used, as 
  14. well as the sophistication, versatility, and 
  15. programmability of the devices is continually 
  16. increasing. Not surprisingly, these devices are also 
  17. networked, allowing them to communicate with each other 
  18. and with additional equipment outside the vehicle for 
  19. diagnostics and configuration.
  20.  
  21. Automotive electronic devices enable the logging of 
  22. vehicle sensor data, particularly in the event of an 
  23. accident or a near miss. Little information about these 
  24. logging devices is readily available, because those 
  25. with the information (vehicle and aftermarket tool 
  26. manufacturers) are making an effort to keep the 
  27. information difficult for the public to obtain. (I was 
  28. personally denied membership in the only discussion 
  29. group I am aware of on this subject because I am not 
  30. law enforcement, I do not own a $2500 tool for 
  31. downloading this information, and I was not nominated 
  32. by members of the group.) The primary interest in this 
  33. information is law enforcement for forensic analysis of 
  34. an accident scene. Since few realize that this 
  35. information is recorded, an officer could easily 
  36. connect a device and download a vehicle's crash 
  37. information without the driver's permission or 
  38. knowledge. This could be done either at the scene of an 
  39. accident, while the driver is distracted, or afterwards 
  40. when the vehicle is at a repair shop that is not likely 
  41. to be concerned about the driver's privacy.
  42.  
  43. The need for electronic devices on an automobile arose, 
  44. at least in part (in the U.S.), from federal law. 
  45. Citing environmental concerns, the federal government 
  46. mandated certain fuel efficiency standards that 
  47. necessitated electronic control. The first regulation 
  48. was known as On-Board Diagnostics (OBD). OBD required a 
  49. few basic sensors and diagnostic procedures, but did 
  50. not standardize the interface. A standard interface was 
  51. introduced with On-Board Diagnostics II (OBD2 in this 
  52. article, elsewhere abbreviated as OBD II or OBDII). 
  53. OBD2 was mandated for all automobiles sold in the 
  54. United States from 1996 onward. The majority of the 
  55. OBD2 specifications were written by the Society of 
  56. Automotive Engineers (SAE), with one notable exception 
  57. written by ISO. The OBD2 standard covers all the 
  58. details necessary to make interoperable equipment that 
  59. complies with the federal regulations. OBD2 covers much 
  60. more than the minimal "emissions control" functionality 
  61. necessary to meet federal regulations.
  62.  
  63. The OBD2 specification is primarily concerned with the 
  64. communications among on-board devices and between 
  65. on-board and off-board devices. OBD2 specifies a single 
  66. physical interface connector, called the diagnostic 
  67. link connector (DLC), with 16 pins (in two rows of 8), 
  68. located on the driver's side of a vehicle. OBD2 
  69. specifies three data link layers, any one of which is 
  70. required to be present in a vehicle. Two are specified 
  71. by SAE, and one is specified by the International 
  72. Organization for Standardization (ISO). The two SAE 
  73. data link layers are variable pulse-width modulation 
  74. (VPW) and pulse width modulation (PWM). The ISO data 
  75. link layer is generally called "ISO format", as it is the 
  76. only significant portion of OBD2 to be specified by 
  77. ISO. The ISO format data link layer is conveniently 
  78. similar to RS-232, and many hobbyists have taken 
  79. advantage of that property. OBD2 specifies a network 
  80. layer, including network addresses and packet formats 
  81. for a variety of applications. The network layer is 
  82. shared by all data link layers (VPW, PWM, and ISO). All 
  83. of OBD2 up to the network layer is required by federal 
  84. regulations.
  85.  
  86. OBD2 also references the controller area network (CAN), 
  87. specified by Bosch and ISO, for other vehicle purposes. 
  88. The CAN physical layer is considerably faster than the 
  89. three OBD2 physical layers. It is most often used for 
  90. intravehicle communication between different control 
  91. modules. The DLC is specified to include a connection 
  92. to the CAN network. Vehicle manufacturers are likely to 
  93. provide expanded functionality on the CAN network as 
  94. opposed to one of the three OBD2 networks.
  95.  
  96. The OBD2 network layer specifies packet formats for 
  97. several functions. A few of these functions are 
  98. required by federal regulations. Since automobiles are 
  99. required to have a network for mandated purposes, many, 
  100. perhaps all, automobiles also use this network for 
  101. other purposes. Most common is the use of OBD2 for 
  102. additional diagnostic purposes beyond emission control. 
  103. Also common is the use of the network for uploading or 
  104. downloading arbitrary blocks of memory from on-board 
  105. devices. That memory can contain parameters for running 
  106. the vehicle, stored data from on-board sensors, or even 
  107. executable code for on-board microprocessors.
  108.  
  109. The most common use of OBD2 is to examine diagnostic 
  110. trouble codes (DTCs). A DTC is an error code that is 
  111. stored when a vehicle determines some abnormal 
  112. condition. The action of storing a DTC usually causes 
  113. the check engine light (in OBD2 terms, the malfunction 
  114. indicator lamp, MIL) to illuminate. Less critical 
  115. errors can cause a DTC to be stored without triggering 
  116. the MIL. A mechanic, using a device called a scan tool, 
  117. can read the DTCs from the vehicle, decode the DTC 
  118. meaning, and use that information to fix the vehicle. 
  119. The scan tool also allows a user to clear the stored 
  120. DTCs, which will cause the MIL, if illuminated, to shut 
  121. off. Obviously, if the problem with the vehicle is not 
  122. fixed, the DTC will be triggered again. Depending on 
  123. the DTC that was triggered, freeze frame data can also 
  124. be stored. Freeze frame data contains values from 
  125. relevant vehicle sensors at the time the DTC was 
  126. stored. Another common use of OBD2 is to provide 
  127. additional diagnostic information. Data from vehicle 
  128. sensors can be queried continuously and reported. 
  129. Vehicle subsystems can be requested to perform a self 
  130. test procedure and report the results.
  131.  
  132. Beyond the diagnostic capabilities of OBD2, many 
  133. configuration tasks can be done over the network. 
  134. Anti-theft systems that require a key (physical or 
  135. electronic) can be programmed over OBD2. Advanced 
  136. vehicle subsystems, such as electronic traction control 
  137. or tunable air suspensions, can be calibrated over 
  138. OBD2. Electronic fuel injection was one early use of 
  139. electronic control, and a substantial aftermarket 
  140. exists for reprogramming the engine management 
  141. computer, typically to achieve higher output power. The 
  142. aftermarket product takes the form of a device to 
  143. connect via the DTC that programs the engine management 
  144. computer, or a replacement memory chip that directly 
  145. replaces the chip in the engine. Sometimes the 
  146. aftermarket programming device will configure other 
  147. parameters, such as calibrating the speedometer and 
  148. odometer for different sized tires.
  149.  
  150. Another use of OBD2, which is not specified by SAE, and 
  151. has been keep fairly quiet by the automotive 
  152. manufacturers, is the crash data recorder (CDR). The 
  153. CDR is part of the air bag sensor and deployment 
  154. system. The CDR stores information relating to what is 
  155. called a "deployment event", a condition that causes the 
  156. air bag to inflate, or deploy. The CDR may store 
  157. information about a non-deployment event and a 
  158. re-deployment event. A non-deployment event is 
  159. basically a near miss that the CDR determined to be 
  160. significant. A re-deployment event is an event after 
  161. the air bag deployed, and is a bit of a misnomer since 
  162. current generation air bag cannot deploy more than 
  163. once. The information stored can include speed of the 
  164. vehicle, state of the brake and throttle, and status of 
  165. the driver's seat belt.
  166.  
  167. There has been some speculation about the next 
  168. generation of OBD, so called OBD3. The government is 
  169. likely to mandate more substantial emissions control 
  170. devices and procedures. A CDR is not currently required 
  171. by law, but may be in the future. In the name of 
  172. convenience to the vehicle owner, the government may 
  173. mandate a system that continually reports vehicle 
  174. operating status in lieu of yearly inspections. Very 
  175. little is known concretely about OBD3, but for those 
  176. who do not trust that the government will always 
  177. mandate what is best for its citizens, it would be wise 
  178. to be aware and involved before unacceptable laws get 
  179. passed, rather than after.
  180.  
  181. The information and functionality available on a modern 
  182. automobile via electronic networks is considerable. 
  183. Though there are some standards in place for these 
  184. networks, many critical pieces are not standardized. 
  185. The majority of vehicle owners are effectively 
  186. prevented from accessing this information on their own 
  187. vehicles due to the exorbitant costs of compatible 
  188. equipment and the unwillingness of manufacturers to 
  189. provide specifications on reasonable terms. The 
  190. inaccessibility of this information prevents casual 
  191. mechanics from easily working on their vehicles, as 
  192. well as preventing concerned citizens from determining 
  193. exactly what information their vehicle is storing about 
  194. them. There is a lot to technically and 
  195. sociopolitically explore to be able to pop open the 
  196. electronic information in a vehicle as easily as one 
  197. can pop the hood.
  198.  
  199.   Further Reading
  200.  
  201. On-Board Diagnostics for Light and Medium Duty Vehicles 
  202. Standards Manual, SAE HS-3000. Society of Automotive 
  203. Engineers, Inc. http://www.sae.org
  204.