<?xml version="1.0" encoding="iso-8859-1"?><!-- generator="b2evolution/3.3.2" -->
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>canbushack: Hack Your Car</title>
		<link>http://www.canbushack.com/blog/index.php</link>
		<atom:link rel="self" type="application/rss+xml" href="http://www.canbushack.com/blog/index.php?tempskin=_rss2" />
		<description>CAN BUS HACK</description>
		<language>en-US</language>
		<docs>http://blogs.law.harvard.edu/tech/rss</docs>
		<admin:generatorAgent rdf:resource="http://b2evolution.net/?v=3.3.2"/>
		<ttl>60</ttl>
				<item>
			<title>EVENTS: Black Hat Europe and Design West</title>
			<link>http://www.canbushack.com/blog/index.php?title=events-black-hat-europe-and-design-west&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1</link>
			<pubDate>Sat, 23 Feb 2013 17:01:28 +0000</pubDate>			<dc:creator>rleale</dc:creator>
			<category domain="main">CAN BUS</category>			<guid isPermaLink="false">69@http://www.canbushack.com/blog/</guid>
						<description>&lt;p&gt;If you're in Amsterdam March 14th stop by &lt;a title=&quot;Black Hat Europe&quot; href=&quot;http://www.blackhat.com/eu-13/&quot; target=&quot;_self&quot;&gt;Black Hat Europe&lt;/a&gt; and check out my 5+ hour Workshop:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Vehicle Networks: Vehicle Networks History (10 Minutes)&lt;/li&gt;
&lt;li&gt;Vehicle Networks: CAN Bus-History (10 Minutes)&lt;/li&gt;
&lt;li&gt;Vehicle Networks: CAN Bus-Physical Layer (30 Minutes)&lt;/li&gt;
&lt;li&gt;Activity: Create our Own CAN Bus (15 Minutes)&lt;/li&gt;
&lt;li&gt;Activity: Transmit Messages on CAN Bus (15 Minutes)&lt;/li&gt;
&lt;li&gt;Vehicle Networks: CAN Bus Frame (10 Minutes)&lt;/li&gt;
&lt;li&gt;Activity: Receive Messages on CAN Bus (30 Minutes)&lt;/li&gt;
&lt;li&gt;Activity: Reverse Engineer Controller Traffic (30 Minutes)&lt;/li&gt;
&lt;li&gt;Activity: DoS CAN Bus (15 Minutes)&lt;/li&gt;
&lt;li&gt;Diagnostics: Building a ISO 15765-2 Frame (30 Minutes)&lt;/li&gt;
&lt;li&gt;Activity: Fuzzing CAN Bus (30 Minutes)&lt;/li&gt;
&lt;li&gt;Security: Understanding Security Access (30 Minutes)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Or if you are in San Jose April 23rd, stop by &lt;a title=&quot;Design West&quot; href=&quot;https://www.blackhat.com/designwest/index.html&quot; target=&quot;_blank&quot;&gt;Design West&lt;/a&gt; and check out my one hour talk on Vehilce Network Denial of Service.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.canbushack.com/blog/index.php?title=events-black-hat-europe-and-design-west&amp;amp;more=1&amp;amp;c=1&amp;amp;tb=1&amp;amp;pb=1&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://canbushack.com/&quot;&gt;CanBusHack.com&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>If you're in Amsterdam March 14th stop by <a title="Black Hat Europe" href="http://www.blackhat.com/eu-13/" target="_self">Black Hat Europe</a> and check out my 5+ hour Workshop:</p>
<ul>
<li>Vehicle Networks: Vehicle Networks History (10 Minutes)</li>
<li>Vehicle Networks: CAN Bus-History (10 Minutes)</li>
<li>Vehicle Networks: CAN Bus-Physical Layer (30 Minutes)</li>
<li>Activity: Create our Own CAN Bus (15 Minutes)</li>
<li>Activity: Transmit Messages on CAN Bus (15 Minutes)</li>
<li>Vehicle Networks: CAN Bus Frame (10 Minutes)</li>
<li>Activity: Receive Messages on CAN Bus (30 Minutes)</li>
<li>Activity: Reverse Engineer Controller Traffic (30 Minutes)</li>
<li>Activity: DoS CAN Bus (15 Minutes)</li>
<li>Diagnostics: Building a ISO 15765-2 Frame (30 Minutes)</li>
<li>Activity: Fuzzing CAN Bus (30 Minutes)</li>
<li>Security: Understanding Security Access (30 Minutes)</li>
</ul>
<p>Or if you are in San Jose April 23rd, stop by <a title="Design West" href="https://www.blackhat.com/designwest/index.html" target="_blank">Design West</a> and check out my one hour talk on Vehilce Network Denial of Service.</p><div class="item_footer"><p><small><a href="http://www.canbushack.com/blog/index.php?title=events-black-hat-europe-and-design-west&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1">Original post</a> blogged on <a href="http://canbushack.com/">CanBusHack.com</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.canbushack.com/blog/index.php?title=events-black-hat-europe-and-design-west&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1#comments</comments>
			<wfw:commentRss>http://www.canbushack.com/blog/index.php?tempskin=_rss2&#38;disp=comments&#38;p=69</wfw:commentRss>
		</item>
				<item>
			<title>HOPE to See You There</title>
			<link>http://www.canbushack.com/blog/index.php?title=hope-to-see-you-there&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1</link>
			<pubDate>Mon, 18 Jun 2012 22:54:48 +0000</pubDate>			<dc:creator>rleale</dc:creator>
			<category domain="main">CAN BUS</category>			<guid isPermaLink="false">68@http://www.canbushack.com/blog/</guid>
						<description>&lt;p&gt;I will be doing a quick 1 hour presentation at this year&amp;#8217;s HOPE (Hackers On Planet Earth) conference at the Hotel Pennsylvania in New York, NY July 13-15 (&lt;a title=&quot;HOPE9&quot; href=&quot;http://www.hopenumbernine.net&quot; target=&quot;_blank&quot;&gt;http://www.hopenumbernine.net&lt;/a&gt;).&amp;#160; The title will be &amp;#8220;Exploited from Detroit.&amp;#8221;&amp;#160; I plan to talk about how to get started in Reverse Engineering vehicle network data and give some particle examples of this data.&amp;#160; Because its only one hour, it will be short and to the point.&amp;#160; I will be fielding questions and if anyone wants to volunteer a vehicle we may even be able to find time to connect to a car and have a real world demonstration.&lt;/p&gt;
