<?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>MightyOhm &#187; serial</title>
	<atom:link href="http://mightyohm.com/blog/tag/serial/feed/" rel="self" type="application/rss+xml" />
	<link>http://mightyohm.com/blog</link>
	<description>Join the resistance.</description>
	<lastBuildDate>Wed, 16 May 2012 17:02:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Tutorial: Geiger Counter Data Logging</title>
		<link>http://mightyohm.com/blog/2012/02/tutorial-geiger-counter-data-logging/</link>
		<comments>http://mightyohm.com/blog/2012/02/tutorial-geiger-counter-data-logging/#comments</comments>
		<pubDate>Fri, 10 Feb 2012 21:36:49 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Kits]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[FTDI]]></category>
		<category><![CDATA[geiger]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[serial]]></category>

		<guid isPermaLink="false">http://mightyohm.com/blog/?p=4695</guid>
		<description><![CDATA[So, you want to log data with your Geiger Counter kit? Here&#8217;s how to do it! You will need: A MightyOhm Geiger Counter Kit - available on this site or from one of my distributors. A USB-Serial cable I recommend the FTDI TTL-232R-3V3, available from many electronics suppliers, such as Adafruit Industries. The cable must operate with [...]
Related posts:<ol>
<li><a href='http://mightyohm.com/blog/2011/12/processing-sketch-displays-realtime-geiger-counter-data/' rel='bookmark' title='Processing sketch displays realtime Geiger Counter data'>Processing sketch displays realtime Geiger Counter data</a></li>
<li><a href='http://mightyohm.com/blog/2011/11/geiger-counter-kits-are-back-in-stock/' rel='bookmark' title='Geiger Counter Kits are back in stock'>Geiger Counter Kits are back in stock</a></li>
<li><a href='http://mightyohm.com/blog/2011/12/geiger-counter-triggered-non-religious-holiday-lights/' rel='bookmark' title='Geiger counter triggered non-religious holiday lights'>Geiger counter triggered non-religious holiday lights</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/mightyohm/6849183393/in/photostream"><img src="http://farm8.staticflickr.com/7210/6849183393_fca8f395c9.jpg" alt="Logging data from the Geiger Counter Kit" width="500" height="375" /></a></p>
<p>So, you want to log data with your <a href="http://mightyohm.com/geiger">Geiger Counter kit</a>?</p>
<p>Here&#8217;s how to do it!</p>
<p><span id="more-4695"></span></p>
<p>You will need:</p>
<ul>
<li>A <a href="http://mightyohm.com/geiger">MightyOhm Geiger Counter Kit</a> - available on this site or from one of my <a href="http://mightyohm.com/blog/distributors/">distributors</a>.</li>
<li>A USB-Serial cable</li>
<ul>
<li>I recommend the FTDI TTL-232R-3V3, available from many electronics suppliers, such as <a href="http://www.adafruit.com/products/70">Adafruit Industries</a>. The cable must operate with a TTL logic level &#8216;high&#8217; voltage around 3V.  Beware, the FTDI cable works well for this but many others do not!</li>
<li>You can also use the slightly less expensive <a href="https://www.adafruit.com/products/284">FTDI Friend</a>, also available from <a href="http://www.adafruit.com">Adafruit</a>.</li>
</ul>
<li>A serial terminal program for your operating system:</li>
<ul>
<li>Windows: <a href="http://realterm.sourceforge.net/">RealTerm</a></li>
<li>Mac OS X: <a href="http://homepage.mac.com/dalverson/zterm/">ZTerm</a></li>
<li>Linux: <a href="http://cutecom.sourceforge.net/">CuteCom</a></li>
</ul>
</ul>
<h4>Step 1: Configure the software</h4>
<p>Install the serial terminal program for your operating system.  Instructions are included with each of the programs listed above. If you are using Ubuntu, CuteCom is available in the Ubuntu Software Center.</p>
<p>Next, install the drivers for your USB-serial cable. Consult the manufacturers&#8217; website for more information.  The drivers for the FTDI cable (and FTDI Friend) are available <a href="http://www.ftdichip.com/Drivers/VCP.htm">here</a> and instructions for installing them are <a href="http://www.ladyada.net/learn/breakoutplus/ftdifriend.html">here</a>.  If you are using Windows 7 or Linux, you may not need to install any drivers at all &#8211; they are included with your operating system.</p>
<p>You will also want to figure out what port number or device name corresponds to your USB-serial cable. Instructions for doing this are <a href="http://www.ladyada.net/learn/breakoutplus/ftdifriend.html#com_serial_port_name">here</a>.</p>
<h4>Step 2: Connect the USB-Serial cable to your Geiger Counter</h4>
<p>If you haven&#8217;t already, plug your USB-serial cable into a free USB port on your computer (and install the USB drivers as detailed in step 1).</p>
<p>Next, connect the FTDI cable to your Geiger Counter kit, as shown. The connector should be oriented such that the black wire is closest to the &#8220;blk&#8221; silkscreen label on the PCB, and the green wire closest to the &#8220;grn&#8221; label.</p>
<p>If you are using the FTDI Friend, match the writing on the silkscreen of the FTDI Friend to the labels on the Geiger Counter &#8211; BLACK goes towards blk, GREEN towards grn.</p>
<p><a href="http://www.flickr.com/photos/mightyohm/6848906911/in/photostream"><img src="http://farm8.staticflickr.com/7019/6848906911_c30d6a0f8d.jpg" alt="FTDI cable connected" width="500" height="375" /></a></p>
<h4>Step 3: Configure your serial terminal</h4>
<p>Launch the serial terminal program you installed in step 1.  If you are using RealTerm on Windows, you&#8217;ll see a window like this pop up:</p>
<p><a href="http://mightyohm.com/blog/wp-content/uploads/2012/02/realterm.png"><img class="alignnone size-medium wp-image-4715" title="RealTerm" src="http://mightyohm.com/blog/wp-content/uploads/2012/02/realterm-500x319.png" alt="" width="500" height="319" /></a></p>
<p>Now it&#8217;s time to configure your serial program.  I&#8217;m going to show how to do this in RealTerm.  If you&#8217;re using another serial program (or another operating system), the procedure will be slightly different, but the settings are the same.</p>
<p>In the RealTerm window, click on the &#8220;Port&#8221; tab and you&#8217;ll be confronted with a number of options.  Don&#8217;t worry, this is actually pretty simple: You want to select the serial port number or name corresponding to the FTDI cable (port number 22, in my case), and configure the port as follows:</p>
<ul>
<li>Baud: 9600</li>
<li>Data Bits: 8</li>
<li>Stop Bits: 1</li>
<li>Parity: None</li>
<li>Hardware Flow Control: None</li>
<li>Software Flow Control: Off (nothing selected)</li>
</ul>
<p>Aside from the baud rate, the rest of the options should correspond to the defaults. Click &#8220;Open&#8221;, or if Open is already selected, click &#8220;Change&#8221;.</p>
<p>Your RealTerm settings should look like this when you&#8217;re done (click for a larger version):</p>
<p><a href="http://mightyohm.com/blog/wp-content/uploads/2012/02/realterm_config.png"><img class="alignnone size-medium wp-image-4729" title="RealTerm Settings" src="http://mightyohm.com/blog/wp-content/uploads/2012/02/realterm_config-500x319.png" alt="" width="500" height="319" /></a></p>
<h4>Step 4: Turn on your Geiger Counter</h4>
<p>Flip on the power switch for your Geiger Counter kit.</p>
<p>You should see the welcome message</p>
<pre>mightyohm.com Geiger Counter 1.00

http://mightyohm.com/geiger</pre>
<p>and lines of data should start appearing approximately once a second, as shown below:</p>
<p><a href="http://mightyohm.com/blog/wp-content/uploads/2012/02/logging1.png"><img class="alignnone size-medium wp-image-4706" title="RealTerm" src="http://mightyohm.com/blog/wp-content/uploads/2012/02/logging1-500x319.png" alt="" width="500" height="319" /></a></p>
<p>You might notice some funny characters at the end of each line (CRLF).  These are RealTerm&#8217;s way of showing you the line endings &#8211; other terminal programs will probably not have these characters (and they can be turned off in RealTerm if you don&#8217;t like them).</p>
<p>The data should look like this (the numbers may be different):</p>
<pre>CPS, 2, CPM, 15, uSv/hr, 0.08, SLOW
CPS, 0, CPM, 15, uSv/hr, 0.08, SLOW
CPS, 0, CPM, 15, uSv/hr, 0.08, SLOW
CPS, 1, CPM, 16, uSv/hr, 0.09, SLOW
CPS, 0, CPM, 16, uSv/hr, 0.09, SLOW
CPS, 1, CPM, 17, uSv/hr, 0.09, SLOW
CPS, 0, CPM, 16, uSv/hr, 0.09, SLOW</pre>
<h4>Step 5: Log some data</h4>
<p>To actually save (or<em> log</em>) some data, click on the Capture tab.  Uncheck the &#8220;Direct Capture&#8221; box.  The default file path is probably fine for now.</p>
<p>The steps for other terminal programs will be different.  If you get stuck, post in the <a href="http://mightyohm.com/forum/viewforum.php?f=15">support forum</a>.</p>
<p><a href="http://mightyohm.com/blog/wp-content/uploads/2012/02/capture_setup.png"><img class="alignnone size-medium wp-image-4708" title="Capture Setup" src="http://mightyohm.com/blog/wp-content/uploads/2012/02/capture_setup-500x319.png" alt="" width="500" height="319" /></a></p>
<p>Click &#8220;Start Overwrite&#8221;  and the lower portion of the window will turn red to tell you that a capture operation is in progress.</p>
<p><a href="http://mightyohm.com/blog/wp-content/uploads/2012/02/capture1.png"><img class="alignnone size-medium wp-image-4711" title="Capturing data" src="http://mightyohm.com/blog/wp-content/uploads/2012/02/capture1-500x319.png" alt="" width="500" height="319" /></a></p>
<p>When you have collected some data, click the &#8220;Stop Capture&#8221; button to end the capture process.</p>
<p>Open the capture file in Notepad (or another text editor) and you should see lines that look just like what you saw in the terminal window.  You have successfully logged some data! (If you&#8217;re not following along at home, <a href="http://mightyohm.com/files/geiger/capture.txt">here is some sample data</a>.)</p>
<h4>Step 6: Make pretty graphs</h4>
<p>Now that you have some data saved, you can do a lot of interesting things, like make graphs of the background radiation level in your area vs. time.</p>
<p>The captured data is in <a href="http://en.wikipedia.org/wiki/Comma-separated_values">comma-separated value (CSV) format</a>, which is supported by a wide variety of graphing and spreadsheet software, such as Excel.</p>
<p>To make a simple graph, launch Excel and use the Open file dialog to select the captured data file (in this case, C:\Temp\capture.txt).  Make sure the &#8220;All files (*.*)&#8221; option is selected, or the captured data file might not show up.</p>
<p>Excel will ask some questions about the file.  Be sure to select &#8220;Delimited&#8221; for the data type, and select &#8220;Comma&#8221; as the delimeter.  Click Finish, and the captured data should open as a spreadsheet.</p>
<p>Now you can select the data range you want to plot &#8211; usually you will want to highlight an entire column (column F is uSv/hr) and create a Line graph.</p>
<p>Customize the axes and labels and you&#8217;ll have something like this:</p>
<p><a href="http://mightyohm.com/blog/wp-content/uploads/2012/02/Usv.png"><img class="alignnone size-full wp-image-4719" title="Plotted data" src="http://mightyohm.com/blog/wp-content/uploads/2012/02/Usv.png" alt="" width="471" height="274" /></a></p>
<p>You&#8217;re done!</p>
<h4>Conclusion</h4>
<p>I hope this tutorial is helpful for folks wanting to log data from their Geiger Counter kit.  As usual, if you need help, the best place to find it is in the <a href="http://mightyohm.com/forum/viewforum.php?f=15">Geiger Counter support forum</a>.</p>
<p>Have fun!</p>
<p>Related posts:<ol>
<li><a href='http://mightyohm.com/blog/2011/12/processing-sketch-displays-realtime-geiger-counter-data/' rel='bookmark' title='Processing sketch displays realtime Geiger Counter data'>Processing sketch displays realtime Geiger Counter data</a></li>
<li><a href='http://mightyohm.com/blog/2011/11/geiger-counter-kits-are-back-in-stock/' rel='bookmark' title='Geiger Counter Kits are back in stock'>Geiger Counter Kits are back in stock</a></li>
<li><a href='http://mightyohm.com/blog/2011/12/geiger-counter-triggered-non-religious-holiday-lights/' rel='bookmark' title='Geiger counter triggered non-religious holiday lights'>Geiger counter triggered non-religious holiday lights</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://mightyohm.com/blog/2012/02/tutorial-geiger-counter-data-logging/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>The Serial Alphabet</title>
		<link>http://mightyohm.com/blog/2009/06/the-serial-alphabet/</link>
		<comments>http://mightyohm.com/blog/2009/06/the-serial-alphabet/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 15:35:08 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[ASCII]]></category>
		<category><![CDATA[oscilloscope]]></category>
		<category><![CDATA[RS232]]></category>
		<category><![CDATA[serial]]></category>

		<guid isPermaLink="false">http://mightyohm.com/blog/?p=1956</guid>
		<description><![CDATA[All 26 letters of the alphabet displayed as 3.3V RS232 serial bytes. (115200 baud, 8N1) Update: Vimeo seems to be having some technical difficulties today so I switched to the YouTube version instead. Original Link: Serial Alphabet from MightyOhm on Vimeo.]]></description>
			<content:encoded><![CDATA[<p>All 26 letters of the alphabet displayed as 3.3V RS232 serial bytes.  (115200 baud, 8N1)</p>
<p><object width="480" height="385" data="http://www.youtube.com/v/-T4eYFYweW4&amp;hl=en&amp;fs=1&amp;" type="application/x-shockwave-flash"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/-T4eYFYweW4&amp;hl=en&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /></object></p>
<p><strong><br />
Update:</strong> Vimeo seems to be having some technical difficulties today so I switched to the YouTube version instead.</p>
<p>Original Link:</p>
<p><a href="http://vimeo.com/5055465">Serial Alphabet</a> from <a href="http://vimeo.com/user1035632">MightyOhm</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://mightyohm.com/blog/2009/06/the-serial-alphabet/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Building a Wifi Radio &#8211; Part 3, Hacking the Asus WL-520GU</title>
		<link>http://mightyohm.com/blog/2008/10/building-a-wifi-radio-part-3-hacking-the-asus-wl-520gu/</link>
		<comments>http://mightyohm.com/blog/2008/10/building-a-wifi-radio-part-3-hacking-the-asus-wl-520gu/#comments</comments>
		<pubDate>Thu, 30 Oct 2008 17:06:55 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Asus]]></category>
		<category><![CDATA[FTDI]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[serial]]></category>
		<category><![CDATA[Streaming Radio]]></category>
		<category><![CDATA[Wifi]]></category>
		<category><![CDATA[wifiradio]]></category>

		<guid isPermaLink="false">http://mightyohm.com/blog/?p=480</guid>
		<description><![CDATA[This is the third part of an ongoing series about building a low cost, open source streaming internet radio.  If you haven’t already, check out part one and part two for some background about the project. Hacking the Asus WL-520GU Wireless Router: In the last part of this series, I selected the Asus WL-520GU wireless [...]]]></description>
			<content:encoded><![CDATA[<p><em>This is the third part of an ongoing series about building a low cost, open source streaming internet radio.  If you haven’t already, check out <a href="http://mightyohm.com/blog/2008/10/building-a-wifi-radio-part-1-introduction/">part one</a> and <a href="http://mightyohm.com/blog/2008/10/building-a-wifi-radio-part-2-choosing-an-embedded-platform/">part two</a> for some background about the project.</em></p>
<h3><strong>Hacking the Asus WL-520GU Wireless Router:</strong></h3>
<p>In the <a href="http://mightyohm.com/blog/2008/10/building-a-wifi-radio-part-2-choosing-an-embedded-platform/">last part of this series</a>, I selected the <a href="http://www.asus.com/products.aspx?l1=12&amp;l2=43&amp;l3=0&amp;l4=0&amp;model=1671&amp;modelmenu=1">Asus WL-520GU</a> wireless router as a suitable embedded platform for my Wifi Radio project.  I have since posted <a href="http://mightyohm.com/blog/2008/10/detailed-specs-for-the-asus-wl-520gu-uber-hacking-platform/">some detailed specs</a> on this impressive low-cost router, revealing it&#8217;s powerful <a href="http://www.broadcom.com/collateral/pb/5354-PB01-R.pdf">Broadcom BCM5354 core</a>, 4MB flash, and 16MB SRAM.  Granted, there are many more powerful routers out there that have USB support, will run Linux in various forms, and have built-in WiFi.  However, the WL-520GU does almost everything we need to build a streaming internet radio and costs under $50 (I have seen them for <a href="http://www.tkqlhce.com/click-3238164-10440897?url=http%3A%2F%2Fwww.newegg.com%2FProduct%2FProduct.aspx%3FItem%3DN82E16833320023%26nm_mc%3DAFC-C8Junction%26cm_mmc%3DAFC-C8Junction-_-Network%2B-%2BWireless%2BRouters-_-ASUS-_-33320023&amp;cjsku=N82E16833320023" target="_top">as little as $26 after rebate</a><img src="http://www.awltovhc.com/image-3238164-10440897" border="0" alt="" width="1" height="1" />), which is very impressive indeed.</p>
<p>To convert this router into a powerful <a href="http://en.wikipedia.org/wiki/Embedded_system">embedded system</a>, we need to make a couple modifications.  First, we need to throw out the stock <a href="http://en.wikipedia.org/wiki/Firmware">firmware</a>. It turns out that this router, like many others, <a href="http://mightyohm.com/blog/wp-content/uploads/2008/10/wl520gu-stock-firmware-boot.txt">runs Linux from the factory</a>.  However, because it was designed to be a wireless router and not much else, the stock firmware doesn&#8217;t include a very wide set of features (and certainly was not intended to be accessed by the customer).  Thankfully, there are several open source Linux distributions available that support this router, including my favorite, <a href="http://www.openwrt.org">OpenWrt</a>.  In addition, <a href="http://www.asus.com">Asus</a> has made it fairly straightforward replace the stock firmware with our own custom Linux build which can include all the programs, drivers, and utilities we can cram into 4MB of flash.</p>
<h3><strong>Warning:</strong></h3>
<p>Before we start hacking the router, there are a couple things I should mention:</p>
<ul>
<li><strong>From this point onward, your warranty is toast. </strong> Don&#8217;t even <strong>THINK </strong>about trying to send a modified router back to Asus for warranty service.  In the end it hurts people like us, because Asus will try to make it harder for people to perform the same modifications in future products.</li>
<li><strong>You may inadvertently destroy your router.</strong> If you are not comfortable with the fact that a misstep during the reflash or a stray solder bridge could ruin your hardware, stop now.  Sorry.  If you really take a wrong turn, you could damage your PC as well, but this is extremely unlikely.  <em>If you do somehow damage your router or PC doing these modifications, I assume no responsibility for any damages! </em></li>
</ul>
<p>This tutorial assumes that you have already established the router is basically working by assembling it, plugging it in and checking for it&#8217;s wireless signal and internal webserver.  The user manual does a good job of leading you through this process, but don&#8217;t use the supplied CD &#8211; follow the advanced/manual instructions instead.</p>
<h3><strong>Accessing the internal serial port:</strong></h3>
<p>The <a href="http://www.openwrt.org">OpenWrt</a> install will be easier if we can find a way to access the internal serial port of the router.  The built-in serial port gives us a way to view Linux boot and status messages and get <a href="http://en.wikipedia.org/wiki/Shell_access">shell access</a> as well.  The serial port will also come in handy later when we want to add a user interface to the radio.</p>
<h4><strong>You will need:</strong></h4>
<ul>
<li>A desktop or laptop computer with an open USB and Ethernet port. <em><br />
</em></li>
<li>Your shiny new ASUS WL-520GU wireless router (R1.02)</li>
<li>A strip of <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=116">breakaway 0.1&#8243; male header</a></li>
<li>A <a href="http://www.ftdichip.com/Products/EvaluationKits/TTL-232R-3V3.htm">FTDI-232-3V3</a> USB to serial adapter cable ($20 @ <a href="http://www.adafruit.com/index.php?main_page=product_info&amp;products_id=70&amp;sessid=6248f75fb3ff275fdfa9bacf419ca4e5">Adafruit</a>) or some other means of connecting a 3.3V level serial port to your PC</li>
<li>A small scrap of <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=8814">perfboard</a> and a strip of <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=115">female 0.1&#8243; header</a> (not strictly necessary, see below)</li>
</ul>
<p style="padding-left: 30px;">-and-</p>
<ul>
<li>A basic electronics workbench with ample light, a temperature controlled soldering iron, a solder sucker, solderbraid, wirecutters, and pliers.  <a href="http://www.servomagazine.com/">Servo Magazine</a> recently held a contest to see who could build the best electronics workbench for under $100, <a href="http://forum.servomagazine.com/viewtopic.php?t=8370">the results</a> should be helpful for anyone just starting out.  If you&#8217;re uncomfortable soldering, find someone else to help you with this part at your local <a href="http://hackerspaces.org/wiki/Hacker_Spaces">hackerspace</a>.</li>
</ul>
<h4><strong>Step 1 &#8211; Open the router</strong></h4>
<p>Remove the power cord and antenna (the base unscrews).  Flip the router over and look at the bottom.  You should see something like this:</p>
<p><a class="tt-flickr tt-flickr-Medium" title="Asus WL-520GU" href="http://www.flickr.com/photos/mightyohm/2980057258/"><img class="alignnone" src="http://farm4.static.flickr.com/3051/2980057258_b14b4fbd5b.jpg" alt="Asus WL-520GU" width="500" height="375" /></a></p>
<p>Note there are four screws that hold the router together, two are hidden underneath the rubber feet.  The feet are stuck on really well, but persistent prying with a fingernail will get them off eventually.  Remove the four screws and set them aside.  The top cover should come off without too much trouble.</p>
<p>Now that the router is open, you should see something like this:</p>
<p><a class="tt-flickr tt-flickr-Medium" title="Asus WL-520GU Wireless Router" href="http://www.flickr.com/photos/mightyohm/2950280015/"><img class="alignnone" src="http://farm4.static.flickr.com/3203/2950280015_910ea93e73.jpg" alt="Asus WL-520GU Wireless Router" width="500" height="375" /></a></p>
<h4><strong>Step 2 &#8211; Add a serial port header</strong></h4>
<p>Remove the PCB from the plastic enclosure by gently pulling it up and towards you (ethernet ports facing away).</p>
<p>Just to the left of the ASUS logo in the photo below, you will see a 4-pin header that I have installed to access the internal serial port of the router, the router ships without this header.  Instead, you will see four solder filled vias in a row in the same spot.</p>
<p>You will need to use your soldering iron and a solder sucker to remove most of the solder so that the header can be installed.  A higher power soldering iron will help with removing solder from the first via on the left (mine is a 60W <a href="javascript:OnClick=self.openwindow('037103001146')">Weller WTCPT</a>).  This via connects to a <a href="http://en.wikipedia.org/wiki/Ground_plane#Printed_circuit_boards">ground plane</a> which sucks heat away from the iron and makes the job more difficult.  Be patient and persistent and you should be able to wick any remaining solder away with some soldering braid if necessary.</p>
<p>Break a 4-pin chunk of male header off the strip.  Pop the header into the board and carefully solder it into place.  If it doesn&#8217;t fit, chances are there is still some solder left in the vias.  You should end up with something like this:</p>
<p><a class="tt-flickr tt-flickr-Medium" title="WL-520GU serial port" href="http://www.flickr.com/photos/mightyohm/2980058214/"><img class="alignnone" src="http://farm4.static.flickr.com/3145/2980058214_09a5945b38.jpg" alt="WL-520GU serial port" width="500" height="375" /></a></p>
<p>The pin functions are, from left to right in the photo:</p>
<blockquote><p>GND   TX   RX   3.3V</p></blockquote>
<h4>Step 3 &#8211; Connect your PC</h4>
<p>The <a href="http://www.ftdichip.com/Products/EvaluationKits/TTL-232R-3V3.htm">FTDI-232-3V3</a> USB to serial adapter cable provides a handy way to add a 3.3V TTL level serial port to a PC or laptop.  The cable has a flat connector on the serial end that can plug directly onto 0.1&#8243; male headers like the one we are using on the router.  Unfortunately, the pinout of the FTDI cable (<a href="http://www.ftdichip.com/Documents/DataSheets/Modules/DS_TTL-232R_CABLES_V201.pdf">given in the datasheet</a>) does not match that of the router.  To resolve this, you have two options:</p>
<ul>
<li>Use a tiny screwdriver to pull out the pins from the housing at the cable and rearrange them.  Do not connect anything to the 3.3V pin on the router, and swap the TX/RX so that the TX on the router feeds RX on the cable, and vice-versa.  Don&#8217;t forget to connect the grounds!  The downside of this is that now you can&#8217;t use the FTDI cable for things like the <a href="http://www.ladyada.net/make/boarduino/">Boarduino</a> without swapping the pins back.</li>
</ul>
<p style="padding-left: 30px;">-or-</p>
<ul>
<li>Fabricate an adapter board using a small piece of perfboard and some headers, shown below (click for a larger version):</li>
</ul>
<p><a class="tt-flickr tt-flickr-Small" title="Asus wireless router serial port adapter" href="http://www.flickr.com/photos/mightyohm/2979200785/"><img class="alignnone" src="http://farm4.static.flickr.com/3284/2979200785_01c8d3c294_m.jpg" alt="Asus wireless router serial port adapter" width="240" height="180" /></a> <a class="tt-flickr tt-flickr-Small" title="Asus wireless router serial port adapter" href="http://www.flickr.com/photos/mightyohm/2980057458/"><img class="alignnone" src="http://farm4.static.flickr.com/3278/2980057458_e364b3857d_m.jpg" alt="Asus wireless router serial port adapter" width="240" height="180" /></a></p>
<p>Here is a schematic of the adapter board:</p>
<p><a href="http://mightyohm.com/blog/wp-content/uploads/2008/10/asus-serial-port-adapter.png"><img class="alignnone size-full wp-image-481" title="Asus Serial Port Adapter" src="http://mightyohm.com/blog/wp-content/uploads/2008/10/asus-serial-port-adapter.png" alt="" width="500" height="372" /></a></p>
<p>Shown here are the cable and adapter installed on the router.  Make sure the ground side of the cable is connected to the pin on the header that is <strong>opposite</strong> from the fat angled trace (the 3.3V line).  Ground is the black wire, on my adapter I marked this with a black dot so I won&#8217;t forget and plug it in backwards.</p>
<p><a class="tt-flickr tt-flickr-Medium" title="WL-520GU with serial cable installed" href="http://www.flickr.com/photos/mightyohm/2980057918/"><img class="alignnone" src="http://farm4.static.flickr.com/3241/2980057918_e1b12e577a.jpg" alt="WL-520GU with serial cable installed" width="500" height="375" /></a></p>
<h4>Step 4 &#8211; Test the connection</h4>
<p>Plug the cable into your PC (you may need some <a href="http://www.ftdichip.com/Drivers/VCP.htm">drivers</a>) and open your favorite terminal program.  (I like <a href="http://homepage.mac.com/dalverson/zterm/">Zterm</a> for the Mac or Hyperterminal on the PC.)   Using the terminal program, open the serial port corresponding to the FTDI cable (something like <em>usbserial-FTDQ23LB</em> on the Mac or <em>COM3</em> on the PC, but your setup may be different.)   Set the port options to 115200 baud, 8N1.</p>
<p>Connect the antenna and power supply to the router and plug it in.  You should see something like this appear in your terminal program:</p>
<blockquote>
<pre>Decompressing..........done</pre>
<pre>CFE version 1.0.37 for BCM947XX (32bit,SP,LE)</pre>
<pre>Build Date: Thu Mar  6 10:05:04 CST 2008 (root@localhost.localdomain)</pre>
<pre>Copyright (C) 2000,2001,2002,2003 Broadcom Corporation.</pre>
<pre>Initializing Arena</pre>
<pre>Initializing Devices.</pre>
<pre>Boot partition size = 131072(0x20000)</pre>
<pre>et0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 4.130.31.0</pre>
<pre>
<pre>Total memory: 16384 KBytes</pre>
</pre>
<pre>CPU type 0x29029: 240MHz
...</pre>
</blockquote>
<p>If you do, congratulations, your serial port is working!</p>
<p>The lines that scroll by are boot messages from the Linux <a href="http://en.wikipedia.org/wiki/Linux_kernel">kernel</a> of the stock firmware on the router.  These messages give you a lot of information about the hardware in addition to information about the operating system and software drivers.  Here is a <a href="http://mightyohm.com/blog/wp-content/uploads/2008/10/wl520gu-stock-firmware-boot.txt">complete transcript of the boot log</a> from my router.  If you wait a couple minutes for the router to finish booting and hit enter, you should see a command prompt.  From here you can explore and play around with the stock firmware, there is really not much to do here until we reflash the router with OpenWrt.</p>
<p>That&#8217;s it for part three.  In <a href="http://mightyohm.com/blog/2008/11/building-a-wifi-radio-part-4-installing-openwrt/">part four</a>, I&#8217;ll talk about installing OpenWrt and connecting the router to your wireless network.</p>
<p><strong>Update: </strong><a href="http://mightyohm.com/blog/2008/11/building-a-wifi-radio-part-4-installing-openwrt/">Part four is now available.</a></p>
<p><strong>Update 2:</strong> There is a new <a href="http://mightyohm.com/forum/viewforum.php?f=2">Wifi Radio Discussion Forum</a>, hop over there to ask questions about the project or see what other people are working on!  (<em>4/12/09)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://mightyohm.com/blog/2008/10/building-a-wifi-radio-part-3-hacking-the-asus-wl-520gu/feed/</wfw:commentRss>
		<slash:comments>53</slash:comments>
		</item>
	</channel>
</rss>

