<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>andreas.goelzer.de &#187; Vehicles</title>
	<atom:link href="http://andreas.goelzer.de/category/vehicles/feed" rel="self" type="application/rss+xml" />
	<link>http://andreas.goelzer.de</link>
	<description>Electronics and small programs and other stuff</description>
	<lastBuildDate>Tue, 29 Nov 2011 21:08:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>readesm 2011 with Qt user interface</title>
		<link>http://andreas.goelzer.de/readesm-2011-with-qt-user-interface</link>
		<comments>http://andreas.goelzer.de/readesm-2011-with-qt-user-interface#comments</comments>
		<pubDate>Sun, 20 Nov 2011 22:41:34 +0000</pubDate>
		<dc:creator>Andreas Goelzer</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Vehicles]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[qt]]></category>
		<category><![CDATA[tachograph]]></category>
		<category><![CDATA[trucks]]></category>

		<guid isPermaLink="false">http://andreas.goelzer.de/?p=222</guid>
		<description><![CDATA[The new versions of readesm use a qt graphical frontend.  Combined with the other changes, readesm should now be more useful and usable. <a href="http://andreas.goelzer.de/readesm-2011-with-qt-user-interface">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The <a href="readesm-reading-digital-tachograph-files">old version of readesm</a> was using a command-line interface to convert the tachograph data into html.  If one wanted it shown in the browser, there was a script to convert the file, write it to a temporary directory, and then open that file in the browser.  However, this approach turned out to be not portable at all.</p>
<p>There were other problems: readesm was using custom Makefiles, which apparently made compiling the source difficult.  I was amazed to discover <a href="http://wiki.ubuntuusers.de/Fahrlinux">this wiki entry for fahrlinx</a>, which contained information on how to install the windows version of readesm using <a href="http://www.winehq.org">wine</a>.  As the windows version at that time was cross-compiled in linux and lacked some features, readesm was clearly too difficult to compile.</p>
<p>In readesm versions since march 2011, both problems are solved.  Readesm now uses <a href="http://www.cmake.org/">cmake</a> for the build process, and <a href="http://qt.nokia.com/">Qt</a> to display the generated html pages in a webkit browser.</p>
<h3>Idea</h3>
<p>The idea behind readesm is to show you exactly what is in the tachograph file.</p>
<h3>Using readesm</h3>
<p>Usually you will either associate readesm with a file extension, and have your file manager open readesm for you.  Or you can open a file from readesm&#8217;s menu.<br />
Alternatively you can use the command line:</p>
<pre>readesm tachofile.ddd</pre>
<p>will open the file in the gui, and</p>
<pre>readesm tachofile.ddd tachofile.html</pre>
<p>will convert the file into html format and save it as <i>tachofile.html</i>.</p>
<h3>Screenshots</h3>
<p><a href='photos/screenshots/readesm/2011.11/vu1.png'><img class='photofiles_thumb' src='thumbs/screenshots/readesm/2011.11/vu1.png.thumb_small.png' alt='link to photos/screenshots/readesm/2011.11/vu1.png' height='100' width='100' title=''/></a> <a href='photos/screenshots/readesm/2011.11/vu2.png'><img class='photofiles_thumb' src='thumbs/screenshots/readesm/2011.11/vu2.png.thumb_small.png' alt='link to photos/screenshots/readesm/2011.11/vu2.png' height='100' width='100' title=''/></a> <a href='photos/screenshots/readesm/2011.11/card1.png'><img class='photofiles_thumb' src='thumbs/screenshots/readesm/2011.11/card1.png.thumb_small.png' alt='link to photos/screenshots/readesm/2011.11/card1.png' height='100' width='100' title=''/></a> </p>
<h3>Free software toolchain for tachographs</h3>
<p>With readesm, <a href="http://developer.berlios.de/projects/fahrlinx/">fahrlinx</a> and <a href="http://andreas.goelzer.de/serial-download-from-a-digital-tachograph-in-python">loadvu</a>, a linux laptop can now connect to vehicle units, read out driver cards and visualize the contents of the files.</p>
<p>To install all three programs in ubuntu:</p>
<pre>sudo apt-add-repository ppa:k-2005
sudo apt-get update
sudo apt-get install readesm fahrlinx loadvu</pre>
<p>It&#8217;s a bit more difficult in Windows, but should be possible nevertheless.</p>
<h3>Download readesm</h3>
<p>Download the latest files from the <a href="https://sourceforge.net/projects/readesm/files/readesm/">project page</a> at sourceforge.  </p>
<ul>
<li>Use the windows-installer (readesm-XX-win32.exe) to install. The latest version should also associate tachograph files with itself.</li>
<li>If you cannot or do not want to install readesm, use readesm-XX-win32.zip</li>
<li>Ubuntu users should either use <a href="https://launchpad.net/~k-2005/+archive/ppa">my ppa</a> or compile from source.</li>
<li>Users of 64 bit windows might be able to run the 32 bit windows version.  Unfortunately, I do not have access to a single 64 bit windows pc.</li>
<li>For other operating systems, download one of the source packages and compile it yourself.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://andreas.goelzer.de/readesm-2011-with-qt-user-interface/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Serial download from a digital tachograph in python</title>
		<link>http://andreas.goelzer.de/serial-download-from-a-digital-tachograph-in-python</link>
		<comments>http://andreas.goelzer.de/serial-download-from-a-digital-tachograph-in-python#comments</comments>
		<pubDate>Mon, 14 Nov 2011 23:11:08 +0000</pubDate>
		<dc:creator>Andreas Goelzer</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Vehicles]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[tachograph]]></category>
		<category><![CDATA[trucks]]></category>
		<category><![CDATA[usb]]></category>

		<guid isPermaLink="false">http://andreas.goelzer.de/?p=243</guid>
		<description><![CDATA[  <a href="http://andreas.goelzer.de/serial-download-from-a-digital-tachograph-in-python">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Digital tachographs are a compulsory equipment for heavy trucks in the european union.  The companies owning these trucks have to download the data at least once every 3 months.</p>
<p>Without dedicated hardware, this was so far not easily possible in linux, but my python script should make it possible to download the data with a serial cable with the right connector.<br />
<span id="more-243"></span></p>
<h3>Ubuntu package</h3>
<p>Ubuntu packages are available in my <a href="https://launchpad.net/~k-2005/+archive/ppa">ppa</a>. You can add my ppa with</p>
<pre>sudo apt-add-repository ppa:k-2005</pre>
<p>and then install loadVu with</p>
<pre>sudo apt-get install loadvu</pre>
<h3>Usage</h3>
<p>Start the program with</p>
<pre>./loadvu</pre>
<p>The data will be saved to a file named after the vehicle and date.<br />
If your serial connection is not /dev/ttyUSB0, you should specify it with the &#8211;serial parameter.  A possible call would be</p>
<pre>./loadvu --serial /dev/ttyUSB1</pre>
<h3>Extra transfer response parameters</h3>
<p>While the commision regulation 1360/2002 defines TREPs 1 to 6 </p>
<table>
<tr>
<th>TRTP/TREP</th>
<th>Description</th>
</tr>
<tr>
<td>1</td>
<td>Overview</td>
</tr>
<tr>
<td>2</td>
<td>Daily Activity on a specified date</td>
</tr>
<tr>
<td>3</td>
<td>Events and faults</td>
</tr>
<tr>
<td>4</td>
<td>Detailed speed</td>
</tr>
<tr>
<td>5</td>
<td>Technical data</td>
</tr>
<tr>
<td>6</td>
<td>Card download</td>
</tr>
</table>
<p>At least the digital tachographs from Siemens VDO return data on other requests, too.  For example Daimler&#8217;s TCO-DKG program requests 17,19 and 20 and saves those to an .add file.  The vu also returns data requesting trtp 18.  To mimic the behaviour of tco-dkg, type</p>
<pre>./loadvu --treps 2,3,4,5 -o mycar.esm
./loadvu --treps 17,19,20 -o mycar.add</pre>
<h3>Download of card data</h3>
<p>It is possible to download the data stored in a driver card inserted into the vehicle unit.  However, in the current version the script will add vehicle data to the file, so few programs will be able to read it.  The current svn of readesm can, but the last release cannot.</p>
<pre>./loadvu --treps 6 -o card.esm</pre>
<p>Future versions might handle this with more elegance.</p>
<h3>Download Speed</h3>
<p>With a digital tachograph from 2007, loadvu tells:</p>
<pre>$ ./loadvu
Sending 'Request Start Communication Request'
Got the expected response
Sending 'Request Diagnostic Session'
Got the expected response
Sending 'Request Request Byte rate 115200'
Got the expected response
[...]
Sending 'Request Stop Communication'
Got the expected response
data saved to UL-XX YYY 2010-11-09 to 2011-11-18 21.54 (CET).esm
Got 222772 Byte in 1789.75275612 seconds. (124.470823827 Byte/s)</pre>
<p>It&#8217;s slow.  Really slow.  Considering how many trucks there are, also expensively slow.  And it&#8217;s not just this script, it&#8217;s that slow with any program.  Why? Hard to tell.  The transfer is slowest when transferring daily activities, where many cryptographic signatures are transferred.  However, there is no technical reason why these would have to be generated at every download, as the data really should not change once written.</p>
<p>Enjoy the script.<br />
<hr /><a href='http://andreas.goelzer.de/download/loadvu-2011.11.tar.gz'><img src="http://andreas.goelzer.de/wp-content/plugins/kfile/fileicons/file-compressed.png" width="16" height="16" alt="filetype" class="icon16" /> loadvu-2011.11.tar.gz</a> (4.96 kiB, 2011-11-18)<br/><hr /></p>
]]></content:encoded>
			<wfw:commentRss>http://andreas.goelzer.de/serial-download-from-a-digital-tachograph-in-python/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>readESM &#8211; Reading Digital Tachograph files</title>
		<link>http://andreas.goelzer.de/readesm-reading-digital-tachograph-files</link>
		<comments>http://andreas.goelzer.de/readesm-reading-digital-tachograph-files#comments</comments>
		<pubDate>Tue, 10 Feb 2009 02:33:51 +0000</pubDate>
		<dc:creator>Andreas Goelzer</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Vehicles]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[tachograph]]></category>
		<category><![CDATA[trucks]]></category>

		<guid isPermaLink="false">http://andreas.goelzer.de/?p=111</guid>
		<description><![CDATA[Update, November 2011: See the post about readesm 2011 and the sourceforge project page for newer descriptions of readesm. Update, March 2011: There is a new release of readesm, The description provided here no longer applies, the new readesm uses &#8230; <a href="http://andreas.goelzer.de/readesm-reading-digital-tachograph-files">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><b>Update, November 2011:</b> <i>See the post about <a href="readesm-2011-with-qt-user-interface">readesm 2011</a> and the <a href="http://sourceforge.net/projects/readesm/files/readesm/">sourceforge project page</a> for newer descriptions of readesm.</i></p>
<p><b>Update, March 2011:</b> <i>There is a new release of readesm,  The description provided here no longer applies, the new readesm uses Qt and cmake.  You can get the new release at the sourceforge <a href="http://sourceforge.net/projects/readesm/files/readesm/">project page</a> and read the documentation <a href="http://readesm.sourceforge.net/help.html">here</a>.</i></p>
<p>For several years now, new trucks sold in the European union are equipped with digital tachographs, that record the driving times and replace the older chart-based mechanical tachographs.</p>
<p>For companies in road transport that means, although in theory they get nice data about their drivers and vehicles, in practice they have to pay a lot of money for the digital tachograph and the associated equipment, which is then used against them &#8211; the old fraud schemes no longer work, the machine cruelly gives every police officer the driving times of the last 28 days (and could give much more).</p>
<p>The usability of the devices I&#8217;m familiar with is also abysmal. It just takes forever to read out the data (9600 baud per default, 115000 baud maximal, but i guess the company&#8217;s software does just the former), and the drivers have to keep track of their times manually &#8211; just not up to par with 2009 technology.</p>
<p>The company also had just a very bad software for analyzing the data recorded by the card and the digital tachograph, so I was asked to write a simple visualization program.</p>
<h3>Compiling</h3>
<p>You can get the program files from this page, or from the <a href="http://sourceforge.net/projects/readesm/">development page</a> at Sourceforge.<br />
Since so far there is no binary distribution for the program, you will have to compile it yourself.<br />
To do that, you need a c++ compiler, parts of the <a href="http://www.boost.org/">boost library</a> (specifically program_options and shared_ptr) and the <a href="http://gmplib.org/">Gnu MP library</a>, wich is used to check the various <a href="http://en.wikipedia.org/wiki/RSA">RSA</a> signatures. Once all those are installed, typing make/make install should work fine. On <a href="http://www.ubuntu.com/">Ubuntu</a> systems, you will need to do something like:</p>
<pre>svn co https://readesm.svn.sourceforge.net/svnroot/readesm readesm
sudo apt-get install libboost-program-options-dev libgmpxx4ldbl  libgmp3-dev
make
sudo make install
</pre>
<p>You can of course also use checkinstall instead of make install, or type make package, which invokes checkinstall.</p>
<h3>Running the program</h3>
<p>In most circumstances, you will run the program from the commandline like this:</p>
<pre>readesm --infile foo.esm --outfile bar.html --format=html</pre>
<p>Alternatively, if no output file is specified, stdout is used. For <a href="http://www.kde.org/">KDE</a> users, i wrote a little wrapper script named readesm-wrap-kde.sh. It will get installed my typing make install</p>
<h3>Security</h3>
<p>It is a really pleasant surprise to see a nice security model in the digital tachographs, considering the rules for the security implementations were made by politicians. Both cards and vehicle units work with 1024-bit RSA keys, and each vehicle unit has its own key, with an certificate signed by the member state, which in turn is signed by an European master key. Data is hashed with SHA-1, subsequently padded and signed by the vehicle unit, and that signature appended to the readouts. The law even states that the companies have to store the data in this signed form, so there is little chance to tamper with the data, once recorded.</p>
<p>Since the most likely attacker &#8211; the evil manager who wants to exploit the drivers &#8211; has physical access to the card and vehicle unit, which contain the private keys, even 1024-bit RSA provides no absolute security. The manager could try a timing attack, or take a really close look at the storage, both times avoiding having to solve the RSA problem.</p>
<p>The connection from tachograph to sensor is also secured, using Triple-DES. The week point here is the sensor &#8211; a successful attack against the sensors some DAF trucks are equipped with is to disturb it using strong permanent magnets, thereby preventing it from recognizing the changing magnetic fields.</p>
<p>All possible attacks against the security system however face the problem of being unveiled by police checkpoints or a cross-correlation of the faked data with data from other sources, for example the toll systems recording every few highway kilometers in Germany.</p>
<p><p><a href='photos/screenshots/readesm/alpha_html_control.png'><img class='photofiles_thumb' src='thumbs/screenshots/readesm/alpha_html_control.png.thumb_small.png' alt='link to photos/screenshots/readesm/alpha_html_control.png' height='100' width='100' title=''/></a> <a href='photos/screenshots/readesm/alpha_html_output.png'><img class='photofiles_thumb' src='thumbs/screenshots/readesm/alpha_html_output.png.thumb_small.png' alt='link to photos/screenshots/readesm/alpha_html_output.png' height='100' width='100' title=''/></a> <a href='photos/screenshots/readesm/card_error.png'><img class='photofiles_thumb' src='thumbs/screenshots/readesm/card_error.png.thumb_small.png' alt='link to photos/screenshots/readesm/card_error.png' height='100' width='100' title=''/></a> <a href='photos/screenshots/readesm/readesm_0.3.2_german_locale.png'><img class='photofiles_thumb' src='thumbs/screenshots/readesm/readesm_0.3.2_german_locale.png.thumb_small.png' alt='link to photos/screenshots/readesm/readesm_0.3.2_german_locale.png' height='100' width='100' title=''/></a> <a href='photos/screenshots/readesm/readesm_0.3.2_windows_xml_2.PNG'><img class='photofiles_thumb' src='thumbs/screenshots/readesm/readesm_0.3.2_windows_xml_2.PNG.thumb_small.png' alt='link to photos/screenshots/readesm/readesm_0.3.2_windows_xml_2.PNG' height='100' width='100' title=''/></a> error, cannot open image photos/screenshots/readesm/2011.11. </p><br />
This is the historical release, described in this post, in case you do not like Qt.  Otherwise, check the <a href="http://sourceforge.net/projects/readesm/files/readesm/">newer versions</a>.<br />
<hr /><a href='http://andreas.goelzer.de/download/readesm.tar.bz2'><img src="http://andreas.goelzer.de/wp-content/plugins/kfile/fileicons/file-compressed.png" width="16" height="16" alt="filetype" class="icon16" /> readesm.tar.bz2</a> (60.86 kiB, 2009-05-19)<br/><hr /></p>
]]></content:encoded>
			<wfw:commentRss>http://andreas.goelzer.de/readesm-reading-digital-tachograph-files/feed</wfw:commentRss>
		<slash:comments>39</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 1/7 queries in 0.007 seconds using disk: basic
Object Caching 324/326 objects using disk: basic

Served from: andreas.goelzer.de @ 2012-02-05 05:54:22 -->