&lt;p&gt;More details to come as they are released.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Just got the time and Date for &lt;del&gt;&amp;#8220;Exploited from Detroit&amp;#8221;&lt;/del&gt; &quot;How to Communicate with Your Car&amp;#8217;s Network&quot;&lt;br /&gt;Day/Time: Friday, July 13, 2012 - 2200&lt;br /&gt;Location: Sassaman (18th floor)&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.canbushack.com/blog/index.php?title=hope-to-see-you-there&amp;amp;more=1&amp;amp;c=1&amp;amp;tb=1&amp;amp;pb=1&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://canbushack.com/&quot;&gt;CanBusHack.com&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>I will be doing a quick 1 hour presentation at this year&#8217;s HOPE (Hackers On Planet Earth) conference at the Hotel Pennsylvania in New York, NY July 13-15 (<a title="HOPE9" href="http://www.hopenumbernine.net" target="_blank">http://www.hopenumbernine.net</a>).&#160; The title will be &#8220;Exploited from Detroit.&#8221;&#160; I plan to talk about how to get started in Reverse Engineering vehicle network data and give some particle examples of this data.&#160; Because its only one hour, it will be short and to the point.&#160; I will be fielding questions and if anyone wants to volunteer a vehicle we may even be able to find time to connect to a car and have a real world demonstration.</p>
<p>More details to come as they are released.</p>
<p><strong>Update:</strong></p>
<p>Just got the time and Date for <del>&#8220;Exploited from Detroit&#8221;</del> "How to Communicate with Your Car&#8217;s Network"<br />Day/Time: Friday, July 13, 2012 - 2200<br />Location: Sassaman (18th floor)</p><div class="item_footer"><p><small><a href="http://www.canbushack.com/blog/index.php?title=hope-to-see-you-there&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1">Original post</a> blogged on <a href="http://canbushack.com/">CanBusHack.com</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.canbushack.com/blog/index.php?title=hope-to-see-you-there&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1#comments</comments>
			<wfw:commentRss>http://www.canbushack.com/blog/index.php?tempskin=_rss2&#38;disp=comments&#38;p=68</wfw:commentRss>
		</item>
				<item>
			<title>Fun Diagnostic Services!</title>
			<link>http://www.canbushack.com/blog/index.php?title=fun-diagnostic-services&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1</link>
			<pubDate>Fri, 15 Jun 2012 03:02:04 +0000</pubDate>			<dc:creator>rleale</dc:creator>
			<category domain="main">CAN BUS</category>			<guid isPermaLink="false">67@http://www.canbushack.com/blog/</guid>
						<description>&lt;p&gt;Some services are boring.. like really, really, really, boring.. but others can make the car move gauges or make the car&amp;#8217;s warning lights light up.&amp;#160; Here is a bit more about these types of services.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;br /&gt;Stop Normal Communications (GMLAN and Others)&lt;/strong&gt;:&lt;br /&gt;This service is fun because you can make the Normal Communications (the ECU to ECU communications that occurs normally on the network) stop.&amp;#160; Why would such a service exist, mostly to clear the bus for large amounts of data such as when a controller is going to be reflashed over the CAN Bus.&amp;#160; On GMLAN this service is 0x28.&amp;#160; It does not require any sub-function so an example of this might be: &lt;span style=&quot;background-color: #ffcc00;&quot;&gt;0x7E0 01 28 00 00 00 00 00 00.&lt;/span&gt; This will command the engine controller to stop sending normal communications.&amp;#160; Of course you don&amp;#8217;t ever want to do this while the car is being driven, but it&amp;#8217;s pretty fun to see what happens when you do it!&lt;/p&gt;
