<?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>Madox.NET &#187; FTDI</title>
	<atom:link href="http://www.madox.net/blog/tag/ftdi/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.madox.net/blog</link>
	<description>Perversions of an Engineer</description>
	<lastBuildDate>Mon, 30 Jan 2012 12:21:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>mChumby &#8211; Test run</title>
		<link>http://www.madox.net/blog/2009/07/15/mchumby-test-run/</link>
		<comments>http://www.madox.net/blog/2009/07/15/mchumby-test-run/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 10:12:29 +0000</pubDate>
		<dc:creator>Madox</dc:creator>
				<category><![CDATA[Microcontrollers]]></category>
		<category><![CDATA[Perverse Applications of Science...]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[CAN Bus]]></category>
		<category><![CDATA[Chumby]]></category>
		<category><![CDATA[FTDI]]></category>
		<category><![CDATA[HaXe]]></category>
		<category><![CDATA[Mazda]]></category>

		<guid isPermaLink="false">http://www.madox.net/blog/?p=498</guid>
		<description><![CDATA[After getting my EasySync USB-Can Adapter it was time to resurrect the mChumby project.  The interface GUI design hasn&#8217;t changed much, namely because its been lying idle but I figured it is good enough to try putting it onto the car for a test run. I didn&#8217;t want to fiddle around with getting power to [...]]]></description>
			<content:encoded><![CDATA[<p>After getting my <a href="http://www.madox.net/blog/2009/06/30/easysync-usb-can-bus-adapter-works-great-in-ubuntu-after-some-fiddling/" target="_blank">EasySync USB-Can Adapter</a> it was time to resurrect the <a href="http://http://www.madox.net/blog/2009/03/23/mchumby-mazdamadox-chumby/" target="_blank">mChumby</a> project.  The <a href="http://www.madox.net/blog/2009/04/06/mchumby-interface-design/" target="_blank">interface GUI design</a> hasn&#8217;t changed much, namely because its been lying idle but I figured it is good enough to try putting it onto the car for a test run.</p>
<p>I didn&#8217;t want to fiddle around with getting power to the Chumby, so the test is simply using my trusty old laptop and the EasySync adapter.  Only the speedometer, the tachometer and the accelerator pedal position is attached because again I&#8217;m too lazy to fiddle with my cable layout and as such its connected to the <a href="http://www.madox.net/blog/mazda-can-bus/" target="_blank">Mazda HS-Can</a> bus only rather than the MS-Can where the <a href="http://www.madox.net/blog/2008/11/17/reverse-engineering-the-mazda-can-bus-part-1/" target="_blank">goodie trip computer information is contained.</a></p>
<p>Almost every concoction of technology is used ranging from CAN, USB, PHP, HTTP, Shared Memory, XML, Flash, to an obscure programming language called HaXe.  Here is the result :-</p>
<p><span id="more-498"></span></p>
<p style="text-align: center;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/1NRWEeg4KeE" /><embed type="application/x-shockwave-flash" width="425" height="350" src="http://www.youtube.com/v/1NRWEeg4KeE"></embed></object></p>
<p style="text-align: center;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/Y8t7p2WR_3k" /><embed type="application/x-shockwave-flash" width="425" height="350" src="http://www.youtube.com/v/Y8t7p2WR_3k"></embed></object></p>
<p>The flash movie was set to 6 frames per second and the responsiveness of the data was superb.  I think I&#8217;ve stated before that the CAN speed data differs to the one displayed on the instrumentation cluster and this again really shows at higher speeds.</p>
<p>All I need to do now is to try it on a <a href="http://www.chumby.com/" target="_blank">Chumby</a>, there should be no portability issues as I&#8217;ve tested both flash and php on the Chumby before.</p>
<p>So does anyone have any comments and suggestions on the GUI and what else I could put on it?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.madox.net/blog/2009/07/15/mchumby-test-run/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>EasySync USB-CAN Bus Adapter &#8211; Works great in Ubuntu after some fiddling</title>
		<link>http://www.madox.net/blog/2009/06/30/easysync-usb-can-bus-adapter-works-great-in-ubuntu-after-some-fiddling/</link>
		<comments>http://www.madox.net/blog/2009/06/30/easysync-usb-can-bus-adapter-works-great-in-ubuntu-after-some-fiddling/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 12:52:30 +0000</pubDate>
		<dc:creator>Madox</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Software Problems Help]]></category>
		<category><![CDATA[Software Tips & Tricks]]></category>
		<category><![CDATA[CAN Bus]]></category>
		<category><![CDATA[Chumby]]></category>
		<category><![CDATA[Free Software]]></category>
		<category><![CDATA[Free Software Tips]]></category>
		<category><![CDATA[FTDI]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.madox.net/blog/?p=476</guid>
		<description><![CDATA[The toys just keep coming in!  Another one of those wallet killing impulsive orders whilst I was sick in bed last week just arrived today, a USB-CAN bus converter module by EasySync that promises a great interface and should work in Linux!  This will give a little bump start to my Mazda CAN Bus / [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_477" class="wp-caption aligncenter" style="width: 368px"><a href="http://www.madox.net/blog/wp-content/uploads/2009/06/CIMG2414A.JPG"><img class="size-medium wp-image-477" title="CIMG2414A" src="http://www.madox.net/blog/wp-content/uploads/2009/06/CIMG2414A-358x300.jpg" alt="Neat little package" width="358" height="300" /></a><p class="wp-caption-text">Neat little package</p></div>
<p>The toys just keep coming in!  Another one of those wallet killing impulsive orders whilst I was sick in bed last week just arrived today, a USB-CAN bus converter module by <a href="http://www.easysync.co.uk/" target="_blank">EasySync</a> that promises a great interface and should work in Linux!  This will give a little bump start to my <a href="http://www.madox.net/blog/mazda-can-bus/" target="_blank">Mazda CAN Bus</a> / <a href="http://www.madox.net/blog/2009/03/23/mchumby-mazdamadox-chumby/" target="_blank">mChumby</a> projects.</p>
<p><em>Note : EasySync UK&#8217;s online form doesn&#8217;t allow international shipping but a short E-mail or two managed that.  There is a US subsidiary with US and international shipping, but the international shipping rates on the US site is plain ridiculous [$68USD to ship a $88 device to Australia].</em></p>
<p><em>Note 2 : I hear the interface is mimicking the Lawicel CAN-USB interface&#8230;only hearsay&#8230;<br />
</em></p>
<p>Plugged it in &#8211; didn&#8217;t work.  Doh!  Took a peek at the manual and website, nothing on Linux other than &#8220;Linux drivers provided&#8221;&#8230; So much for the marketing material, guess I have to try make it work myself.  (Yes I got it working, read on for the quick run-down post aimed at helping others)</p>
<p><span id="more-476"></span></p>
<div id="attachment_478" class="wp-caption aligncenter" style="width: 460px"><a href="http://www.madox.net/blog/wp-content/uploads/2009/06/CIMG2417A.JPG"><img class="size-medium wp-image-478" title="CIMG2417A" src="http://www.madox.net/blog/wp-content/uploads/2009/06/CIMG2417A-450x282.jpg" alt="Sneak peek inside the box" width="450" height="282" /></a><p class="wp-caption-text">Sneak peek inside the box</p></div>
<p>Now with the photos out of the way, a little bit of detective work is ahead of us&#8230; why doesn&#8217;t this thing work&#8230; I paid so much money for it to replace the qprotos adapter!</p>
<p>A little bit of lsusb (or cat /proc/bus/usb/devices if you&#8217;ve got usbdevfs) sleuthing later&#8230;</p>
<blockquote>
<pre>Bus 003 Device 004: ID 0403:fac6 Future Technology Devices International, Ltd
Device Descriptor:
 bLength                18
 bDescriptorType         1
 bcdUSB               2.00
 bDeviceClass            0 (Defined at Interface level)
 bDeviceSubClass         0
 bDeviceProtocol         0
 bMaxPacketSize0         8
 idVendor           0x0403 Future Technology Devices International, Ltd
 idProduct          0xfac6
 bcdDevice            6.00
 iManufacturer           1 EasySync
 iProduct                2 USB2-F-7001 CAN-Plus Adapter
 iSerial                 3 ESNFWLPL
 bNumConfigurations      1
 Configuration Descriptor:
 bLength                 9
 bDescriptorType         2
 wTotalLength           32
 bNumInterfaces          1
 bConfigurationValue     1
 iConfiguration          0
 bmAttributes         0x80
 (Bus Powered)
 MaxPower              150mA
 Interface Descriptor:
 bLength                 9
 bDescriptorType         4
 bInterfaceNumber        0
 bAlternateSetting       0
 bNumEndpoints           2
 bInterfaceClass       255 Vendor Specific Class
 bInterfaceSubClass    255 Vendor Specific Subclass
 bInterfaceProtocol    255 Vendor Specific Protocol
 iInterface              2 USB2-F-7001 CAN-Plus Adapter
 Endpoint Descriptor:
 bLength                 7
 bDescriptorType         5
 bEndpointAddress     0x81  EP 1 IN
 bmAttributes            2
 Transfer Type            Bulk
 Synch Type               None
 Usage Type               Data
 wMaxPacketSize     0x0040  1x 64 bytes
 bInterval               0
 Endpoint Descriptor:
 bLength                 7
 bDescriptorType         5
 bEndpointAddress     0x02  EP 2 OUT
 bmAttributes            2
 Transfer Type            Bulk
 Synch Type               None
 Usage Type               Data
 wMaxPacketSize     0x0040  1x 64 bytes
 bInterval               0
Device Status:     0x0000
 (Bus Powered)</pre>
</blockquote>
<p>Yup definitely a FTDI device, even with the FTDI vendor ID (Did I mention I love FTDI?).  Looks like EasySync decided they wanted their own unique product ID, unfortunately that means the vanilla ftdi_sio drive won&#8217;t pick it up without a little bit of coercing.</p>
<p>The little bit of coercing goes like&#8230;</p>
<blockquote><p><em>modprobe ftdi_sio vendor=0&#215;0403 product=0xfac6</em></p></blockquote>
<p>And bingo&#8230;</p>
<blockquote>
<pre>[ 6372.229046] usb 2-2: new full speed USB device using uhci_hcd and address 3
[ 6372.437247] usb 2-2: configuration #1 chosen from 1 choice
[ 6372.439834] ftdi_sio 2-2:1.0: FTDI USB Serial Device converter detected
[ 6372.439872] usb 2-2: Detected FT232RL
[ 6372.439934] usb 2-2: FTDI USB Serial Device converter now attached to ttyUSB0</pre>
</blockquote>
<p>Using putty to connect to ttyUSB0 at 115200, and typing &#8220;H&#8221; followed by &#8220;Enter&#8221; gives us</p>
<blockquote>
<pre>=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2009.06.30 21:23:18 =~=~=~=~=~=~=~=~=~=~=~=
H
List of Supported Commands
O - Open CAN Channel
C - Close CAN Channel
t - Transmit Standard Frame
T - Transmit Extended Frame
F - Read Status Flag
V - USB2-F-7001 Version
N - Serial Number of USB2-F-7001
Z - TimeStamp Option On/Off
S - Set CAN Bit Rate
s - Set BRGCON Registers
m - Set Acceptance Mask
M - Set Acceptance Filter
B - Enter Bootload Mode
L - Set Listen Mode
E - Clear Buffers and Echo Char
R - Reset USB2-F-7001
H, ? or h - Help on USB2-F-7001 Commands</pre>
</blockquote>
<p>Only problem is that its Mac style line endings.  Even the append CR to LF option in putty is useless because the stream seems to be CR without LF&#8230;  Doesn&#8217;t hurt too much except displaying it is a bit annoying.</p>
<p>The EasySync USB-CAN adapter&#8217;s pinout is pretty much standard DB9 for CAN Bus and all I had to do was connect my existing J1962 (aka OBD-II aka DLC-2) cable on and onto the car I went.</p>
<p>A couple of short &#8220;S6&#8243; (500kbps) &#8220;L&#8221; (Open connection for listen mode) commands later, I had CAN data being spat back at me</p>
<blockquote>
<pre>t04680601FF0000000000
t04680601FF0000000000
t04680601FF0000000000
t04680601FF0000000000
t04680601FF0000000000
t20F8FFFF27104000FF01
t2118FFFF000040000001
t4B082710271027102710
t19080000000000000000</pre>
</blockquote>
<p>All is good&#8230;except I just deleted my Chumby Development Virtual Machine a few hours ago&#8230;ooops&#8230;another day before I use this neat little adapter for <a href="http://www.madox.net/blog/2009/03/23/mchumby-mazdamadox-chumby/" target="_blank">mChumby</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.madox.net/blog/2009/06/30/easysync-usb-can-bus-adapter-works-great-in-ubuntu-after-some-fiddling/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
	</channel>
</rss>