&lt;p&gt;You will see the Engine Controllers Normal messages virtually disappear.&amp;#160; I say virtually because not all messages will go away, some that are mission critical will stay, but a lot of them will not.&lt;/p&gt;
&lt;p&gt;This service can also be useful if you want to simulate the messages the ECU would send without removing the power to the controller or cutting the CAN Bus itself.&lt;/p&gt;
&lt;p&gt;This service requires that you continually send a Tester Present (0x3E) message periodically (2 seconds is good) in order to maintain this.&amp;#160; If you want to return the communications send a Return to Normal message (0x20): &lt;span style=&quot;background-color: #ffcc99;&quot;&gt;0x7E0 01 20 00 00 00 00 00 00&lt;/span&gt;.&amp;#160; This will restore communications.&amp;#160; Or simply stop sending the Tester Present message and it will automatically restore communications after 3 seconds. Oh what fun you&amp;#8217;ll have.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Input/Output Control (ISO 14229 &amp;#8211; UDS)&lt;/strong&gt;:&lt;br /&gt;This is pretty much the coolest services ever made.&amp;#160; I/O Control is exactly as it sounds, you can command Outputs on the Module to do your bidding.&amp;#160; Of course software control will limit your bidding to a safe and secure bidding, but it&amp;#8217;s still cool.&lt;/p&gt;
&lt;p&gt;I/O Control (Service 0x2F) requires 3 parameters: a DID (Data ID), Control Record, and Control Mask.&amp;#160; The DID is a two byte ID for the output (or input) you want to modify.&amp;#160; Control Record is what you want the output to do (On/Off, Up/Down, etc.). Control Mask is a bitwise mask of one or more parameters that will be modified.&amp;#160; An Example of a I/O Control is something like this: 0x7E0 06 2F 11 22 07 01 00 00 00.&amp;#160; Where 0x1122 is the DID, 0x07 is the Control Record, and 0x0100 is the mask.&amp;#160; This is not a real function, but you could potentially iterate through all possibilities and wait for the controller to give you a positive response.&amp;#160; It would take a while, but it&amp;#8217;d be interesting to see what happened&amp;#8230;. Right!?&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s likely that you will get a negative response from the controller &lt;span style=&quot;background-color: #ffcc00;&quot;&gt;0x7E8 03 7F 2F 13 00 00 00 00&lt;/span&gt;, where 0x13 is the Negative Response Code (NRC).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Here are a few possible NRCs you may receive&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;&amp;#8226;&amp;#160;&amp;#160;&amp;#160; 0x13 &amp;#8211; Incorrect Message Length or Invalid Format.&lt;br /&gt;&amp;#8226;&amp;#160;&amp;#160;&amp;#160; 0x22 &amp;#8211; Condition Not Correct.&lt;br /&gt;&amp;#8226;&amp;#160;&amp;#160;&amp;#160; 0x31 &amp;#8211; Request Out of Range.&lt;br /&gt;&amp;#8226;&amp;#160;&amp;#160;&amp;#160; 0x33 &amp;#8211; Security Access Denied.&lt;br /&gt;&amp;#8226;&amp;#160;&amp;#160;&amp;#160; 0x80-0xFF &amp;#8211; OEM Specific.&lt;/p&gt;
&lt;p&gt;Good luck&amp;#8230;&amp;#8230;. .. have fun ..&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.canbushack.com/blog/index.php?title=fun-diagnostic-services&amp;amp;more=1&amp;amp;c=1&amp;amp;tb=1&amp;amp;pb=1&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://canbushack.com/&quot;&gt;CanBusHack.com&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>Some services are boring.. like really, really, really, boring.. but others can make the car move gauges or make the car&#8217;s warning lights light up.&#160; Here is a bit more about these types of services.</p>
<p><strong><br />Stop Normal Communications (GMLAN and Others)</strong>:<br />This service is fun because you can make the Normal Communications (the ECU to ECU communications that occurs normally on the network) stop.&#160; Why would such a service exist, mostly to clear the bus for large amounts of data such as when a controller is going to be reflashed over the CAN Bus.&#160; On GMLAN this service is 0x28.&#160; It does not require any sub-function so an example of this might be: <span style="background-color: #ffcc00;">0x7E0 01 28 00 00 00 00 00 00.</span> This will command the engine controller to stop sending normal communications.&#160; Of course you don&#8217;t ever want to do this while the car is being driven, but it&#8217;s pretty fun to see what happens when you do it!</p>
<p>You will see the Engine Controllers Normal messages virtually disappear.&#160; I say virtually because not all messages will go away, some that are mission critical will stay, but a lot of them will not.</p>
<p>This service can also be useful if you want to simulate the messages the ECU would send without removing the power to the controller or cutting the CAN Bus itself.</p>
<p>This service requires that you continually send a Tester Present (0x3E) message periodically (2 seconds is good) in order to maintain this.&#160; If you want to return the communications send a Return to Normal message (0x20): <span style="background-color: #ffcc99;">0x7E0 01 20 00 00 00 00 00 00</span>.&#160; This will restore communications.&#160; Or simply stop sending the Tester Present message and it will automatically restore communications after 3 seconds. Oh what fun you&#8217;ll have.</p>
<p><strong>Input/Output Control (ISO 14229 &#8211; UDS)</strong>:<br />This is pretty much the coolest services ever made.&#160; I/O Control is exactly as it sounds, you can command Outputs on the Module to do your bidding.&#160; Of course software control will limit your bidding to a safe and secure bidding, but it&#8217;s still cool.</p>
<p>I/O Control (Service 0x2F) requires 3 parameters: a DID (Data ID), Control Record, and Control Mask.&#160; The DID is a two byte ID for the output (or input) you want to modify.&#160; Control Record is what you want the output to do (On/Off, Up/Down, etc.). Control Mask is a bitwise mask of one or more parameters that will be modified.&#160; An Example of a I/O Control is something like this: 0x7E0 06 2F 11 22 07 01 00 00 00.&#160; Where 0x1122 is the DID, 0x07 is the Control Record, and 0x0100 is the mask.&#160; This is not a real function, but you could potentially iterate through all possibilities and wait for the controller to give you a positive response.&#160; It would take a while, but it&#8217;d be interesting to see what happened&#8230;. Right!?</p>
<p>It&#8217;s likely that you will get a negative response from the controller <span style="background-color: #ffcc00;">0x7E8 03 7F 2F 13 00 00 00 00</span>, where 0x13 is the Negative Response Code (NRC).</p>
<p><strong>Here are a few possible NRCs you may receive</strong>:</p>
<p>&#8226;&#160;&#160;&#160; 0x13 &#8211; Incorrect Message Length or Invalid Format.<br />&#8226;&#160;&#160;&#160; 0x22 &#8211; Condition Not Correct.<br />&#8226;&#160;&#160;&#160; 0x31 &#8211; Request Out of Range.<br />&#8226;&#160;&#160;&#160; 0x33 &#8211; Security Access Denied.<br />&#8226;&#160;&#160;&#160; 0x80-0xFF &#8211; OEM Specific.</p>
<p>Good luck&#8230;&#8230;. .. have fun ..</p><div class="item_footer"><p><small><a href="http://www.canbushack.com/blog/index.php?title=fun-diagnostic-services&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1">Original post</a> blogged on <a href="http://canbushack.com/">CanBusHack.com</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.canbushack.com/blog/index.php?title=fun-diagnostic-services&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1#comments</comments>
			<wfw:commentRss>http://www.canbushack.com/blog/index.php?tempskin=_rss2&#38;disp=comments&#38;p=67</wfw:commentRss>
		</item>
				<item>
			<title>Common Diagnostic Services</title>
			<link>http://www.canbushack.com/blog/index.php?title=common-diagnostic-services&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1</link>
			<pubDate>Mon, 26 Mar 2012 04:55:14 +0000</pubDate>			<dc:creator>rleale</dc:creator>
			<category domain="main">CAN BUS</category>			<guid isPermaLink="false">66@http://www.canbushack.com/blog/</guid>
						<description>&lt;p&gt;Because diagnostics is really just a simple way to interact with an ECU, there are a few very common diagnostic services that you&amp;#8217;ll find in nearly every permutation of diagnostics.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Tester Present:&lt;/strong&gt;&lt;br /&gt;Definitely the most common service you&amp;#8217;ll find, tester present (typically 0x3E) is used to let the controller(s) know that there is a.. wait for it.. Tester present.&amp;#160; I know it was a bit obvious, but the idea is that some services keep the controller in an augmented state or a diagnostic state.&amp;#160; When this happens there needs to be some way of maintaining that state while the tool that initiated the state is still connected to the diagnostic connector.&lt;br /&gt;&lt;br /&gt;So Tester Present is designed to be a heart beet of the diagnostic tool and in the event that the device stops working or is disconnected from the network, the ECU whose state has been altered will stop seeing the tester present message and thus transition out of its altered state.&lt;br /&gt;&lt;br /&gt;So if you want to maintain a diagnostic state you should send the tester present message.&amp;#160; A typical timeout for Tester Present is 3 Seconds.&amp;#160; So as long as you send the message between 1 and 2.5 seconds, you will be able to maintain the diagnostic state of a controller.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Read Data by PID:&lt;/strong&gt;&lt;br /&gt;Reading data from a controller is pretty much the reason for diagnostics in the first place.&amp;#160; So there is no surprise that there are at least two ways to accomplish this task on nearly every new vehicle on the market today.&amp;#160; Services 0x01 and 0x22 are used for this purpose.&lt;br /&gt;&lt;br /&gt;Service 0x01 is the OBDII Read data by PID (Parameter ID) where the PID is a one byte number representing the data you want to read.&amp;#160; Service 0x22 is the Enhanced diagnostic method for reading data.&amp;#160; Service 0x22 is typically a two byte PID that represent the parameter you want to read.&amp;#160; In some cases this two byte parameter may also be used in conjunction with another Enhanced diagnostic service to write the data as well (however exactly how this is done varies).&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Security Access:&lt;/strong&gt;&lt;br /&gt;Controllers contain data that manufactures do not want just anyone having access to.&amp;#160; This is typically to stop strange people such as yourself writing data to the controller to modify how it performs.&amp;#160; So in nearly every controller there is a method to &amp;#8220;unlock&amp;#8221; the data.&amp;#160; To perform this, it is done with service 0x27, the security access service.&lt;br /&gt;&lt;br /&gt;In order to &amp;#8220;unlock&amp;#8221; the controller you must first ask it for a Seed.&amp;#160; This seed will be used in conjunction with a proprietary algorithm to generate a Key.&amp;#160; Then the key will be sent back to the controller.&amp;#160; If the calculation that the controller did is the same as the key that you sent, then the controller will send a positive response indicating that the controller is now unlocked.&lt;br /&gt;&lt;br /&gt;There may be several levels of Security Access.&amp;#160; This is due because they may want certain features available to one group of people such as locksmiths who may need to add a new key to the vehicle while still keeping the other levels secure.&amp;#160; So a typically Security Access transaction will have sub-functions that will essentially be the level that you wish to access, these sub-functions operation in Odd/Even Pairs.&amp;#160; So sub-function 0x01 will be the seed request and 0x02 will be the key response.&amp;#160; Then it&amp;#8217;s &lt;span style=&quot;background-color: #ffcc99;&quot;&gt;0x03/0x04&lt;/span&gt;, &lt;span style=&quot;background-color: #ffcc99;&quot;&gt;0x05/0x06&lt;/span&gt;, &amp;#8230; &lt;span style=&quot;background-color: #ffcc99;&quot;&gt;0x21/0x22&lt;/span&gt;, etc.&lt;br /&gt;&lt;br /&gt;That&amp;#8217;s pretty much all that is very similar across all of the diagnostic protocols.&amp;#160; Once you&amp;#8217;ve learned these three services, you find that they very similar.&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.canbushack.com/blog/index.php?title=common-diagnostic-services&amp;amp;more=1&amp;amp;c=1&amp;amp;tb=1&amp;amp;pb=1&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://canbushack.com/&quot;&gt;CanBusHack.com&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>Because diagnostics is really just a simple way to interact with an ECU, there are a few very common diagnostic services that you&#8217;ll find in nearly every permutation of diagnostics.<br /><br /><strong>Tester Present:</strong><br />Definitely the most common service you&#8217;ll find, tester present (typically 0x3E) is used to let the controller(s) know that there is a.. wait for it.. Tester present.&#160; I know it was a bit obvious, but the idea is that some services keep the controller in an augmented state or a diagnostic state.&#160; When this happens there needs to be some way of maintaining that state while the tool that initiated the state is still connected to the diagnostic connector.<br /><br />So Tester Present is designed to be a heart beet of the diagnostic tool and in the event that the device stops working or is disconnected from the network, the ECU whose state has been altered will stop seeing the tester present message and thus transition out of its altered state.<br /><br />So if you want to maintain a diagnostic state you should send the tester present message.&#160; A typical timeout for Tester Present is 3 Seconds.&#160; So as long as you send the message between 1 and 2.5 seconds, you will be able to maintain the diagnostic state of a controller.<br /><br /><strong>Read Data by PID:</strong><br />Reading data from a controller is pretty much the reason for diagnostics in the first place.&#160; So there is no surprise that there are at least two ways to accomplish this task on nearly every new vehicle on the market today.&#160; Services 0x01 and 0x22 are used for this purpose.<br /><br />Service 0x01 is the OBDII Read data by PID (Parameter ID) where the PID is a one byte number representing the data you want to read.&#160; Service 0x22 is the Enhanced diagnostic method for reading data.&#160; Service 0x22 is typically a two byte PID that represent the parameter you want to read.&#160; In some cases this two byte parameter may also be used in conjunction with another Enhanced diagnostic service to write the data as well (however exactly how this is done varies).<br /><br /><strong>Security Access:</strong><br />Controllers contain data that manufactures do not want just anyone having access to.&#160; This is typically to stop strange people such as yourself writing data to the controller to modify how it performs.&#160; So in nearly every controller there is a method to &#8220;unlock&#8221; the data.&#160; To perform this, it is done with service 0x27, the security access service.<br /><br />In order to &#8220;unlock&#8221; the controller you must first ask it for a Seed.&#160; This seed will be used in conjunction with a proprietary algorithm to generate a Key.&#160; Then the key will be sent back to the controller.&#160; If the calculation that the controller did is the same as the key that you sent, then the controller will send a positive response indicating that the controller is now unlocked.<br /><br />There may be several levels of Security Access.&#160; This is due because they may want certain features available to one group of people such as locksmiths who may need to add a new key to the vehicle while still keeping the other levels secure.&#160; So a typically Security Access transaction will have sub-functions that will essentially be the level that you wish to access, these sub-functions operation in Odd/Even Pairs.&#160; So sub-function 0x01 will be the seed request and 0x02 will be the key response.&#160; Then it&#8217;s <span style="background-color: #ffcc99;">0x03/0x04</span>, <span style="background-color: #ffcc99;">0x05/0x06</span>, &#8230; <span style="background-color: #ffcc99;">0x21/0x22</span>, etc.<br /><br />That&#8217;s pretty much all that is very similar across all of the diagnostic protocols.&#160; Once you&#8217;ve learned these three services, you find that they very similar.<br /></p><div class="item_footer"><p><small><a href="http://www.canbushack.com/blog/index.php?title=common-diagnostic-services&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1">Original post</a> blogged on <a href="http://canbushack.com/">CanBusHack.com</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.canbushack.com/blog/index.php?title=common-diagnostic-services&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1#comments</comments>
			<wfw:commentRss>http://www.canbushack.com/blog/index.php?tempskin=_rss2&#38;disp=comments&#38;p=66</wfw:commentRss>
		</item>
				<item>
			<title>Service(s) Please</title>
			<link>http://www.canbushack.com/blog/index.php?title=service-s-please&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1</link>
			<pubDate>Tue, 17 Jan 2012 20:49:17 +0000</pubDate>			<dc:creator>rleale</dc:creator>
			<category domain="main">CAN BUS</category>			<guid isPermaLink="false">65@http://www.canbushack.com/blog/</guid>
						<description>&lt;p&gt;In diagnostic messaging, services are the functions.&amp;#160; Think of each command as a sentence.&amp;#160; The service is the verb. In standard OBDII services are often referred to as Modes.&amp;#160; You can also think of them as functions to be performed by the controller(s) that you are commanding.&lt;br /&gt;With diagnostic messages, there is always a command and almost always a response from the controller(s) you are commanding.&lt;br /&gt;When looking at raw CAN Bus data the service is often the second, third, or in very few cases the fourth data byte of the message.&amp;#160; In nearly all cases, OEMs will implement ISO 15765-2 (Click Here to read about this protocol).&amp;#160; So the service will be the first byte after the Transport Protocol information.&lt;/p&gt;
&lt;p&gt;Here is an example of and OBDII message to get Engine Speed using the CAN Bus ($01 is the Service):&lt;br /&gt;$7DF 02 &lt;span style=&quot;background-color: #ffff00;&quot;&gt;01&lt;/span&gt; 0D 00 00 00 00 00&lt;/p&gt;
&lt;p&gt;Will hopefully return the following:&lt;br /&gt;$7E8 04 41 0D 01 FE 00 00 00&lt;/p&gt;
&lt;p&gt;Here is a simple list of some common Services that you might find:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;OBDII Services (a.k.a. Modes):&lt;/strong&gt;&lt;br /&gt;$01 - Request Current Powertrain Diagnostic Data&lt;br /&gt;$02 - Request Powertrain Freeze Frame Data&lt;br /&gt;$03 - Request Emission-Related Diagnostic Trouble Codes&lt;br /&gt;$04 - Clear/Reset Emission-Related Diagnostic Information&lt;br /&gt;$05 - Request Oxygen Sensor Monitoring Test Results&lt;br /&gt;$06 - Request On-Board Monitoring Test Results for Specific Monitored Systems&lt;br /&gt;$07 - Request Emission-Related Diagnostic Trouble Codes Detected During Current or Last Completed Driving Cycle&lt;br /&gt;$08 - Request Control of On-Board System, Test or Component&lt;br /&gt;$09 - Request Vehicle Information&lt;br /&gt;$0A - Request Emission-Related Diagnostic Trouble Codes with Permanent Status&lt;/p&gt;
&lt;p&gt;Services $10 and higher are non-OBDII services also known as Enhanced Diagnostics.&amp;#160; This is because, unlike OBDII Diagnostics, these services are not government mandated thus each OEM will use their own specification.&amp;#160; For Example GM vehicles use the GMLAN diagnostic protocol.&amp;#160; Ford used ISO-14230 but now use ISO-14229 (UDS).&amp;#160; Each OEM is can decidedly use their own enhanced diagnostic protocol.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;GMLAN Enhanced Services:&lt;/strong&gt;&lt;br /&gt;$10 - Initiate Diagnostics&lt;br /&gt;$12 - Read Failure Record&lt;br /&gt;$1A - Read Diagnostic ID (DID)&lt;br /&gt;$20 - Return To Normal&lt;br /&gt;$22 - Read Data By Parameter ID (PID)&lt;br /&gt;$23 - Read Memory Address&lt;br /&gt;$27 - Security Access&lt;br /&gt;$28 - Disable Normal Communications&lt;br /&gt;$2C - Define Dynamic Data Packet ID (DPID)&lt;br /&gt;$2D - Define PID by Memory Address&lt;br /&gt;$34 - Request Download&lt;br /&gt;$36 - Transfer Data&lt;br /&gt;$3B - Write DID&lt;br /&gt;$3E - Tester Present&lt;br /&gt;$A2 - Report Programming State&lt;br /&gt;$A5 - Enter Programming Mode&lt;br /&gt;$A9 - Check Codes&lt;br /&gt;$AA - Read DPID&lt;br /&gt;$AE - Device Control&lt;/p&gt;
&lt;p&gt;Here is an example of a CAN Bus message to get the Engine Speed using Enhanced Diagnostics (where $22 is the service):&lt;br /&gt;$7E0 03 &lt;span style=&quot;background-color: #ffff00;&quot;&gt;22&lt;/span&gt; 00 0D 00 00 00 00&lt;/p&gt;
&lt;p&gt;And this will hopefully return:&lt;br /&gt;$7E8 04 62 00 0D 01 7E 00 00&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ISO - 14229:&lt;/strong&gt;&lt;br /&gt;$10 - Diagnostic Session Control&lt;br /&gt;$11 - ECU Reset&lt;br /&gt;$14 - Clear Diagnostic Information&lt;br /&gt;$19 - Read Diagnostic Trouble Codes (DTC)&lt;br /&gt;$22 - Read Data by ID&lt;br /&gt;$23 - Read Memory by Address&lt;br /&gt;$24 - Read Scaling Data by ID&lt;br /&gt;$27 - Security Access&lt;br /&gt;$28 - Communications Control&lt;br /&gt;$2A - Read Data by Periodic ID&lt;br /&gt;$2C - Dynamically Define Data ID&lt;br /&gt;$2E - Write Data by ID&lt;br /&gt;$2F - Input/Output Control&lt;br /&gt;$31 - Routine Control&lt;br /&gt;$34 - Request Download&lt;br /&gt;$35 - Request Upload&lt;br /&gt;$36 - Transfer Data&lt;br /&gt;$37 - Request Transfer Exit&lt;br /&gt;$3D - Write Memory by Address&lt;br /&gt;$3E - Tester Present&lt;br /&gt;$83 - Access Timing Parameter&lt;br /&gt;$84 - Secured Data Transmission&lt;br /&gt;$85 - Control DTC Setting&lt;br /&gt;$86 - Response on Event&lt;br /&gt;$87 - Link Control&lt;/p&gt;
&lt;p&gt;Now that you have a list of Services, hopefully this will make reading the raw can data a bit more manageable. Soon I will post more information about specific services themselves.&amp;#160; If any are more interesting to you, please post in the comments below.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.canbushack.com/blog/index.php?title=service-s-please&amp;amp;more=1&amp;amp;c=1&amp;amp;tb=1&amp;amp;pb=1&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://canbushack.com/&quot;&gt;CanBusHack.com&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>In diagnostic messaging, services are the functions.&#160; Think of each command as a sentence.&#160; The service is the verb. In standard OBDII services are often referred to as Modes.&#160; You can also think of them as functions to be performed by the controller(s) that you are commanding.<br />With diagnostic messages, there is always a command and almost always a response from the controller(s) you are commanding.<br />When looking at raw CAN Bus data the service is often the second, third, or in very few cases the fourth data byte of the message.&#160; In nearly all cases, OEMs will implement ISO 15765-2 (Click Here to read about this protocol).&#160; So the service will be the first byte after the Transport Protocol information.</p>
<p>Here is an example of and OBDII message to get Engine Speed using the CAN Bus ($01 is the Service):<br />$7DF 02 <span style="background-color: #ffff00;">01</span> 0D 00 00 00 00 00</p>
<p>Will hopefully return the following:<br />$7E8 04 41 0D 01 FE 00 00 00</p>
<p>Here is a simple list of some common Services that you might find:</p>
<p><strong>OBDII Services (a.k.a. Modes):</strong><br />$01 - Request Current Powertrain Diagnostic Data<br />$02 - Request Powertrain Freeze Frame Data<br />$03 - Request Emission-Related Diagnostic Trouble Codes<br />$04 - Clear/Reset Emission-Related Diagnostic Information<br />$05 - Request Oxygen Sensor Monitoring Test Results<br />$06 - Request On-Board Monitoring Test Results for Specific Monitored Systems<br />$07 - Request Emission-Related Diagnostic Trouble Codes Detected During Current or Last Completed Driving Cycle<br />$08 - Request Control of On-Board System, Test or Component<br />$09 - Request Vehicle Information<br />$0A - Request Emission-Related Diagnostic Trouble Codes with Permanent Status</p>
<p>Services $10 and higher are non-OBDII services also known as Enhanced Diagnostics.&#160; This is because, unlike OBDII Diagnostics, these services are not government mandated thus each OEM will use their own specification.&#160; For Example GM vehicles use the GMLAN diagnostic protocol.&#160; Ford used ISO-14230 but now use ISO-14229 (UDS).&#160; Each OEM is can decidedly use their own enhanced diagnostic protocol.</p>
<p><strong>GMLAN Enhanced Services:</strong><br />$10 - Initiate Diagnostics<br />$12 - Read Failure Record<br />$1A - Read Diagnostic ID (DID)<br />$20 - Return To Normal<br />$22 - Read Data By Parameter ID (PID)<br />$23 - Read Memory Address<br />$27 - Security Access<br />$28 - Disable Normal Communications<br />$2C - Define Dynamic Data Packet ID (DPID)<br />$2D - Define PID by Memory Address<br />$34 - Request Download<br />$36 - Transfer Data<br />$3B - Write DID<br />$3E - Tester Present<br />$A2 - Report Programming State<br />$A5 - Enter Programming Mode<br />$A9 - Check Codes<br />$AA - Read DPID<br />$AE - Device Control</p>
<p>Here is an example of a CAN Bus message to get the Engine Speed using Enhanced Diagnostics (where $22 is the service):<br />$7E0 03 <span style="background-color: #ffff00;">22</span> 00 0D 00 00 00 00</p>
<p>And this will hopefully return:<br />$7E8 04 62 00 0D 01 7E 00 00</p>
<p><strong>ISO - 14229:</strong><br />$10 - Diagnostic Session Control<br />$11 - ECU Reset<br />$14 - Clear Diagnostic Information<br />$19 - Read Diagnostic Trouble Codes (DTC)<br />$22 - Read Data by ID<br />$23 - Read Memory by Address<br />$24 - Read Scaling Data by ID<br />$27 - Security Access<br />$28 - Communications Control<br />$2A - Read Data by Periodic ID<br />$2C - Dynamically Define Data ID<br />$2E - Write Data by ID<br />$2F - Input/Output Control<br />$31 - Routine Control<br />$34 - Request Download<br />$35 - Request Upload<br />$36 - Transfer Data<br />$37 - Request Transfer Exit<br />$3D - Write Memory by Address<br />$3E - Tester Present<br />$83 - Access Timing Parameter<br />$84 - Secured Data Transmission<br />$85 - Control DTC Setting<br />$86 - Response on Event<br />$87 - Link Control</p>
<p>Now that you have a list of Services, hopefully this will make reading the raw can data a bit more manageable. Soon I will post more information about specific services themselves.&#160; If any are more interesting to you, please post in the comments below.</p><div class="item_footer"><p><small><a href="http://www.canbushack.com/blog/index.php?title=service-s-please&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1">Original post</a> blogged on <a href="http://canbushack.com/">CanBusHack.com</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.canbushack.com/blog/index.php?title=service-s-please&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1#comments</comments>
			<wfw:commentRss>http://www.canbushack.com/blog/index.php?tempskin=_rss2&#38;disp=comments&#38;p=65</wfw:commentRss>
		</item>
				<item>
			<title>Learn to CanBusHack: Defcon 19 Workshop (Update)</title>
			<link>http://www.canbushack.com/blog/index.php?title=learn-to-canbushack-defcon-19-workshop&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1</link>
			<pubDate>Sat, 04 Jun 2011 19:53:46 +0000</pubDate>			<dc:creator>rleale</dc:creator>
			<category domain="main">CAN BUS</category>			<guid isPermaLink="false">62@http://www.canbushack.com/blog/</guid>
						<description>&lt;p&gt;This year's Defcon will host yours truely.&amp;#160; I will be giving a workshop on CAN BUS Hacking.&amp;#160; So if you have some time come out and join us at Defcon August 4~7 @ the Rio Hotel in Las Vegas, NV.&lt;/p&gt;
&lt;p&gt;Please check out &lt;a href=&quot;http://www.defcon.org&quot;&gt;www.defcon.org&lt;/a&gt; for more information about what days the workshops will be held.&lt;/p&gt;
&lt;p&gt;Here is a preliminary example of what will be:&lt;/p&gt;
&lt;p&gt;* Introduction&lt;br /&gt;* What is Vehicle Network Communications (Demo)&lt;br /&gt; * Compare Vehicle Comms vs. Ethernet&lt;br /&gt; * Compare Vehicle Comms vs. TCP/IP&lt;br /&gt;* Types of Vehicle Network Physical Layers&lt;br /&gt; * J1850 PWM/VPW&lt;br /&gt; * LIN/ISO 9141&lt;br /&gt; * CAN Bus&lt;br /&gt; * SWCAN&lt;br /&gt; * LSFT CAN&lt;br /&gt; * DW CAN&lt;br /&gt;* Devices Used to Connect to CAN BUS&lt;br /&gt; * Arduino (Demo)&lt;br /&gt; * neoVI/ValueCAN (Demo)&lt;br /&gt; * Generic ELM Tool&lt;br /&gt; * DW CAN Bus Physical Network (Wires and Resistive Properties)&lt;br /&gt;* CAN BUS Data Frame&lt;br /&gt;* IPC or other Controller (Demo)&lt;br /&gt;* Understanding the data on the Bus: Diagnostic Message vs. Normal Messages&lt;br /&gt;* Reverse Engineering Normal Messages (Demo)&lt;br /&gt;* Diagnostic Protocols&lt;br /&gt; * OBDII&lt;br /&gt; * ISO 14239&lt;br /&gt; * ISO 14229&lt;br /&gt; * GMLAN&lt;br /&gt;* Commanding the Vehicle Controllers using CAN BUS&lt;br /&gt;* Understanding Security Systems&lt;br /&gt; * Controller Security Access (Possible Demo)&lt;br /&gt; * Immobilizers (Possible Demo)&lt;br /&gt;* Q&amp;amp;A&lt;br /&gt;* The autoAPIa Project&lt;/p&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;UPDATE:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Workshops schedule has been released go to &lt;a title=&quot;DC19 Workshops&quot; href=&quot;https://www.defcon.org/html/defcon-19/dc-19-workshops.html#Leale&quot; target=&quot;_blank&quot;&gt;https://www.defcon.org/html/defcon-19/dc-19-workshops.html#Leale&lt;/a&gt; for more information about the workshops.&amp;#160; The cost is $200 (Cash only) and it will take place starting at &lt;strong&gt;10:00 AM on Friday, August 5th&lt;/strong&gt;.&amp;#160; I am not sure yet if it is first-come-first-serve or not.&amp;#160; I will update when I find out.&lt;/p&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;UPDATE 2:&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Thank everyone for coming out to the DefCon workshop, had many more people that I thought could make it.&amp;#160; It was a wonderful success.&amp;#160; As promissed here are the links for the workshop's powerpoint:&amp;#160; &lt;a href=&quot;/defcon19/workshop.pptx&quot; target=&quot;_blank&quot;&gt;http://www.canbushack.com/defcon19/workshop.pptx&lt;/a&gt;&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.canbushack.com/blog/index.php?title=learn-to-canbushack-defcon-19-workshop&amp;amp;more=1&amp;amp;c=1&amp;amp;tb=1&amp;amp;pb=1&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://canbushack.com/&quot;&gt;CanBusHack.com&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>This year's Defcon will host yours truely.&#160; I will be giving a workshop on CAN BUS Hacking.&#160; So if you have some time come out and join us at Defcon August 4~7 @ the Rio Hotel in Las Vegas, NV.</p>
<p>Please check out <a href="http://www.defcon.org">www.defcon.org</a> for more information about what days the workshops will be held.</p>
<p>Here is a preliminary example of what will be:</p>
<p>* Introduction<br />* What is Vehicle Network Communications (Demo)<br /> * Compare Vehicle Comms vs. Ethernet<br /> * Compare Vehicle Comms vs. TCP/IP<br />* Types of Vehicle Network Physical Layers<br /> * J1850 PWM/VPW<br /> * LIN/ISO 9141<br /> * CAN Bus<br /> * SWCAN<br /> * LSFT CAN<br /> * DW CAN<br />* Devices Used to Connect to CAN BUS<br /> * Arduino (Demo)<br /> * neoVI/ValueCAN (Demo)<br /> * Generic ELM Tool<br /> * DW CAN Bus Physical Network (Wires and Resistive Properties)<br />* CAN BUS Data Frame<br />* IPC or other Controller (Demo)<br />* Understanding the data on the Bus: Diagnostic Message vs. Normal Messages<br />* Reverse Engineering Normal Messages (Demo)<br />* Diagnostic Protocols<br /> * OBDII<br /> * ISO 14239<br /> * ISO 14229<br /> * GMLAN<br />* Commanding the Vehicle Controllers using CAN BUS<br />* Understanding Security Systems<br /> * Controller Security Access (Possible Demo)<br /> * Immobilizers (Possible Demo)<br />* Q&amp;A<br />* The autoAPIa Project</p>
<p>&#160;</p>
<p><strong><em>UPDATE:</em></strong></p>
<p>Workshops schedule has been released go to <a title="DC19 Workshops" href="https://www.defcon.org/html/defcon-19/dc-19-workshops.html#Leale" target="_blank">https://www.defcon.org/html/defcon-19/dc-19-workshops.html#Leale</a> for more information about the workshops.&#160; The cost is $200 (Cash only) and it will take place starting at <strong>10:00 AM on Friday, August 5th</strong>.&#160; I am not sure yet if it is first-come-first-serve or not.&#160; I will update when I find out.</p>
<p>&#160;</p>
<p><em><strong>UPDATE 2:</strong></em></p>
<p>Thank everyone for coming out to the DefCon workshop, had many more people that I thought could make it.&#160; It was a wonderful success.&#160; As promissed here are the links for the workshop's powerpoint:&#160; <a href="http://www.canbushack.com/defcon19/workshop.pptx" target="_blank">http://www.canbushack.com/defcon19/workshop.pptx</a></p><div class="item_footer"><p><small><a href="http://www.canbushack.com/blog/index.php?title=learn-to-canbushack-defcon-19-workshop&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1">Original post</a> blogged on <a href="http://canbushack.com/">CanBusHack.com</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.canbushack.com/blog/index.php?title=learn-to-canbushack-defcon-19-workshop&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1#comments</comments>
			<wfw:commentRss>http://www.canbushack.com/blog/index.php?tempskin=_rss2&#38;disp=comments&#38;p=62</wfw:commentRss>
		</item>
				<item>
			<title>Extended IDs in CAN Frames.. What will they think of next?</title>
			<link>http://www.canbushack.com/blog/index.php?title=extended-ids-in-can-frames-what-will-they-think-of-next&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1</link>
			<pubDate>Sat, 14 May 2011 16:38:25 +0000</pubDate>			<dc:creator>rleale</dc:creator>
			<category domain="main">CAN BUS</category>			<guid isPermaLink="false">61@http://www.canbushack.com/blog/</guid>
						<description>&lt;p&gt;Every CAN message has an Identifier.&amp;#160; This is referred to as the Arbitration ID or ArbID.&amp;#160; It serves two functions.&amp;#160; First, it is to help identify the payload or data of the frame. Second, because no two modules are allowed to send a frame with the same ID, it serves as an arbitration method on which frame gets priority on the bus when two or more messages are sent at the SAME TIME (in other words if a low priority ArbID frame is half-way through sending, a higher priority ArbID will not stop that frame from sending).&lt;/p&gt;
&lt;p&gt;So if the ArbID is the identifier of the message, what are Extended IDs?&amp;#160; The concept is simple, take the ArbID and add data bytes from the frame as the ID as well.&amp;#160; For instance, say you have to messages you want to send: Engine Speed and Engine Coolant Temp.&amp;#160; A lot of the time you will see them sent in the same message with the same ID and always in their same respective location in that message.&amp;#160; However what if you wanted all of your parameters to occupy byte 5 of every frame, and instead you change out the ID to denote the parameter, but because of application rules you are only allowed to broadcast on a single ID?&amp;#160; In this case you would use Extended IDs.&lt;/p&gt;
&lt;p&gt;For example your only ID you are allowed to send is ID&lt;span style=&quot;background-color: #ff99cc;&quot;&gt; 0x444&lt;/span&gt; (again this is because of rules imposed by a network design committee not by CAN Bus itself).&amp;#160; And you have more data than one frame can possibly hold or you want all of your parameters to be in the 5th byte?&amp;#160; In this case you may set byte 1 as your Extended ID and for each parameter you would assign a new ID.&amp;#160; So &lt;strong&gt;Engine Speed&lt;/strong&gt; would be &lt;span style=&quot;background-color: #ff99cc;&quot;&gt;0x0C&lt;span style=&quot;background-color: #ffffff;&quot;&gt; &lt;/span&gt;&lt;/span&gt;and &lt;strong&gt;Coolant Temp &lt;/strong&gt;would be&lt;span style=&quot;background-color: #ff99cc;&quot;&gt; 0x05&lt;/span&gt; and Engine Parameter X = 0x06, Y=0x07, etc.&lt;/p&gt;
&lt;p&gt;Your &lt;strong&gt;Engine Speed&lt;/strong&gt; Frame would look like this:&lt;span style=&quot;background-color: #ffff99;&quot;&gt; 0x444 0C 03 00 FF &lt;span style=&quot;background-color: #c0c0c0;&quot;&gt;22&lt;/span&gt; 00 00 00 00&lt;/span&gt;; where 0x22 Is the engine speed. And for &lt;strong&gt;Engine Coolant Temp&lt;/strong&gt; it may look like this &lt;span style=&quot;background-color: #ffff99;&quot;&gt;0x444 05 04 00 FF &lt;span style=&quot;background-color: #c0c0c0;&quot;&gt;10&lt;/span&gt; 00 00 00 00&lt;/span&gt;; where 0x10 is the Engine Coolant value.&amp;#160; So you can see that if you have certain limitations on network IDs, Extended IDs can give you more versatility.&lt;/p&gt;
&lt;p&gt;Extended IDs can also be seen in Diagnostics messages as well.&amp;#160; For instance Toyota vehicles often use Extended IDs for Diagnostic Requests and Responses. A typical Enhanced Diagnostic Request on Toyota vehicles starts with 0x750 and the first data byte is the Destination Controller Address.&amp;#160; Compare this with an OEM that does not use Extended IDs, but rather assigns each ECU Destination address its own Arbitration ID (Ford, GM, Chysler, etc.)&amp;#160; The more controllers you have the fewer available Arbitration IDs would be available because they would be taken by Diagnostic Identifiers.&lt;/p&gt;
&lt;p&gt;Now you know what some applications are for extended IDs and know that you know, it should be easier for you to identify them when reverse engineering data on the CAN Bus.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.canbushack.com/blog/index.php?title=extended-ids-in-can-frames-what-will-they-think-of-next&amp;amp;more=1&amp;amp;c=1&amp;amp;tb=1&amp;amp;pb=1&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://canbushack.com/&quot;&gt;CanBusHack.com&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>Every CAN message has an Identifier.&#160; This is referred to as the Arbitration ID or ArbID.&#160; It serves two functions.&#160; First, it is to help identify the payload or data of the frame. Second, because no two modules are allowed to send a frame with the same ID, it serves as an arbitration method on which frame gets priority on the bus when two or more messages are sent at the SAME TIME (in other words if a low priority ArbID frame is half-way through sending, a higher priority ArbID will not stop that frame from sending).</p>
<p>So if the ArbID is the identifier of the message, what are Extended IDs?&#160; The concept is simple, take the ArbID and add data bytes from the frame as the ID as well.&#160; For instance, say you have to messages you want to send: Engine Speed and Engine Coolant Temp.&#160; A lot of the time you will see them sent in the same message with the same ID and always in their same respective location in that message.&#160; However what if you wanted all of your parameters to occupy byte 5 of every frame, and instead you change out the ID to denote the parameter, but because of application rules you are only allowed to broadcast on a single ID?&#160; In this case you would use Extended IDs.</p>
<p>For example your only ID you are allowed to send is ID<span style="background-color: #ff99cc;"> 0x444</span> (again this is because of rules imposed by a network design committee not by CAN Bus itself).&#160; And you have more data than one frame can possibly hold or you want all of your parameters to be in the 5th byte?&#160; In this case you may set byte 1 as your Extended ID and for each parameter you would assign a new ID.&#160; So <strong>Engine Speed</strong> would be <span style="background-color: #ff99cc;">0x0C<span style="background-color: #ffffff;"> </span></span>and <strong>Coolant Temp </strong>would be<span style="background-color: #ff99cc;"> 0x05</span> and Engine Parameter X = 0x06, Y=0x07, etc.</p>
<p>Your <strong>Engine Speed</strong> Frame would look like this:<span style="background-color: #ffff99;"> 0x444 0C 03 00 FF <span style="background-color: #c0c0c0;">22</span> 00 00 00 00</span>; where 0x22 Is the engine speed. And for <strong>Engine Coolant Temp</strong> it may look like this <span style="background-color: #ffff99;">0x444 05 04 00 FF <span style="background-color: #c0c0c0;">10</span> 00 00 00 00</span>; where 0x10 is the Engine Coolant value.&#160; So you can see that if you have certain limitations on network IDs, Extended IDs can give you more versatility.</p>
<p>Extended IDs can also be seen in Diagnostics messages as well.&#160; For instance Toyota vehicles often use Extended IDs for Diagnostic Requests and Responses. A typical Enhanced Diagnostic Request on Toyota vehicles starts with 0x750 and the first data byte is the Destination Controller Address.&#160; Compare this with an OEM that does not use Extended IDs, but rather assigns each ECU Destination address its own Arbitration ID (Ford, GM, Chysler, etc.)&#160; The more controllers you have the fewer available Arbitration IDs would be available because they would be taken by Diagnostic Identifiers.</p>
<p>Now you know what some applications are for extended IDs and know that you know, it should be easier for you to identify them when reverse engineering data on the CAN Bus.</p><div class="item_footer"><p><small><a href="http://www.canbushack.com/blog/index.php?title=extended-ids-in-can-frames-what-will-they-think-of-next&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1">Original post</a> blogged on <a href="http://canbushack.com/">CanBusHack.com</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.canbushack.com/blog/index.php?title=extended-ids-in-can-frames-what-will-they-think-of-next&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1#comments</comments>
			<wfw:commentRss>http://www.canbushack.com/blog/index.php?tempskin=_rss2&#38;disp=comments&#38;p=61</wfw:commentRss>
		</item>
				<item>
			<title>Simulate THIS!</title>
			<link>http://www.canbushack.com/blog/index.php?title=simulate-this&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1</link>
			<pubDate>Thu, 24 Feb 2011 03:51:56 +0000</pubDate>			<dc:creator>rleale</dc:creator>
			<category domain="main">CAN BUS</category>			<guid isPermaLink="false">60@http://www.canbushack.com/blog/</guid>
						<description>&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p style=&quot;margin-bottom: 0in;&quot;&gt;With thousands of data parameters flowing continuously along one or more CAN Buses in any particular vehicle, there is no doubt that finding out what these parameters mean can be very benificial, but, in having the data, you can also use it to simulate what is there.&lt;/p&gt;
&lt;p style=&quot;margin-bottom: 0in;&quot;&gt;So why would you want to simulate what is ALREADY there? One, because you want to get rid of what is there and add something of your own.  Removing the engine and engine controller? No problem just simulate it, the other modules probably wont care.  Removing the driver or passenger seat, no problem just simulate it, the other modules probably wont care.&lt;/p&gt;
&lt;p style=&quot;margin-bottom: 0in;&quot;&gt;Or two, you want to enhance the functionality of existing controllers.   Want the doors to auto-lock at 2mph not 5mph?  No problem simulate the lock message, the doors won't mind.  Want to have the vehicle chime all the time while the seat belts aren't buckled, no problem simulate the chime.&lt;/p&gt;
&lt;p style=&quot;margin-bottom: 0in;&quot;&gt;So how does simulation work?  Typically, you will need to look at the message(s) that you want to simulate.  What is there Arbitration ID? What is there data length?  Is the data static or dynamic?  Is it sent periodically, on event, or both?  If you send the message and do not remove the original controller that is sending the message are the desired results nullified by the original controller (i.e. if you are sending head lights ON and the original controller is sending head lights OFF, do the headlight turn ON, OFF or flicker?) ?&lt;/p&gt;
&lt;p style=&quot;margin-bottom: 0in;&quot;&gt;Once you've answered these questions, then you are ready to begin.  So what was the Arbitration ID?  Let's say it was &lt;span style=&quot;background-color: #ffff99;&quot;&gt;0x555&lt;/span&gt;.  Ok now what's the data length?  8 bytes with static data,  sent periodically at 100ms update rate.&lt;/p&gt;
&lt;p style=&quot;margin-bottom: 0in;&quot;&gt;Let's assume this message is a command that moves the driver mirror up when we change the first byte from &lt;strong&gt;0x00&lt;/strong&gt; to&lt;strong&gt; 0x01&lt;/strong&gt;.  So the message on the Bus looks something like this: &lt;span style=&quot;background-color: #ccffff;&quot;&gt;0x555 00 00 00 00 00 00 00 00&lt;/span&gt;.  But if we send our simulated message of &lt;span style=&quot;background-color: #ccffff;&quot;&gt;0x555 01 00 00 00 00 00 00 00&lt;/span&gt; the mirror will move up just a smidge and if we send it at 100ms it will continue to move up until we stop sending or we change the first data byte from &lt;strong&gt;0x01&lt;/strong&gt; back to&lt;strong&gt; 0x00&lt;/strong&gt;.  However we may notice that the upward movement of the mirror is not as smooth as when I press the up button of the mirror control switch.  This is because you are simulating a message that is already present on the CAN Bus. This means that the receiving controller is receiving your message 0x01 and the original controller's message 0x00 and interpreting an Up command when your message arrives and a Stop command when the original controller's message arrives.  Depending on how well or bad the software for the mirror control module is written, this may cause havoc on the system you plan to implement, and will most definitely be the source of many CAN Bus Error frames (don't worry there not too bad, in general it is almost impossible to cause any issue when simulating an existing CAN Arbitration ID).&lt;/p&gt;
&lt;p style=&quot;margin-bottom: 0in;&quot;&gt;So, in this instants, if we want to make the control as smooth as the original switch, we must stop the existing controller from sending the message.  There are a couple of ways to do this, the first is obvious, disconnect or power-down the original controller.  Remove a fuse, disconnect the CAN Bus or power from the controller.  Now of course this will most definitely have other symptoms, but if your application can tolerate this, then its the easiest and simplest solution.&lt;/p&gt;
&lt;p style=&quot;margin-bottom: 0in;&quot;&gt;Next to physically disconnecting the module is using diagnostic messaging to ask the module the stop sending.  Often called Disable Normal Communications. If supported, this service will make the module stop sending its data.  The problem is that the message format and rules are typically quite different from vehicle manufacture to manufacture, so unless you know what this message is, it is difficult to make this work.  Plus this method suffers similar draw-backs as the power-down method mentioned above.&lt;/p&gt;
&lt;p style=&quot;margin-bottom: 0in;&quot;&gt;Last, you can gateway the message. Gatewaying the message is done by disconnecting the sending OR receiving module (typically easier when it is the receiver).  Once disconnected, you can gateway all of the message to the receiving module EXECPT the one that you want to simulate.  This allows you to have complete control over the data in that message while maintaining the messages and data from other modules.  As you can imagine this solution requires the most work because you must have a device that is fast, support at least two identical CAN Bus channels, and is quickly programmable.  But if you can get these three things together, you will can simulate nearly any message with nearly zero issues.&lt;/p&gt;
&lt;p style=&quot;margin-bottom: 0in;&quot;&gt;Well this has been some simulating conversation...&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.canbushack.com/blog/index.php?title=simulate-this&amp;amp;more=1&amp;amp;c=1&amp;amp;tb=1&amp;amp;pb=1&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://canbushack.com/&quot;&gt;CanBusHack.com&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>&#160;</p>
<p style="margin-bottom: 0in;">With thousands of data parameters flowing continuously along one or more CAN Buses in any particular vehicle, there is no doubt that finding out what these parameters mean can be very benificial, but, in having the data, you can also use it to simulate what is there.</p>
<p style="margin-bottom: 0in;">So why would you want to simulate what is ALREADY there? One, because you want to get rid of what is there and add something of your own.  Removing the engine and engine controller? No problem just simulate it, the other modules probably wont care.  Removing the driver or passenger seat, no problem just simulate it, the other modules probably wont care.</p>
<p style="margin-bottom: 0in;">Or two, you want to enhance the functionality of existing controllers.   Want the doors to auto-lock at 2mph not 5mph?  No problem simulate the lock message, the doors won't mind.  Want to have the vehicle chime all the time while the seat belts aren't buckled, no problem simulate the chime.</p>
<p style="margin-bottom: 0in;">So how does simulation work?  Typically, you will need to look at the message(s) that you want to simulate.  What is there Arbitration ID? What is there data length?  Is the data static or dynamic?  Is it sent periodically, on event, or both?  If you send the message and do not remove the original controller that is sending the message are the desired results nullified by the original controller (i.e. if you are sending head lights ON and the original controller is sending head lights OFF, do the headlight turn ON, OFF or flicker?) ?</p>
<p style="margin-bottom: 0in;">Once you've answered these questions, then you are ready to begin.  So what was the Arbitration ID?  Let's say it was <span style="background-color: #ffff99;">0x555</span>.  Ok now what's the data length?  8 bytes with static data,  sent periodically at 100ms update rate.</p>
<p style="margin-bottom: 0in;">Let's assume this message is a command that moves the driver mirror up when we change the first byte from <strong>0x00</strong> to<strong> 0x01</strong>.  So the message on the Bus looks something like this: <span style="background-color: #ccffff;">0x555 00 00 00 00 00 00 00 00</span>.  But if we send our simulated message of <span style="background-color: #ccffff;">0x555 01 00 00 00 00 00 00 00</span> the mirror will move up just a smidge and if we send it at 100ms it will continue to move up until we stop sending or we change the first data byte from <strong>0x01</strong> back to<strong> 0x00</strong>.  However we may notice that the upward movement of the mirror is not as smooth as when I press the up button of the mirror control switch.  This is because you are simulating a message that is already present on the CAN Bus. This means that the receiving controller is receiving your message 0x01 and the original controller's message 0x00 and interpreting an Up command when your message arrives and a Stop command when the original controller's message arrives.  Depending on how well or bad the software for the mirror control module is written, this may cause havoc on the system you plan to implement, and will most definitely be the source of many CAN Bus Error frames (don't worry there not too bad, in general it is almost impossible to cause any issue when simulating an existing CAN Arbitration ID).</p>
<p style="margin-bottom: 0in;">So, in this instants, if we want to make the control as smooth as the original switch, we must stop the existing controller from sending the message.  There are a couple of ways to do this, the first is obvious, disconnect or power-down the original controller.  Remove a fuse, disconnect the CAN Bus or power from the controller.  Now of course this will most definitely have other symptoms, but if your application can tolerate this, then its the easiest and simplest solution.</p>
<p style="margin-bottom: 0in;">Next to physically disconnecting the module is using diagnostic messaging to ask the module the stop sending.  Often called Disable Normal Communications. If supported, this service will make the module stop sending its data.  The problem is that the message format and rules are typically quite different from vehicle manufacture to manufacture, so unless you know what this message is, it is difficult to make this work.  Plus this method suffers similar draw-backs as the power-down method mentioned above.</p>
<p style="margin-bottom: 0in;">Last, you can gateway the message. Gatewaying the message is done by disconnecting the sending OR receiving module (typically easier when it is the receiver).  Once disconnected, you can gateway all of the message to the receiving module EXECPT the one that you want to simulate.  This allows you to have complete control over the data in that message while maintaining the messages and data from other modules.  As you can imagine this solution requires the most work because you must have a device that is fast, support at least two identical CAN Bus channels, and is quickly programmable.  But if you can get these three things together, you will can simulate nearly any message with nearly zero issues.</p>
<p style="margin-bottom: 0in;">Well this has been some simulating conversation...</p><div class="item_footer"><p><small><a href="http://www.canbushack.com/blog/index.php?title=simulate-this&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1">Original post</a> blogged on <a href="http://canbushack.com/">CanBusHack.com</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.canbushack.com/blog/index.php?title=simulate-this&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1#comments</comments>
			<wfw:commentRss>http://www.canbushack.com/blog/index.php?tempskin=_rss2&#38;disp=comments&#38;p=60</wfw:commentRss>
		</item>
			</channel>
</rss>
