<?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>Your Warranty Is Void.com &#187; How-To&#8217;s</title>
	<atom:link href="http://www.yourwarrantyisvoid.com/category/howtos/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.yourwarrantyisvoid.com</link>
	<description>Linux, Hardware, Software and Chaos. What more is there?</description>
	<lastBuildDate>Wed, 08 Sep 2010 18:13:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Dead Dockstar Resurrected with JTAG!</title>
		<link>http://www.yourwarrantyisvoid.com/2010/09/08/dead-dockstar-resurrected-with-jtag/</link>
		<comments>http://www.yourwarrantyisvoid.com/2010/09/08/dead-dockstar-resurrected-with-jtag/#comments</comments>
		<pubDate>Wed, 08 Sep 2010 17:08:38 +0000</pubDate>
		<dc:creator>firestorm_v1</dc:creator>
				<category><![CDATA[Embedded devices]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[How-To's]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Dockstar]]></category>
		<category><![CDATA[JTAG]]></category>
		<category><![CDATA[seagate]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://www.yourwarrantyisvoid.com/?p=595</guid>
		<description><![CDATA[The reason I haven&#8217;t written any more about my fun with the Dockstar was that due to an unfortunate set of circumstances I was left with a bricked dockstar. (read: I did something stupid.)  After performing a lot of research and thanks to a bunch of people over at the PlugApps.com Forum site who helped [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/Dead-Dockstar-plus-JTAG-equals-WIN.jpg"><img class="aligncenter size-full wp-image-594" title="Dead Dockstar plus JTAG equals WIN" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/Dead-Dockstar-plus-JTAG-equals-WIN.jpg" alt="Hey, I never said I was a graphics designer.  This was created in MS Paint after 15 minutes searching for a zombie icon and a JTAG icon or an angel I could slap JTAG over. " width="473" height="76" /></a></p>
<p>The reason I haven&#8217;t written any more about my fun with the Dockstar was that due to an unfortunate set of circumstances I was left with a bricked dockstar. (read: I did something stupid.)  After performing a lot of research and thanks to a bunch of people over at the <a href="http://plugapps.com/forum" target="_blank">PlugApps.com Forum site</a> who helped me, I was able to get it running.  Read more for a complete list of what you will need including how to build an adapter and where to get the needed JTAG kit.<span id="more-595"></span></p>
<h2>Before we begin</h2>
<p>This document demonstrates how to recover your Dockstar and upload a custom bootloader to it using a JTAG cable.  JTAG is used for low-level in-circuit debugging of embedded applications and is very hardware specific. If you are familiar with working with Linksys routers and uploading custom firmware to them, you have heard of the term bricking and you have more than likely heard of something called JTAG that is used to recover it.</p>
<p>Because of the nature of JTAG and the fact that manufacturers don&#8217;t typically like us having access to the JTAG port, these ports are often hidden in many different locations, usually unmarked or unpopulated headers, or other odd locations and is the way that the manufacturer loads the firmware for the very first time on to a new device.</p>
<p>By using JTAG, we can place the hardware into a &#8220;debug&#8221; mode where we can manipulate the microprocessor&#8217;s core functionality.  We can also send instructions to it, monitor responses from it, or even pause the chip, leaving it in a state of suspended animation until we issue the command to start it up again or reset the device.</p>
<p>In this particular howto, we will cover how to use the debug mode of the Marvell chip in the Dockstar to upload a new boot loader in order to rewrite the bootloader to the onboard Flash which will result in a working, new Dockstar.  Please note that if you have NOT bricked your dockstar, there is no need to perform the steps in this howto.  This is only for bricked dockstars that have been verified with a serial adapter to be dead. (A dead dockstar will produce NO serial output and the front panel LED will not light up when power is applied.)</p>
<h2>Legal Disclaimer</h2>
<p>By performing the steps outlined in this document, you agree not to hold firestorm_v1, YourWarrantyIsVoid.com or any other linked sites, forums, companies, liable if you really screw something up.  You can also not hold any of these entities responsible for data loss, physical damage, emotional trauma, spousal abuse or any other act of whatever god(s) that you may have happen to you.  In short, Read twice, type once, hit enter and don&#8217;t screw up.  If you&#8217;re at this point, then you&#8217;ve already come to terms that your dockstar may be unrecoverable already so deal with it.</p>
<h2>Parts List</h2>
<p>In order to perform this recovery, you will need the following items:</p>
<ol>
<li>The dead seagate dockstar and power supply.</li>
<li>A handful of 2.0mm female connectors or one 2.0mm female connector with at least 10 pins (5 pins in 2 rows)</li>
<li>A 10 pin header that matches your PCB 2.5mm spacing  (again, 5 pin, 2 row)</li>
<li>A bit of holed PCB board 2.5mm pin spacing. (Radio Shack is good for this kind of stuff)</li>
<li>A CA-42 cable with the appropriate pins as <a href="http://www.yourwarrantyisvoid.com/2010/07/21/seagate-dockstar-add-an-accessible-serial-port/" target="_blank">outlined in my previous Dockstar post</a>.</li>
<li>A handful of extra breadboard jumpers.</li>
<li>Superglue</li>
<li>A Windows PC (2k or XP, untested on vista/7 although plugapps forums says it should work.) with a Parallel Port</li>
<li>Whatever provisions needed for the CA-42 cable to work properly.  (I have to use a linux box to SSH to, you can do the same or if your Windows computer works with the CA42 cable, you can use that as well.  You don&#8217;t need two PCs for this operation.)</li>
<li>A TAIO Buffered/Unbuffered &#8220;Universal&#8221; Parallel Port JTAG module kit (<a href="http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&amp;item=270528612875" target="_blank">Here&#8217;s the eBay seller where I got mine, ~$21.00 out the door</a>) and a Parallel cable extension (Male to Female) so that you can reach it without having to get behind your PC. For my setup, I used an old iomega Parallel/SCSI Zip drive cable. I also recommend the ebay link as this is the seller that I purchased mine from and it comes with a lot of extra jumpers that are very useful for this project.</li>
<li>A USB A to USB mini B cable (for powering up the JTAG adapter).</li>
<li>Glue gun with extra gluesticks</li>
<li>Heatshrink tubing and lighter/heat source</li>
<li>In lieu of building/reinforcing your JTAG cable, you can use a laptop hard drive adapter (3.5 IDE to 2.5IDE) if you&#8217;re in a pinch and just need to get it running.</li>
</ol>
<p>In addition to the above items, you will need the following software applications:</p>
<ol>
<li><a href="http://www.plugapps.com/forum/download/file.php?id=20" target="_blank">Kragorn&#8217;s copy of dockstar.cfg</a> &#8211; <a href="http://www.yourwarrantyisvoid.com/downloads/files/dockstar.zip" target="_blank">Mirrored Here</a></li>
<li><a href="http://www.freddiechopin.info/index.php/en/download/category/4-openocd" target="_blank">A copy of OpenOCD</a> &#8211; <a href="http://www.yourwarrantyisvoid.com/downloads/files/openocd-0.4.0.zip" target="_blank">Mirrored Here</a></li>
<li>A copy of the <a href="http://jeff.doozan.com/debian/uboot/uboot-original-mtd0.kwb" target="_blank">Jeff Doozan&#8217;s custom USB-boot capable u-boot</a> (Recommended!) (<a href="http://www.yourwarrantyisvoid.com/downloads/files/uboot-original-mtd0.kwb" target="_blank">Mirrored Here</a>) or a copy of another factory or custom uBoot.  If you want to compile your own, there&#8217;s a great write-up here: <a href="http://jeff.doozan.com/debian/uboot/" target="_blank">http://jeff.doozan.com/debian/uboot/</a></li>
<li>A copy of PuTTY for Serial/Telnet communication.  You can <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html" target="_blank">download it here</a>.</li>
</ol>
<h2>Getting Started</h2>
<p>This howto will be divided up into several sections:</p>
<p><strong>Section I:</strong>Building an adapter cable &#8211; This section will cover how to build the required cable from spare 2MM connectors or if you already have the proper cable, this will describe how to reinforce it for repeated use using heatshrink tubing. I call it a smokestack cable because it resembles a small smokestack sticking out of the Dockstar&#8217;s mainboard.</p>
<p><strong>Section II:</strong> Wiring it all up &#8211; This will cover the Dockstar&#8217;s pinout, the TAIO parallel port pinout, the serial port pinout and how to wire it up together.</p>
<p><strong>Section III:</strong> Performing the JTAG recovery &#8211; This is where the actual recovery process takes place now that we have everything wired up.</p>
<p><strong>Section IV:</strong> Notes and credits &#8211; As much as I&#8217;d like to say this was all my doing, truth is it&#8217;s not.  I couldn&#8217;t have done it without some great people from the PlugApps forums.</p>
<p>Each section will have lots of pictures that you can use as a guide to make sure you&#8217;re making the right connections.</p>
<h2><span style="color: #ff0000;"><em><span style="text-decoration: underline;"><strong>BIG FAT OBNOXIOUS WARNING!!!</strong></span></em></span></h2>
<p>Although there are as many JTAG adapters on the market as there fish in the sea, I can not cover each and every device&#8217;s unique configuration options. Generally the JTAG port is a universal standard but many vendors implement their own standard, have other standards that they choose to leave out and their pin configurations may not match what is given here.  This article is based on my experience performing the JTAG restoration of a dockstar I broke using the equipment and the software outlined above.  If you are new to JTAG, I recommend using the versions and adapter board listed as other devices/software may not work in the same way.  When in doubt, go with what you know!</p>
<h2>Section I: Building out the JTAG adapter cable.</h2>
<p>The dockstar&#8217;s JTAG port uses a 2.0 mm spacing and while it&#8217;s good for tight spaces, isn&#8217;t exactly ideal when dealing with breadboard jumpers as most breadboards have a 2.5mm spacing and the jumpers have connectors to match.  In this instance I felt that since I was going to be working on actually developing code for the Dockstar, the inevitable would happen and I would end up bricking it through a random error (namely user failure) and would need a quick and reliable connector that I could use to quickly connect and disconnect the JTAG port as needed during restore and development.</p>
<p>I checked out EPO and managed to find several 2.0mm spaced connectors however these were in groups of three and while they would work, would require significant effort to harden the connectors to something that could stand the test of repeated connections and disconnections. So let&#8217;s get started.</p>
<div id="attachment_611" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/conntest.jpg"><img class="size-medium wp-image-611" title="Connector Test" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/conntest-300x225.jpg" alt="Connector Test" width="300" height="225" /></a><p class="wp-caption-text">Checking the connectors to make sure they would work</p></div>
<p>This is a shot of the connectors standing out of the Dockstar.  Since I had four connectors with 3 pins each, this means that I had two pins that hung over the connector block on the Dockstar.  Since these two wires were not needed, I cut them and removed the metal connector from inside the plastic, leaving 10 wires for 10 pins of the dockstar&#8217;s JTAG port.  We&#8217;ll deal with the two vacant holes later.</p>
<p><strong>Little known fact:</strong> The pin spacing on the Dockstar&#8217;s JTAG port is identical to that of a laptop hard drive (which is why this part of the process is optional.)  In a pinch, you can use a laptop IDE adapter similar to <a href="http://www.geeks.com/details.asp?invtid=HD-108&amp;cat=CBL" target="_blank">this one</a> (in fact I own several exactly like this).  If you decide to use a laptop IDE adapter, use the part of the adapter <strong>opposite the power connector</strong>.</p>
<p>Since the goal is to harden the four little connectors to one single connector, I used a dead laptop hard drive and superglued the four connectors together. <strong>USE THE SUPERGLUE SPARINGLY!!</strong> You do not want to superglue your connectors to a hard drive so only put a tiny amount. It also helps to put a dab of glue on one connector, then put the connectors together as you&#8217;re pushing them onto the laptop HD pins.  Make sure they are completely seated so they will be even as possible.  If you see the pins of the laptop HD, you&#8217;re not down far enough.</p>
<div id="attachment_612" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/connglue.jpg"><img class="size-medium wp-image-612" title="Glued 2.0MM connectors" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/connglue-300x225.jpg" alt="Glued 2.0MM connectors curing on a laptop HD." width="300" height="225" /></a><p class="wp-caption-text">Glued 2.0MM connectors curing on a laptop HD.</p></div>
<p>Once you get all four connectors onto the laptop HD and properly aligned, let it cure for at least an hour.  This will ensure that the superglue bonds correctly and the connector doesn&#8217;t fall apart later.</p>
<div id="attachment_613" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/glueset.jpg"><img class="size-medium wp-image-613" title="Glued connectors after setting." src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/glueset-300x225.jpg" alt="Glued connectors after the superglue set." width="300" height="225" /></a><p class="wp-caption-text">Glued connectors after the superglue set.</p></div>
<p>Now that the superglue has set, check that it still fits in the Dockstar. On the connectors used here, my wires were quite long. To alleviate yet another mass of cable snakes on my desk, I cut them down to about three inches, which should be big enough to handle, but small enough to not get in the way. You can cut your wires to any length desired.</p>
<p>In order to solder to the 10 pin header and ensure that the wires would not seperate from use, I chose to use a small piece of PCB as shown below.</p>
<div id="attachment_614" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/hdrbb.jpg"><img class="size-medium wp-image-614" title="Header and Breadboard" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/hdrbb-300x225.jpg" alt="Header and Breadboard" width="300" height="225" /></a><p class="wp-caption-text">Header and Breadboard</p></div>
<p>Keep in mind that if you cut your own, you&#8217;re soldering 10 wires into a 10 pin header, so you will need a 20 hole piece of PCB (5 holes by 4 holes).  The idea here is that the wires will come in on the component side of the PCB and wrap around it then go further down to the 2.0mm connector we just glued together.   Go ahead and solder the header into the center two rows of the PCB as shown below(Leave one row of 5 on each side of the header).</p>
<div id="attachment_615" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/hdrinst.jpg"><img class="size-medium wp-image-615" title="Header and PCB soldered together" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/hdrinst-300x225.jpg" alt="Header and PCB soldered together" width="300" height="225" /></a><p class="wp-caption-text">Header and PCB soldered together</p></div>
<p>Strip off a 1/8 inch off of each wire on one side of the glued connector and solder to the PCB. Keep your pinout the same and do not cross the wires.   Below, you can see that the first half of the PCB and the wires has been soldered.</p>
<div id="attachment_616" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/hdrsolder.jpg"><img class="size-medium wp-image-616" title="Header with one side soldered" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/hdrsolder-300x225.jpg" alt="Header with one side soldered" width="300" height="225" /></a><p class="wp-caption-text">Header with one side soldered.</p></div>
<p>Now comes the fun part.  Trying to solder the other side of the PCB without burning yourself or the other wires and without creating unnecessary solder bridges to other pins.  Below is a shot of my connector, partially soldered.</p>
<div id="attachment_617" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/hdrsolder2.jpg"><img class="size-medium wp-image-617" title="Second set of wires to solder" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/hdrsolder2-300x225.jpg" alt="Second set of wires to solder" width="300" height="225" /></a><p class="wp-caption-text">Second set of wires to solder</p></div>
<p><strong>Protip:</strong> If you don&#8217;t already have a pair, I highly recommend you get a pair of Helping Hands for soldering like this. <a href="http://www.radioshack.com/product/index.jsp?productId=3928375&amp;CAWELAID=437363031" target="_blank">Available at Radio Shack</a> and many other electronics outlets.  Below is a picture of the completely soldered PCB.</p>
<div id="attachment_618" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/hdrdone.jpg"><img class="size-medium wp-image-618" title="Completed PCB soldering" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/hdrdone-300x225.jpg" alt="Completed PCB soldering" width="300" height="225" /></a><p class="wp-caption-text">Completed PCB soldering</p></div>
<p>Now that the PCB is soldered, go ahead and check your wiring!  Don&#8217;t do any pin swaps, make sure that pin 1 on the 2.0mm connector is pin 1 on the header, pin2 on the 2.0mm connector is pin 2 on the header and so on. Also make sure that you didn&#8217;t bridge between pins on the PCB. Before you slip on the shrinkwrap, we&#8217;re going to reinforce the body of the adapter.  Get your hot glue gun ready and shoot a large bead of glue down the length of the wire. Once that is done, shoot some more hotglue around the connector to reinforce the wires coming out of the connector. Below is a picture of the hotglue process.</p>
<div id="attachment_620" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/hdrhg.jpg"><img class="size-medium wp-image-620" title="Header hotglued" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/hdrhg-300x225.jpg" alt="Wires hotglued together and header is wrapped in hotglue." width="300" height="225" /></a><p class="wp-caption-text">Wires hotglued together and header is wrapped in hotglue.</p></div>
<p>The hotglue on the wire-side of the plug will make sure that the wires don&#8217;t wiggle around inside the heatshrink tube and fail later on.  After you&#8217;ve properly applied the hot glue, put the tip of the hotglue gun over the two holes that we vacated earlier.  Keep consistent pressure on the hotglue gun and press the trigger.  This will inject hot glue into the holes left behind when the excess pins were extracted and ensure that the connector is &#8220;keyed&#8221; and will prevent a one-off connection (and prevent further headache).  This is what the hotglue injected connector looks like.</p>
<div id="attachment_621" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/hdrkey.jpg"><img class="size-medium wp-image-621" title="Key-glued header" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/hdrkey-300x225.jpg" alt="Key glued header." width="300" height="225" /></a><p class="wp-caption-text">Key-glued header.</p></div>
<p>Take one moment and check your cable one last time.  Make sure that the pins are wired one to one.  Once you&#8217;re ready, get the heatshrink tube and cut it to a little bit less than the length of your adapter.  Below, you can see the heatshrink and adapter lengths I used. (This image was taken before the hot glue was applied.)</p>
<div id="attachment_622" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/hdrswrap.jpg"><img class="size-medium wp-image-622" title="Header adapter and shrinkwrap." src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/hdrswrap-300x225.jpg" alt="Header adapter and shrinkwrap." width="300" height="225" /></a><p class="wp-caption-text">Header adapter and shrinkwrap.</p></div>
<p>Slip over the heatshrink wrap over the connector (it may not fit over the PCB) and leave just a little bit so that it overlaps the 2MM connector end.  Apply even heat to the 2MM connector end first so that it will shrink and hold the heatshrink wrap in place as you apply even heat to the rest of the connector. When completed, you should have a connector resembling the below image.</p>
<div id="attachment_623" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/hdrtop.jpg"><img class="size-medium wp-image-623" title="Heatshrink wrapped adapter." src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/hdrtop-300x225.jpg" alt="Heatshrink wrapped adapter." width="300" height="225" /></a><p class="wp-caption-text">Heatshrink wrapped adapter.</p></div>
<p>Now take the hotglue gun and fill in the gap between the heatshrink wrap and the bottom of the PCB. If your gluegun has a fine tip, also shoot some hot glue into the open end of the shrinkwrap.  This will further harden the connector and ensure that it doesn&#8217;t flex and damage the connections.  You may have something looking like the below image.</p>
<div id="attachment_624" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/hdrtopgl.jpg"><img class="size-medium wp-image-624" title="Header Top glue bead" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/hdrtopgl-300x225.jpg" alt="Header Top with glue bead." width="300" height="225" /></a><p class="wp-caption-text">Header Top with glue bead.</p></div>
<p>For a final touch, wrap and distribute hot glue around the wiring from a little bit over the heatshrink wrap all the way to the black part of the header wiring.  It&#8217;s ok to use a large amount of glue as this will make sure that the connector is properly protected.  As a last step, connect it to the Dockstar and make sure it fits.  Once finished, you should have something resembling the below image.</p>
<div id="attachment_625" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/smokestack.jpg"><img class="size-medium wp-image-625" title="Completed Smokestack adapter on Dockstar." src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/smokestack-300x225.jpg" alt="Completed Smokestack adapter on Dockstar." width="300" height="225" /></a><p class="wp-caption-text">Completed Smokestack adapter on Dockstar.</p></div>
<p>Now, you have a completed Smokestack adapter.  You can use this for any device that has 2.0MM connector pitch and for any purpose.  Since the header on top is a 1 to 1 representation of the connector on bottom, you can use this anywhere where you need to use breadboard connectors for a temporary connection to these headers.</p>
<h2>Section 2: Wiring it all up.</h2>
<p>With a completed smokestack adapter, now you can wire it all up together  but before we begin, it is highly recommended to solder in a ground pin.  This ground pin will be used to ensure that the ground used by the JTAG adapter&#8217;s reference ground will be the same as the ground used by the Dockstar.  While it may not be required, it is recommended as a difference in ground may end up corrupting data being sent and received as part of the update.  To do that, we can use any of the ground planes, shields or open spots on the PCB.  I preferred to use one of the three USB shields as the shield&#8217;s purpose is the same as the GND connection that we are trying to establish.  For this, we&#8217;ll use a jumper pin with no plastic on it.  Start off by applying a small bead of solder to the USB shield as shown below.</p>
<div id="attachment_627" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/dsgnd.jpg"><img class="size-medium wp-image-627" title="Dockstar USB shield prep for pin" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/dsgnd-300x225.jpg" alt="Dockstar USB shield pin prepped for header pin." width="300" height="225" /></a><p class="wp-caption-text">Dockstar USB shield pin prepped for header pin.</p></div>
<p>Apply the heat from the soldering iron to the bead again and drop in the jumper pin.  Remove heat and do not touch the jumper pin until the connector has cooled.  Do not apply heat for a long period of time otherwise you may damage the USB port itself.  Below is the completed ground pin installation:</p>
<div id="attachment_628" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/dsgndpin.jpg"><img class="size-medium wp-image-628" title="Dockstar Ground pin installed." src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/dsgndpin-300x225.jpg" alt="Dockstar Ground pin installed." width="300" height="225" /></a><p class="wp-caption-text">Dockstar Ground pin installed.</p></div>
<p>Now, we have a properly installed Ground pin that is easy to connect and remove and we also have our smokestack JTAG adapter.  At this point, we can start wiring up the JTAG connector up and prepare for recovery of our dead dockstar.  If you went with my suggestion and ordered the TIAO Parallel JTAG adapter, you should have received the following items.  JTAG board (blue with DB25 connector), Short jumpers (left of  JTAG board) and Long Jumpers (above board) as shown in the picture below.</p>
<div id="attachment_626" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/JTAGkit.jpg"><img class="size-medium wp-image-626" title="JTAG kit" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/JTAGkit-300x225.jpg" alt="TIAO Parallel JTAG kit." width="300" height="225" /></a><p class="wp-caption-text">TIAO Parallel JTAG kit.</p></div>
<p>The below image is the entire wiring diagram for the Dockstar JTAG adapter.  As long as you keep pin 1 on the dockstar as pin 1 on the smokestack adapter, you should have no problems with the connection.  As mrbill and Klingon and several others pointed out in the PlugApps forums, the nSRST line (orange) and the DINT(purple) leads are both not connected.  Pin 1 on the Dockstar/Smokestack are also left unconnected as we will use the Dockstar&#8217;s power supply to power the board while it is connected to the JTAG adapter.  Additionally, it is crucial to plug the USB cable into the JTAG adapter and into a PC to power the onboard buffer chip.  Without the USB cable connected, the adapter will not function.  There is also an LED on the JTAG adapter that will light when the device has sufficient power. Click on the below image to get a much larger image.</p>
<div id="attachment_629" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/dockstarjtag.jpg"><img class="size-medium wp-image-629" title="Dockstar/TAIO JTAG connection table." src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/dockstarjtag-300x185.jpg" alt="Dockstar/TAIO JTAG connection table." width="300" height="185" /></a><p class="wp-caption-text">Dockstar/TAIO JTAG connection table.</p></div>
<p>The Dockstar layout diagram on the right hand side of the image is bundled together to provide a reference.  Pin 1 of the JTAG port is on the LED side of the jumper and is towards the center of the board and is designated by a black dot in the image and a white triangle on the dockstar board itself as shown below.  The picture of the Dockstar is rotated 90 degrees clockwise to the layout diagram in the image above.</p>
<div id="attachment_630" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/DSJTAGport.jpg"><img class="size-medium wp-image-630" title="Dockstar JTAG port showing pin 1" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/DSJTAGport-300x225.jpg" alt="Dockstar JTAG port showing pin 1" width="300" height="225" /></a><p class="wp-caption-text">Dockstar JTAG port showing pin 1</p></div>
<p>You can use the following images as a reference that your dockstar is connected properly.  The below image is a picture of my CA-42 adapter&#8217;s serial header as discussed in the <a href="http://www.yourwarrantyisvoid.com/2010/07/21/seagate-dockstar-add-an-accessible-serial-port/" target="_blank">serial port post</a>. Also, since the serial port post discussed soldering to the header, if you haven&#8217;t done so already, remove the existing serial port wires so that your smokestack adapter will fit.  In the image below, the three jumpers coming off of the pins are colored as they would be if you had just cut and stripped back the CA-42&#8242;s cable. Remember that your CA-42 cable may be different!</p>
<div id="attachment_636" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/DSCF0705.jpg"><img class="size-medium wp-image-636" title="Serial Port jumpers from CA42 USB cable." src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/DSCF0705-300x225.jpg" alt="Serial Port jumpers from CA42 USB cable." width="300" height="225" /></a><p class="wp-caption-text">Serial Port jumpers from CA42 USB cable.</p></div>
<p>The below image shows the top of the smokestack adapter and the respective colors.  You can see that the black wire for GND is attached to the USB shield pin we installed earlier. Remember, pin 1 and pin 7 on the smokestack are left not connected!</p>
<div id="attachment_637" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/DSCF0700.jpg"><img class="size-medium wp-image-637" title="Top of smokestack adapter with jumpers." src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/DSCF0700-300x225.jpg" alt="Top of smokestack adapter with jumpers." width="300" height="225" /></a><p class="wp-caption-text">Top of smokestack adapter with jumpers.</p></div>
<p>The below image shows the JTAG adapter, properly wired and ready to go.  You can see the device is powered by the USB connector and that the orange and purple wires have been spared off.   Although the flash from my camera drowned out the red power LED, you will need to make sure that your LED is lit.  Please note, the JTAG adapter does require power however it will not show up as anything in Windows as we are using the USB port strictly for the power lines for the JTAG buffer.</p>
<div id="attachment_638" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/DSCF0701.jpg"><img class="size-medium wp-image-638" title="TIAO JTAG wired up and ready." src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/DSCF0701-300x225.jpg" alt="TIAO JTAG wired up and ready." width="300" height="225" /></a><p class="wp-caption-text">TIAO JTAG wired up and ready.</p></div>
<p>An aerial view of the whole mess. <img src='http://www.yourwarrantyisvoid.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />     Yes, I know my desk is still messy.</p>
<div id="attachment_639" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/DSCF0708.jpg">C:\Program Files\OpenOCD\0.4.0<img class="size-medium wp-image-639" title="Wow, what a rats nest!" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/DSCF0708-300x225.jpg" alt="Wow, what a rats nest." width="300" height="225" /></a><p class="wp-caption-text">Wow, what a rats nest.</p></div>
<p>Now that all of the required connections have been made, it&#8217;s time to get busy with the software. Plug in the power cable to your dockstar and proceed to the next section.</p>
<h2>Step III: Software</h2>
<p>If you haven&#8217;t already, go back up to the Parts list and download Kragorn&#8217;s dockstar.cfg, OpenOCD and the uBoot image.</p>
<p>Install the OpenOCD software and accept the defaults.  Once completed, unzip the dockstar.zip and copy dockstar.cfg to C:\Program Files\OpenOCD\0.4.0\board and then copy your uboot image to C:\Program Files\OpenOCD\0.4.0  It would be recommended to rename it to just &#8220;uboot.bin&#8221; so that way you won&#8217;t have to retype that complicated line later on.</p>
<p>Now that we have all the proper software in place let&#8217;s discuss what all is going to happen.  When you start OpenOCD in a DOS window, it will in turn start a telnet server on localhost, port 4444.  You will use PuTTY to connect to the telnet server process and issue commands to OpenOCD.   In conjunction with that, you will need a second PuTTY session established to COM1 (if your windows machine has the CA-42 cable plugged into it) or to SSH to the machine you have the cable connected to. The reason is that once you enter specific commands on the telnet window, you need visibility to the other window (serial or SSH) to see if your dockstar is booting. <span style="text-decoration: underline;"><em><strong>Timing is critical!</strong></em></span> From here on out, commands and things to look for in output are in <strong>bold</strong> with other important text in bold, italics and underline.</p>
<p>In my configuration, my windows computer is what will run OpenOCD and the telnet session, and a nearby Linux box will have the SSH session with an application called minicom.</p>
<p>Start off by opening a DOS window (Start -&gt; Run -&gt; &#8220;cmd&#8221; )</p>
<p>Type the following command in exactly as shown:  <strong> </strong></p>
<pre><strong>openocd -f board/dockstar.cfg</strong></pre>
<p>You should get output similar to the below image.  If you get what I have, then you can proceed to the next step.  If you get any errors, check your wiring. Make sure only those pins shown in the above images are what you have hooked up. Also, you may get a  Windows Firewall exception error.  If you do, just hit &#8220;Allow&#8221; otherwise you won&#8217;t be able to talk to OpenOCD.</p>
<div id="attachment_640" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/OpenOCD-1.jpg"><img class="size-medium wp-image-640" title="OpenOCD successful startup" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/OpenOCD-1-300x148.jpg" alt="OpenOCD successful startup." width="300" height="148" /></a><p class="wp-caption-text">OpenOCD successful startup</p></div>
<p>If OpenOCD is running without errors, minimize the DOS box and start PuTTY. Use the below configuration to establish a connection to the telnet process that OpenOCD started.</p>
<div id="attachment_644" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/puttytelnet.jpg"><img class="size-medium wp-image-644" title="PuTTY Telnet settings" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/puttytelnet-300x286.jpg" alt="PuTTY Telnet settings" width="300" height="286" /></a><p class="wp-caption-text">PuTTY Telnet settings</p></div>
<p>When you connect, you should get a window that says &#8220;<strong>Open On-Chip Debugger</strong>&#8221; with a caret &#8220;&gt;&#8221; prompt.  Before we continue, if you haven&#8217;t already pulled up your serial session to the dockstar, you will need to do that now.  The issue is that from here on out, we will either be communicating with OpenOCD via Telnet, or communicating with the Dockstar via serial.</p>
<p>Now that you&#8217;ve established your connection to OpenOCD, perform the next two steps.</p>
<ul>
<li>Type the command <strong>&#8220;init&#8221;</strong> into the telnet session and hit enter.</li>
<li>Type the command <strong>&#8220;sheevaplug_init</strong>&#8221; into the telnet session and hit enter.</li>
</ul>
<p>Now, here is the hard part. The routine sheevaplug_init from above will attempt to halt the processor.  The Marvell chip has two types of halt, one of which labelled &#8220;ARM&#8221; and one labelled &#8220;Thumb&#8221;.  If your output resembles the below output (processor halted in <strong>Thumb</strong> state), you will need to perform the next steps otherwise skip down to the next section. When in doubt,  continue with the instructions below.</p>
<div id="attachment_645" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/Thumbstatehalt.jpg"><img class="size-medium wp-image-645" title="Thumb State Halt is no good!" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/Thumbstatehalt-300x186.jpg" alt="Thumb State Halt is no good!" width="300" height="186" /></a><p class="wp-caption-text">Thumb State Halt is no good!</p></div>
<p><strong>If you got <em>&#8220;Target halted in Thumb State&#8221;</em></strong>: There is some additional trickery that must be performed.   The issue is that the processor must be halted in ARM state as this allows OpenOCD to communicate with the processor properly.</p>
<ul>
<li>Hit Ctrl-C in your OpenOCD session. Your PuTTY session will break and generate an error. Dismiss the error and restart OpenOCD.</li>
<li>Hold down the reset button <span style="text-decoration: underline;"><strong>and keep it held down</strong></span> with one hand and with the other, type &#8220;<strong>sheevaplug_init</strong>&#8221; and hit enter.  Ignore the error messages.</li>
<li> Type in the command &#8220;<strong>halt</strong>&#8221; . <em><strong>DO NOT HIT ENTER YET!</strong></em></li>
<li><em><span style="color: #ff0000;"><strong>Release the RESET switch and simultaneously hit Enter.</strong></span></em></li>
<li>You should see that the processor was halted in ARM state.
</li>
<li>Type in &#8220;<strong>sheevaplug_init</strong>&#8221; and hit enter. No output should be generated from this command.
</li>
</ul>
<p>Check your telnet session output with my output in the screenshot below.  Make sure your output matches the screenshot before proceeding.</p>
<div id="attachment_647" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/properhalt1.jpg"><img class="size-medium wp-image-647" title="Properly halted dockstar" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/properhalt1-300x186.jpg" alt="Properly halted dockstar" width="300" height="186" /></a><p class="wp-caption-text">Properly halted dockstar</p></div>
<p>Now for the ultimate test.  We need to probe the NAND flash to make sure that the processor can communicate with it. Type in &#8220;<strong>nand probe 0</strong>&#8221; (zero) and hit enter.  If everything is correct, you should get text returned similar to &#8220;<strong>NAND flash device &#8216;NAND 256MiB 3,3V 8-bit&#8217; found</strong>&#8220;.  If you get any other message <strong>ESPECIALLY</strong> anything about Unknown Manufacturer, restart OpenOCD and try again.  Here is my output so far:</p>
<div id="attachment_648" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/nandprobe0.jpg"><img class="size-medium wp-image-648" title="Nand Probe successful!" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/nandprobe0-300x186.jpg" alt="Nand Probe Successful!" width="300" height="186" /></a><p class="wp-caption-text">Nand Probe Successful!</p></div>
<p>Now that the processor has been correctly identified by OpenOCD and the processor has properly identified the flash memory, we can now load the image into the Dockstar&#8217;s RAM and tell the processor to execute it. Type in <strong>load_image uboot.bin 0&#215;800000</strong> (zero, letter x, 8 and five zeros). If you renamed your uboot file something other than &#8220;uboot.bin&#8221; then substitute as needed.  This will take a couple of minutes as the image is transferred. Here is the output of what I have after the image loaded into RAM:</p>
<div id="attachment_649" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/loadimage.jpg"><img class="size-medium wp-image-649" title="Load_Image successful!" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/loadimage-300x186.jpg" alt="Load_Image successful!" width="300" height="186" /></a><p class="wp-caption-text">Load_Image successful!</p></div>
<p>When you get the caret prompt back &#8220;&gt;&#8221;, type in the command &#8220;<strong>resume 0&#215;800200</strong>&#8221; and check your serial connection for activity.  At this point, you can minimize the telnet session.  Now we will be dealing expressly with the serial connection.  Depending on your connection method, you may have a different window, but the text is the same.  As soon as you hit enter on the resume command, you should notice that the LED on your once dead dockstar is now blinking. Immediately switch over to the serial connection and hit a key to disrupt the boot process. If you did it right, you should see that the command prompt now shows <strong>Marvell&gt;&gt;</strong> as shown in the screenshot below:</p>
<div id="attachment_650" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/intboot.jpg"><img class="size-medium wp-image-650" title="Interrupted boot sequence." src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/intboot-300x186.jpg" alt="Interrupted boot sequence." width="300" height="186" /></a><p class="wp-caption-text">Interrupted boot sequence</p></div>
<p><strong>DO NOT DISCONNECT POWER FROM THE DOCKSTAR YET! WE ARE NOT DONE.</strong> The Dockstar has successfully loaded and ran the uboot commands in RAM however if we hit the reset switch or powercycle the dockstar, the device will return to it&#8217;s zombie state, and we will have to do it all over again. The only thing left to do is to prepare and write the image to flash.</p>
<p>If you were like me and you accidentally typed in &#8216;nand erase&#8221; and bricked your dockstar, you will need to re-erase the flash to reload it.  If you bricked your dockstar by another method, skip this step and go on to the next paragraph. To do this, type in &#8220;<strong>nand erase</strong>&#8220;.  This will erase the entire flash chip.  Now to write the working uboot to flash, use the command &#8220;<strong>nand write.e 0&#215;800000 0&#215;0 0&#215;80000</strong>&#8220;  (zero x eight then 5 zeroes, zero x zero, then zero x eight then four zeros). You should get a message that the nand write was successful similar to the below screenshot.</p>
<div id="attachment_651" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/writeflash.jpg"><img class="size-medium wp-image-651" title="Successful flash write." src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/09/writeflash-300x186.jpg" alt="Successful flash write." width="300" height="186" /></a><p class="wp-caption-text">Successful flash write.</p></div>
<p>If you did not brick your dockstar by an errant nand erase command, you will want to use &#8220;<strong>nand erase 0 0&#215;0 0xa0000</strong>&#8221; (zero, zero x zero, zero x a then four zeros).  The reason for this difference is that if you didn&#8217;t erase your flash, this command will preserve the u-boot environment variables, otherwise you would have to recreate them later on.</p>
<p>Now, it&#8217;s time for the moment of truth.  Don&#8217;t start disconnecting wires just yet, simply tap the reset switch to load the uboot from the flash and test your recovery.   You will notice two key things:  Your uboot will be stuck in a permanent loop (assuming you didn&#8217;t interrupt autoboot) and the LED on the dockstar will alternate between flashing green and flashing orange as uboot cycles through.  This is because the dockstar can&#8217;t find a valid kernel or filesystem to boot from.  If you used the same version of the uBoot I listed above then you will notice that this uboot will attempt to boot off of USB key drives unlike the original factory image which opens up a LOT of opportunity. <img src='http://www.yourwarrantyisvoid.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>To clean up, simply exit the various windows you have open, and exit OpenOCD by hitting Ctrl-C.  Remove power from the Dockstar, then remove the smokestack adapter and the ground wire on the USB shield.  If you want to make sure (because you&#8217;re as paranoid as I am, reapply power after all the jumpers have been removed and make sure that the Dockstar&#8217;s LED continues to blink orange then blinks green and repeats.  This means that your dockstar is confirmed as running off it&#8217;s own flash.</p>
<p>Now get to hacking!</p>
<h2>Section IV: Notes and Credits</h2>
<p>This article was assembled using information and help from various sources.  I want to thank everyone listed below for your assistance in helping me with getting the Dockstar JTAG figured out.  It was definitely not easy for someone new to JTAG however it was an enjoyable learning experience once I got the bugs worked out,  even if I did scratch my head a lot.</p>
<p>From the PlugApps forums, I&#8217;d like to thank Admin, Kragorn, bzboi, klingon, ygator, mrbill, and jtagfun.</p>
<p>A special thanks to bzboi for the initial howto that most of the OpenOCD instructions were used from and to Admin for the starting post with the Dockstar&#8217;s JTAG diagram.</p>
<p>I&#8217;d also like to thank mrbill for getting me involved with these things. It&#8217;s all his fault that I even have a dockstar to break. <img src='http://www.yourwarrantyisvoid.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>Thanks goes to Kragorn for finding out the proper settings in his dockstar.cfg so that all of us could unbrick after the inevitable &#8220;Oops&#8230;&#8221; moment.</p>
<p>Last, but not least, thanks goes out to Jeff Doozan for his work with uBoot and compiling in needed features into the bootloader so that we can use USB sticks as boot devices.</p>
<h2>Where do we go from here?</h2>
<p>The answer is &#8220;Where do you want to go?&#8221;  In my relatively short time with the Dockstar, I was working on getting OpenWRT compiled and installed on it.  OpenWRT is the same OS that they use for the Linksys and other branded routers and is pretty much it&#8217;s own distribution.  There are also processes on how to install Debian onto the dockstar, using a laptop drive and USB sled to run the OS.  There is a lot of people doing research and finding out other warranty voiding things to do with their dockstars so take a look around.</p>
<p>As far as me personally?  I have three of them and while one of them is going to be a small NAS fileserver, one of the more esoteric things I was planning on doing with mine is making it into a roving USB camera with wifi.  The idea is that the Dockstar&#8217;s mainboard would be the brains of the rover and could send commands to a Parallax BOE-BOT via a usb to serial converter.  Since the entire thing would be wireless off of a USB dongle, I could use the IP based connection to deliver video and commands via a custom written application.</p>
<p>I sincerely hope that you are able to recover your dockstar using the above process.  It&#8217;s no fun when you accidentally destroy something you have put so much work into however now you should be able to work on the Dockstar without fear that you&#8217;re going to damage it and prevent it from booting.  Also, if you decide to try custom boot loaders, you can do so worry free.</p>
<p>Happy Hacking!</p>
<p>FIRESTORM_v1</p>
<p><em> </em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.yourwarrantyisvoid.com/2010/09/08/dead-dockstar-resurrected-with-jtag/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Squirrelcage blower keeps small form factor PCs cool</title>
		<link>http://www.yourwarrantyisvoid.com/2010/08/14/squirrelcage-blower-keeps-small-form-factor-pcs-cool/</link>
		<comments>http://www.yourwarrantyisvoid.com/2010/08/14/squirrelcage-blower-keeps-small-form-factor-pcs-cool/#comments</comments>
		<pubDate>Sun, 15 Aug 2010 02:52:16 +0000</pubDate>
		<dc:creator>firestorm_v1</dc:creator>
				<category><![CDATA[Embedded devices]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[How-To's]]></category>
		<category><![CDATA[cooling]]></category>
		<category><![CDATA[Mods]]></category>
		<category><![CDATA[Small Form Factor]]></category>

		<guid isPermaLink="false">http://www.yourwarrantyisvoid.com/?p=563</guid>
		<description><![CDATA[As long as there has been electronics, there has been the problem of how to keep them cool.  Unfortunately, the problem gets more complex the smaller that computers get and what works for one PC might not work for others.  This is clearly the obstacle to overcome when trying to cool down a settop box.  [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter size-full wp-image-566" title="Squirrelcage fan cooling" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/08/squirrel-fan-cooling.jpg" alt="Squirrel cage fan cooling. Not chuck squirrels through fans at nuclear reactors." width="535" height="176" /></p>
<p style="text-align: left;">As long as there has been electronics, there has been the problem of how to keep them cool.  Unfortunately, the problem gets more complex the smaller that computers get and what works for one PC might not work for others.  This is clearly the obstacle to overcome when trying to cool down a settop box.  Read more to find out how I was able to pull it off very well for a little over $10 in parts and still maintain all my hair.</p>
<p style="text-align: left;"><span id="more-563"></span></p>
<p style="text-align: left;">It&#8217;s pretty synonymous that computers == heat and with any mainstream processor, you have a pretty significantly sized heatsink and fan to keep the processor cool.  While processor fans and heatsinks are pretty easy to come by for standard desktop computers and servers, embedded devices are pretty much left to their own devices (no pun intended).  I was faced with the very same problem when I decided to start using two embedded computers to replace a NAT router and mini home server.   These machines are sold as a &#8220;set-top-box&#8221; and were initially intended for some kind of Video On Demand service that used broadband service to deliver content.  The computer hardware was figured out and working however left to the &#8220;stock&#8221; heatsink and heatspreader (there was no fan when I started) the box was very hot to the touch.  I decided to initially tack a case fan to the heatsink to help with the cooling, but that only served to band-aid the problem.</p>
<p style="text-align: left;">
<div id="attachment_567" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/08/settop.jpg"><img class="size-medium wp-image-567" title="settop" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/08/settop-300x225.jpg" alt="The settop box that is too hot to touch" width="300" height="225" /></a><p class="wp-caption-text">The settop box.  Those holes on top are supposed to keep this cool?</p></div>
<p style="text-align: left;">A view of the internals left very little room to work with.  There was no way I was going to be able to use a standard computer case fan without some massive case modding. Since I wasn&#8217;t really looking for a reason to spend the entire day with the dremel cutting sheet steel, I decided to take a look at what I had to work with.</p>
<p style="text-align: left;">
<div id="attachment_568" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/08/internals.jpg"><img class="size-medium wp-image-568" title="Settop internals" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/08/internals-300x225.jpg" alt="Settop internals.  It's quite cramped in there." width="300" height="225" /></a><p class="wp-caption-text">Settop internals.  It&#39;s quite cramped in there.</p></div>
<p>Since this thing was designed to be a set top box, there were all kinds of connections on the back, including a big SCART connector.  According to <a title="SCART - definition by Wikipedia" href="http://en.wikipedia.org/wiki/SCART" target="_blank">wikipedia</a>, SCART is primarily a European standard and is very commonplace for connecting AV equipment to TVs and etc.  Since this settop was sold in the US, the SCART connector was unpopulated and instead left a knockout.  This gave me a sizeable aperture for the hot exhaust, now to find some way to get the air moving.</p>
<div id="attachment_569" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/08/location.jpg"><img class="size-medium wp-image-569" title="location" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/08/location-300x225.jpg" alt="Exhaust Port location" width="300" height="225" /></a><p class="wp-caption-text">Exhaust Port Location</p></div>
<p style="text-align: left;">In the above shot, the SCART port is the large dull steel colored rectangular hole in the silver backing.  The hole is high enough that it does not interfere with the SDRAM sticks and far enough away from the power supply not to be a shock hazard.  Now knowing what I had and how big of a fan I needed, I went to Microcenter and took a look around. They had a lot of normal desktop fans and a few oddball fans and the one that would work best ended up being an old-style squirrelcage fan.  A squirrelcage fan is like the standard case fan that you&#8217;re used to however instead of normal blades, the squirrel cage fan uses an impeller that sucks in air from the front and exhausts it out of the side of the fan. The fan exhaust is perpendicular to the intake unlike a standard fan.  The advantage is that a squirrel cage fan offers the airflow of a standard fan in a smaller form factor due to the perpendicular exhaust.  The general idea is that the squirrel cage fan will suck in the warm air from inside the case and exhaust out of the now ex-SCART port.</p>
<p style="text-align: left;">
<div id="attachment_570" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/08/squirrelcage.jpg"><img class="size-medium wp-image-570" title="SquirrelCage blower" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/08/squirrelcage-300x225.jpg" alt="Squirrelcage blower, Now with extra squirrels" width="300" height="225" /></a><p class="wp-caption-text">Squirrel cage blower</p></div>
<p style="text-align: left;">This is the squirrelcage fan that I selected. Although I couldn&#8217;t find a link on Microcenter&#8217;s website, here is a <a title="Microcenter Squirrel cage fan" href="http://www.microcenter.com/single_product_results.phtml?product_id=0209741" target="_blank">link of a comparable fan</a>. It is a12V fan that is designed to screw into a removed expansion slot blank on a computer case.  The fan connects via a 12VDC Molex connector and is designed to connect between the power cable and a hard drive or CDROM.  Since there are no Molex connectors, I had to also get a three pin cable to connect to the motherboard. Thankfully Microcenter had a clearance on Intel OEM Processor fans and were selling just the connector for 25 cents.</p>
<p style="text-align: left;">
<div id="attachment_573" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/08/intelcable1.jpg"><img class="size-medium wp-image-573" title="Intel cable and Power header" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/08/intelcable1-300x225.jpg" alt="Intel cable and Power header" width="300" height="225" /></a><p class="wp-caption-text">Intel cable and Power header</p></div>
<p style="text-align: left;">The Intel cable snaps perfectly into a convenient header that I found on the motherboard.  This will be perfect as if I ever need to replace the squirrelcage fan, I can do so without having to cut up wires and desolder splices.</p>
<p style="text-align: left;">Now that I had the idea of generally where everything was to go, I had to make some modifications to the steel bracket on the blower. The blower was originally designed to fit in an empty expansion slot and the tab used for securing the blower to the chassis needed to be flattened.</p>
<p style="text-align: left;">
<div id="attachment_574" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/08/squirrelbracket.jpg"><img class="size-medium wp-image-574" title="Squirrelcage bracket" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/08/squirrelbracket-300x225.jpg" alt="Squirrelcage bracket" width="300" height="225" /></a><p class="wp-caption-text">Squirrelcage bracket</p></div>
<p>The bracket in question is so eloquently highlighted by none other than Duke Nukem.  In order to modify the bracket without destroying the fan in the process, I decided to remove the bracket.  In the above picture, you can see a notch that holds the fan in the bracket.  There are four notches in total, two on each side. I used a couple of flat bladed screwdrivers and gently pried the bracket off.</p>
<div id="attachment_575" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/08/bracketoff.jpg"><img class="size-medium wp-image-575" title="Bracket removed from fan" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/08/bracketoff-300x225.jpg" alt="Bracket removed from fan" width="300" height="225" /></a><p class="wp-caption-text">Bracket removed from fan</p></div>
<p>After a little bit of  the creative application of force, I finally had the bracket flat enough so that it would not interfere with mounting. (Translation:  I beat the crap out of it with a hammer.)</p>
<div id="attachment_576" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/08/bracketmod.jpg"><img class="size-medium wp-image-576" title="Flattened Bracket modification" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/08/bracketmod-300x225.jpg" alt="Flattened Bracket modification" width="300" height="225" /></a><p class="wp-caption-text">Flattened Bracket modification</p></div>
<p>Now that the bracket is flattened enough, it&#8217;s time to see about how to go about lining it up with the SCART exhaust port.</p>
<div id="attachment_577" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/08/holesalign.jpg"><img class="size-medium wp-image-577" title="SCART holes line up with the grill." src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/08/holesalign-300x225.jpg" alt="SCART holes line up with the grill." width="300" height="225" /></a><p class="wp-caption-text">SCART holes line up with the grill.</p></div>
<p>I lucked out on this one.  The two holes that were intended for the SCART interface hardware line up perfectly with two lines on the grill.  This made mounting the bracket as easy as a couple of small nuts and bolts.  Once mounted, it was time to start working on the power cable.  I decided to use the yellow and black wires for the fan&#8217;s power because black is considered &#8220;ground&#8221; and yellow is considered the &#8220;+12V&#8221; lead in computer power supplies.</p>
<div id="attachment_578" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/08/threewire.jpg"><img class="size-medium wp-image-578" title="Three wire connector" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/08/threewire-300x225.jpg" alt="Three wire connector" width="300" height="225" /></a><p class="wp-caption-text">Three wire connector</p></div>
<p>I cut off the green lead, and cut the cable about two inches long.  I then wired the wires from the fan to the Intel cable.  The red wire on the blower goes to the Yellow wire on the Intel cable and the two blacks go together. Not shown in this image is the small length of shrinkwrap used to secure and isolate the connection.</p>
<div id="attachment_579" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/08/solderprep.jpg"><img class="size-medium wp-image-579" title="Solder Preperation" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/08/solderprep-300x225.jpg" alt="Solder Preperation" width="300" height="225" /></a><p class="wp-caption-text">Solder Preperation</p></div>
<p>After soldering the first wire, I sealed it with the heatshrink and then soldered the other wire.</p>
<div id="attachment_580" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/08/solder1.jpg"><img class="size-medium wp-image-580" title="Soldered and shrinked" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/08/solder1-300x225.jpg" alt="Soldered and shrinked" width="300" height="225" /></a><p class="wp-caption-text">Soldered and Shrinked</p></div>
<p>Another piece of heatshrink later and I have a ready to install cable.</p>
<div id="attachment_581" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/08/complete.jpg"><img class="size-medium wp-image-581" title="Completed cable" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/08/complete-300x225.jpg" alt="Completed cable" width="300" height="225" /></a><p class="wp-caption-text">Completed cable</p></div>
<p>With the cable now complete, all that remained was to plug the power cable into the power header and snap the blower back into the bracket.</p>
<div id="attachment_582" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/08/blowermounted.jpg"><img class="size-medium wp-image-582" title="Blower mounted" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/08/blowermounted-300x225.jpg" alt="Blower mounted" width="300" height="225" /></a><p class="wp-caption-text">Blower Mounted</p></div>
<p>Here is a shot of the back of the case with the now operational blower.</p>
<div id="attachment_583" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/08/exhaustport.jpg"><img class="size-medium wp-image-583" title="SCART Exhaust port." src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/08/exhaustport-300x225.jpg" alt="SCART Exhaust port." width="300" height="225" /></a><p class="wp-caption-text">SCART Exhaust port.</p></div>
<p>And finally, here&#8217;s a side-by-side (or top and bottom) with an unmodified settop box.</p>
<div id="attachment_584" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/08/beforeandafter.jpg"><img class="size-medium wp-image-584" title="Modded and Unmodded settops" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/08/beforeandafter-300x225.jpg" alt="Modded and Unmodded settops" width="300" height="225" /></a><p class="wp-caption-text">Modded and Unmodded settops</p></div>
<h2>Final Results</h2>
<p>I&#8217;ve been running the settop now for the past couple of days and I can say that the blower is 100% effective.  The case is cool to the touch and my fears of cooking the processor have been abated.  The machine will do very nicely as a pfSense firewall as soon as I get around to finishing it up but for now, this is one less thing stopping me from using it.</p>
<p>If you ever find yourself in a similar situation where you have to get airflow but don&#8217;t have much space, I highly recommend these squirrelcage blowers.  They&#8217;re cheap, they&#8217;re effective and well worth the time to install.  Although I had to go a bit out of my way to install the blower, not having to worry about cooking the machine is well worth the effort.</p>
<p>I hope you enjoyed this article, it was definitely an interesting approach to cooling in a small form factor.  Do you have any insight or other experience with odd cooling in a similar situation?  Please leave a comment, I&#8217;m always interested in other people&#8217;s stories.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yourwarrantyisvoid.com/2010/08/14/squirrelcage-blower-keeps-small-form-factor-pcs-cool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Seagate Dockstar: Add an accessible serial port</title>
		<link>http://www.yourwarrantyisvoid.com/2010/07/21/seagate-dockstar-add-an-accessible-serial-port/</link>
		<comments>http://www.yourwarrantyisvoid.com/2010/07/21/seagate-dockstar-add-an-accessible-serial-port/#comments</comments>
		<pubDate>Wed, 21 Jul 2010 18:35:55 +0000</pubDate>
		<dc:creator>firestorm_v1</dc:creator>
				<category><![CDATA[Embedded devices]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[How-To's]]></category>
		<category><![CDATA[Dockstar]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mods]]></category>
		<category><![CDATA[seagate]]></category>

		<guid isPermaLink="false">http://www.yourwarrantyisvoid.com/?p=526</guid>
		<description><![CDATA[Ok, so not long after I published the article on  the hardware teardown of the Seagate Dockstar, I couldn&#8217;t help myself  so I started working on things to do with this device.  I did a lot of research in regards to the capabilities of the Dockstar, including being able to push a customized Linux OS [...]]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-527" title="seagate serial logo" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/seagate-serial-logo.jpg" alt="" width="214" height="94" /></p>
<p>Ok, so not long after I published the article on  the <a href="http://www.yourwarrantyisvoid.com/2010/07/14/hardware-porn-seagate-dockstar-teardown/" target="_blank">hardware teardown of the Seagate Dockstar</a>, I couldn&#8217;t help myself  so I started working on things to do with this device.  I did a lot of research in regards to the capabilities of the Dockstar, including being able to push a customized Linux OS on the device.  Once I saw <a href="http://hackaday.com/2010/07/17/openwrt-on-a-seagate-freeagent-dockstar/" target="_blank">the article at Hackaday</a> that covers exactly how to replace the OS, I knew I had to do it for myself.  There are two ways to perform this upgrade however in order to capture syslog output and to be able to get to the bootloader, a serial port is required.  Just about all of the sites will describe the pins needed to make the connection, however none of them detail how to do it very clearly and none of them address the issue of aesthetics.  Read on for my method of adding a serial port to the Dockstar without affecting the look of the device.</p>
<p><span id="more-526"></span></p>
<h1>Before We Begin&#8230;.</h1>
<p>The Seagate Dockstar has a serial port available via three of the pins on the header at the front of the PCB.  The issue is that they&#8217;re not very easy to get to without having to disassemble the device each and every time you need to do a recovery on it.  This is hardly an ideal solution, and who knows what I&#8217;ll be doing with the device in the future.  If I decide to embed the  device and something goes wrong, I&#8217;ll have to have access to the serial port in order to debug it.</p>
<p>But, simply having access to the serial port is not enough.  The Dockstar&#8217;s aesthetic elegance is in the fact that it&#8217;s so simple.  No  massive amount of connectors aside from Power and Ethernet, and with little room to begin with, I don&#8217;t want to have a cable hanging out of the box just to have access to the serial port.  After much deliberation, I decided that a pin-row setup would be ideal instead of some other outward-facing connector.  The advantages to a pin-row set up is that there are only as many holes as are needed to establish connection and the connector size is significantly smaller than would be a standard DB-9 connector.  An additional advantage to the pin-row setup is that the  connection would be temporary and can be easily removed. The resulting connection port would still be cleanly presented and would not stick out like a sore thumb.</p>
<h2>Parts List:</h2>
<p>In order to pull this off, you will need the following items:</p>
<p>- a CA-42 USB cable. &#8211; This is most commonly sold as a <a href="http://www.amazon.com/Cable-Nokia-CA-42-Wireless-Accessory/dp/B000BI4HW8" target="_blank">Nokia cable through Amazon</a> and can usually be had for a few bucks. This is <strong>required</strong> as the dockstar&#8217;s serial port voltages are at a 3.3V TTL.  interfacing it to a standard +12V/-12V serial port <strong>will damage your Dockstar.</strong> The CA-42 cable has a PL-2303 USB to 3.3v TTL serial adapter in it which provides the required 3.3v TTL and gives an easy to use connector for plugging it into your host PC.</p>
<p>- a 4-pin header with long pins. &#8211; The pins have to be long enough that they will go through the Dockstar case and into the matched connector securely.</p>
<p>- a matched connector for the 4 pin header. &#8211; This will be mounted inside the Dockstar.</p>
<p>- Heat shrink tubing of various sizes. (Use the images as a guide)</p>
<p>- A couple of spares of the 4 pin header and the connector.  (We&#8217;ll use one spare for making the holes in the case, but it&#8217;s always good to have extras just in case.</p>
<h2>Tools List:</h2>
<p>- Soldering Iron</p>
<p>- Lighter (for heatshrink)</p>
<p>- small diameter drillbits</p>
<p>- Spudger (or Radio Shack soldering toolkit)</p>
<p>- A Linux machine with an available USB port. <strong>Note:</strong> It may be possible to use a windows computer for testing however my USB adapter only works in Linux.</p>
<p>Now that you have all the components, it&#8217;s important to stop here for a sec and cover the legal mess. It is critically important that you know what you&#8217;re doing.  You can not blame me or hold this site responsible (or the maintainers of this site) if you do something and blow up your Dockstar.  Be careful, do your research, check twice, solder once.</p>
<p>Please note that if you have never worked with shrinkwrap, the important thing is to watch the fire and keep it moving.  If you leave the lighter in the same place for too long, the shrinkwrap will stop shrinking and will catch fire.  When in doubt, apply the hat quickly and watch the shrinkwrap closely.   If it does something wrong, move the lighter away and start blowing on it to cool it down.</p>
<h1>Part 1:  The Cable</h1>
<p>It&#8217;s easier to do the modification on the cable first rather than do the Dockstar portion due to the fact that part of performing the Dockstar side of things will require testing to make sure it&#8217;s all working properly. So, let&#8217;s get started.</p>
<p style="text-align: left;">
<div id="attachment_528" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/cable_serial.jpg"><img class="size-medium wp-image-528 " title="CA-42 cable, header and connector" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/cable_serial-300x225.jpg" alt="CA-42 cable, header and connector" width="300" height="225" /></a><p class="wp-caption-text">CA-42 cable, header and connector</p></div>
<p style="text-align: left;">This is the cable that we will be hacking together. The pin-row connector shown above is a 4 pin wirewrap terminal and a push-on style PCB mount connector.</p>
<div id="attachment_531" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/cable_header.jpg"><img class="size-medium wp-image-531" title="cable header and connector" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/cable_header-300x225.jpg" alt="cable header and connector" width="300" height="225" /></a><p class="wp-caption-text">cable header and connector</p></div>
<p>In the above photo,you can see the long header pins and the matching connector and how they fit together.  Before we get started with modifying the cable, we first need to figure out how it&#8217;s wired up.  Because there is a very good chance that you have a generic cable, and generic cables are wired differently, we will start off with spudging the USB connector apart.</p>
<p style="text-align: left;">
<div id="attachment_529" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/cable_spudger.jpg"><img class="size-medium wp-image-529" title="Spudger to cable case" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/cable_spudger-300x225.jpg" alt="Spudger to cable case" width="300" height="225" /></a><p class="wp-caption-text">Spudger to cable case</p></div>
<p>Follow the plastic seam of the USB connector with the sharp blade of the spudger.  Gently work the two halves of the plastic apart until you are able to seperate them.  You should see a connector that looks like the one below.</p>
<div id="attachment_530" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/cable_opened.jpg"><img class="size-medium wp-image-530" title="Opened cable" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/cable_opened-300x225.jpg" alt="Opened cable" width="300" height="225" /></a><p class="wp-caption-text">Opened cable</p></div>
<p>A closer of the PCB will reveal that the  wires (white, blue and green) are labeled for our easy hacking <span style="text-decoration: line-through;">convenience</span> . The three wires in my cable are Blue(GND), Green (RxD), and White (TxD). Now that we know which wire does what, reassemble the USB cable as we will not need to do any work on this end of the cable.  Starting with the 4 pin connector, pick one of the two internal pins and remove it.</p>
<div id="attachment_532" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/cable_pins.jpg"><img class="size-medium wp-image-532" title="Removed pin from connection block" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/cable_pins-300x225.jpg" alt="Removed pin from connection block" width="300" height="225" /></a><p class="wp-caption-text">Removed pin from connection block</p></div>
<p>The reason for removing the offset pin is for two reasons.  1) There are only three wires required for connection and 2) The missing pin will allow us to key the connector so that it can&#8217;t be reversed.  Going back to the USB cable, cut off the fat Nokia phone end and strip the cable back about an inch.  To help with soldering, insert the long end of the header pins into a block of breadboard.  This will help hold the connection stable while you solder the cable.   You will also need to cut the small diameter shrinkwrap in three sizes as shown below.</p>
<div id="attachment_533" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/cable_shrink.jpg"><img class="size-medium wp-image-533" title="Cable preparation" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/cable_shrink-300x225.jpg" alt="Cable preparation" width="300" height="225" /></a><p class="wp-caption-text">Cable preparation</p></div>
<p>The reason for the three lengths of heatshrink tubing is that we will build up the edge of the cable to a large size so that we can use the larger heatshrink tube  (in the back of the picture) to bind the header pins into the wrap and the wrap to the end of the cable to strengthen the cable.  If you have never worked with heatshrink tubing, it&#8217;s very easy to work with.  Start with the longest piece of tubing, and slide it over the cable. Make sure that the cut end matches the end of the insulation and heat with the lighter.  <strong>KEEP THE FLAME MOVING ACROSS THE HEATSHRINK!!</strong> Once the heatshrink has stopped shrinking, allow it to cool and repeat for each piece.</p>
<div id="attachment_534" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/cable_shrinkprep.jpg"><img class="size-medium wp-image-534" title="Shrinkwrapped cable" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/cable_shrinkprep-300x225.jpg" alt="Shrinkrwrapped cable" width="300" height="225" /></a><p class="wp-caption-text">Shrinkrwrapped cable</p></div>
<p>This is the end result of the shrinkwrapping.  Now that the end is built up, slide a piece of the large shrink over the end of the cable but do not apply heat just yet. Strip back the individual wires so that you can attach them to the header pins.</p>
<div id="attachment_535" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/cable_bigshrink.jpg"><img class="size-medium wp-image-535" title="Cable prepped for soldering" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/cable_bigshrink-300x225.jpg" alt="Cable prepped for soldering" width="300" height="225" /></a><p class="wp-caption-text">Cable prepped for soldering</p></div>
<p>Now that we&#8217;re ready to solder the connector, it&#8217;s important to decide how to create the pinout.  In my setup, I elected to have the GND connection by itself, then the TX and RX pins.  For each wire, wrap the wire around the soldering post on the header pins and solder.  Be sure to use only enough solder as is required for the connection and do not  bridge the pins.</p>
<div id="attachment_536" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/cable_soldered.jpg"><img class="size-medium wp-image-536" title="Soldered cable to header pins" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/cable_soldered-300x225.jpg" alt="Soldered cable to header pins" width="300" height="225" /></a><p class="wp-caption-text">Soldered cable to header pins</p></div>
<p>Now with the cable soldered and the connections solid, it&#8217;s time to apply the heat to the large heatshrink.  Very carefully pull the end of the heatshrink over the black plastic header and gently apply heat.  Adjust if needed and let the tubing shrink without it pulling itself off of the header plastic.</p>
<div id="attachment_537" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/cable_shrink1.jpg"><img class="size-medium wp-image-537" title="Shrinkwrap applied to header" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/cable_shrink1-300x225.jpg" alt="Shrinkwrap applied to header" width="300" height="225" /></a><p class="wp-caption-text">Heatshrink applied to header</p></div>
<p>When you have it this far, go ahead and apply heat to the rest of the heatshrink tubing, making sure not to singe it.  When you are done, you should have a cable looking like the one below.</p>
<div id="attachment_538" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/cable_completed.jpg"><img class="size-medium wp-image-538" title="Completed cable with socket" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/cable_completed-300x225.jpg" alt="Completed cable with socket" width="300" height="225" /></a><p class="wp-caption-text">Completed cable with socket</p></div>
<p>This was the easy part, Now it&#8217;s time for the dockstar.</p>
<h1>Part 2: The Dockstar</h1>
<p>We&#8217;ve got the cable, but without something to connect it to, it&#8217;s pretty useless (unless you want to use it on a breadboard).  Let&#8217;s take a look at what&#8217;s going on.</p>
<div id="attachment_539" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/DS_plan.jpg"><img class="size-medium wp-image-539" title="Dockstar connection planning" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/DS_plan-300x225.jpg" alt="Dockstar connection planning" width="300" height="225" /></a><p class="wp-caption-text">Dockstar connection planning</p></div>
<p>Since I&#8217;ve already determined that I want the connector for the serial to come out of the back of the device and I&#8217;ve already found a suitably small connector, it&#8217;s time to find a location where I can attach it without getting too involved or without interfering with the existing ports on the back of the dockstar.  I&#8217;ve elected to put the serial port just above the center USB connector.  In the photo above, you can see how much space we&#8217;re dealing with in comparison with the USB ports and the header socket.</p>
<div id="attachment_540" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/ds_shield1.jpg"><img class="size-medium wp-image-540" title="Dockstar shielding" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/ds_shield1-300x225.jpg" alt="Dockstar shielding" width="300" height="225" /></a><p class="wp-caption-text">Dockstar shielding</p></div>
<p>Some of the RF shielding will need to be removed, but thankfully the metal is pretty flimsy and easily cut.   Be sure that when you remove the little fins pictured that you do not distort the top of the metal shielding.  We need a surface as smooth as possible for the superglue to properly bind with the connector for the serial port.</p>
<div id="attachment_541" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/ds_shield2.jpg"><img class="size-medium wp-image-541" title="Unneeded shielding removed" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/ds_shield2-300x225.jpg" alt="Unneeded shielding removed" width="300" height="225" /></a><p class="wp-caption-text">Unneeded shielding removed</p></div>
<p>Here is the picture of the unneeded shielding removed.  Please only remove the shielding that you need.  Next, you will need to prep another three pin header just like you did for the cable.  Rather than trusting faulty measurements and guessing, we&#8217;re going to use the header&#8217;s pins themselves to point out where we need to place our holes.</p>
<div id="attachment_542" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/ds_burn.jpg"><img class="size-medium wp-image-542" title="Burned through holes" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/ds_burn-300x225.jpg" alt="Burned through holes" width="300" height="225" /></a><p class="wp-caption-text">Burned through holes</p></div>
<p>Using a pair of needlenose pliers and your soldering iron, heat the pins evenly and apply moderate pressure.  The pins may wiggle slightly but don&#8217;t let them move too far off otherwise your holes won&#8217;t be lined up. When all three pins have punched through, remove the pins with the needlenose pliers.  Use the small diameter drill bit to widen the holes and to furr out any residual plastic scraps.  Your finished holes should look something like below.</p>
<div id="attachment_543" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/ds_holes.jpg"><img class="size-medium wp-image-543" title="Completed holes" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/ds_holes-300x225.jpg" alt="Completed holes" width="300" height="225" /></a><p class="wp-caption-text">Completed holes</p></div>
<p>Just to make absolutely sure, go ahead and test with the connector and the cable to make sure everything fits properly.</p>
<div id="attachment_544" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/ds_test.jpg"><img class="size-medium wp-image-544" title="Hole Alignment Test" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/ds_test-300x225.jpg" alt="Hole Alignment Test" width="300" height="225" /></a><p class="wp-caption-text">Hole Alignment Test</p></div>
<p>If you&#8217;ve made it this far, you&#8217;re doing good.  Now it&#8217;s time to prep the connector for supergluing into the Dockstar&#8217;s case.  Since it&#8217;s a four pin connector and we&#8217;re only using three pins, make sure that the connector is properly oriented so that it fits properly and so that the serial cable can move freely in and out of the connector.  Back the cable off a bit so you can see which pin is missing and cut off the connector&#8217;s matching pin to eliminate a possible mis-wiring later on. Go ahead and attach and solder a wire to each of the three remaining pins.</p>
<div id="attachment_545" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/ds_connwires.jpg"><img class="size-medium wp-image-545" title="Socket connection with wires" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/ds_connwires-300x225.jpg" alt="Socket connection with wires" width="300" height="225" /></a><p class="wp-caption-text">Socket connection with wires</p></div>
<p>In order to glue the connector socket in, take the excess wire and coil it up for now. Apply a thin coat of superglue inside the Dockstar and when aligned, push the three pin header you used for burning the connector in through your drilled holes and into the connector.  This will hold the socket steady while the superglue cures.  Give it about 15 minutes to cure properly, then gently remove the pins from the socket.  At this point, you should have a fully mounted socket like in the picture below.</p>
<div id="attachment_546" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/ds_glue.jpg"><img class="size-medium wp-image-546" title="Glued in header socket" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/ds_glue-300x225.jpg" alt="Glued in header socket" width="300" height="225" /></a><p class="wp-caption-text">Glued in header socket</p></div>
<p>Now that the socket is taken care of, we need to attach it to the serial port on the Dockstar&#8217;s board.  Before we do anything permanent, we will test the serial port and then once we are satisfied that it&#8217;s all working, we&#8217;ll solder them in and close it up.   Start off with wrapping the ground wire to the lower right hand pin on the connection block.  This is the common GND connection and must be established first. If you are using my wiring plan, the GND wire is the single pin by itself on the three pin header we made earlier.</p>
<div id="attachment_547" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/ds_wrap.jpg"><img class="size-medium wp-image-547" title="wirewrapped GND wire" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/ds_wrap-300x225.jpg" alt="wirewrapped GND wire" width="300" height="225" /></a><p class="wp-caption-text">wirewrapped GND wire</p></div>
<p>The two pins to the left of the GND pin are the RX and TX pins respectively.  Attach the centermost pin to RX and the remaining pin to TX on the superglued connector.</p>
<div id="attachment_548" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/ds_wrap2.jpg"><img class="size-medium wp-image-548" title="Connected wires" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/ds_wrap2-300x225.jpg" alt="Connected wires" width="300" height="225" /></a><p class="wp-caption-text">Connected wires</p></div>
<p>Remember, we have NOT soldered the three wires yet.  Also, make sure that none of the wires are touching prior to connection.  In order to test the serial port and make sure we have it hooked up right, connect the three pin header on the serial cable to your socket on the back of the Dockstar and connect the USB connector to your computer. Do not apply power to the Dockstar yet.  Open up minicom and set the serial device to /dev/ttyUSB0, 115200, no parity, 8 bits, 1 stop bit.  When properly configured, apply power to the Dockstar and watch your console window.  If you got it right, you should get similar output like below.   If not, pull the power plug on the Dockstar and disconenct the serial cable out of the back of the dockstar.  Swap the left two pins (RX and TX) and try again.  You should get output like below.</p>
<div id="attachment_549" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/ds_serial.jpg"><img class="size-medium wp-image-549" title="Serial terminal output" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/ds_serial-300x186.jpg" alt="Serial terminal output" width="300" height="186" /></a><p class="wp-caption-text">Serial terminal output</p></div>
<p>Now that you&#8217;ve tested the wiring, disconnect the power and the serial cable from the Dockstar.  Solder the wires in place and reassemble the Dockstar. Be careful closing the cover as you want to make sure that the wires coming off the superglued socket do not touch the metal shielding. (Editor&#8217;s Note: I really need a hot glue gun)</p>
<div id="attachment_550" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/ds_closeup.jpg"><img class="size-medium wp-image-550" title="Closeup of Dockstar prior to reassembly" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/ds_closeup-300x225.jpg" alt="Closeup of Dockstar prior to reassembly" width="300" height="225" /></a><p class="wp-caption-text">Closeup of Dockstar prior to reassembly</p></div>
<p>Close it all up and test it one more time.  If everything works as should, you&#8217;re good to go.  Now you can access the serial port without having to take your Dockstar apart over and over again.</p>
<div id="attachment_551" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/ds_comp_att.jpg"><img class="size-medium wp-image-551" title="Completed mod with serial cable attached" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/ds_comp_att-300x225.jpg" alt="Completed mod with serial cable attached" width="300" height="225" /></a><p class="wp-caption-text">Completed mod with serial cable attached</p></div>
<p>Here is a picture of the completed serial cable mod. The serial cable is plugged in right above the keydrive in this photo.</p>
<div id="attachment_552" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/ds_complete.jpg"><img class="size-medium wp-image-552" title="View of Serial Port" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/07/ds_complete-300x225.jpg" alt="View of Serial Port" width="300" height="225" /></a><p class="wp-caption-text">View of Serial Port</p></div>
<p>Same view as above, but with the serial cable removed.  Nothing but three holes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yourwarrantyisvoid.com/2010/07/21/seagate-dockstar-add-an-accessible-serial-port/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Lasers: Barcode scanner &#8220;gun&#8221; has real laser inside!</title>
		<link>http://www.yourwarrantyisvoid.com/2010/05/18/lasers-barcode-scanner-gun-has-real-laser-inside/</link>
		<comments>http://www.yourwarrantyisvoid.com/2010/05/18/lasers-barcode-scanner-gun-has-real-laser-inside/#comments</comments>
		<pubDate>Tue, 18 May 2010 23:22:23 +0000</pubDate>
		<dc:creator>firestorm_v1</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[How-To's]]></category>
		<category><![CDATA[Investigative Dissassembly]]></category>

		<guid isPermaLink="false">http://www.yourwarrantyisvoid.com/?p=405</guid>
		<description><![CDATA[I know it&#8217;s been a while so here&#8217;s another post.  In this post, I&#8217;ll go over the hardware in this gun style barcode scanner that holds a real helium-neon laser tube with power supply! Although this post only covers the basic modding, there&#8217;s nothing to stop you from gutting the gun and using the HeNe [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter size-medium wp-image-406" title="Telxon LS-201" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/03/DSCF0529-300x225.jpg" alt="Telxon LS-201" width="300" height="225" /></p>
<p>I know it&#8217;s been a while so here&#8217;s another post.  In this post, I&#8217;ll go over the hardware in this gun style barcode scanner that holds a real helium-neon laser tube with power supply! Although this post only covers the basic modding, there&#8217;s nothing to stop you from gutting the gun and using the HeNe tube for your own nefarious plan. <img src='http://www.yourwarrantyisvoid.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <span id="more-405"></span></p>
<p>Before we get started, I can not stress the importance of safety especially with working with lasers and high voltage.  The laser energy generated in this gun is powerful and can result in eye damage, even if only temporary.  Unlike laser diodes that use an LED type technology to generate a laser beam, the HeNe tube is a lot more powerful and also generates UV radiation as well as laser light making it doubly dangerous.   Please be cautious when working with this device, and pay special attention to the aperture where the laser light is emitted.  <span style="text-decoration: underline;"><strong>YOURWARRANTYISVOID.COM CANNOT BE HELD LIABLE FOR THE USE OR MISUSE OF THIS INFORMATION. IT IS PROVIDED ONLY AS AN EDUCATIONAL REFERENCE AND SHOULD BE TREATED AS SUCH.</strong></span></p>
<p>Now that the legal mess is out of the way&#8230;.</p>
<p>After the last post with a barcode scanner was posted, I got to thinking about two laser &#8220;gun&#8221; style barcode scanners I have in storage.  I acquired them at a flea market about two years ago for $20 each but didn&#8217;t have enough information or internet access to be able to use them.  Well times have changed and so has the tools and information available to me so now I was able to complete what I had set out to do.</p>
<p>In this post, I will cover how to convert the Telxon LS-201 laser barcode scanner into a functional laser pistol using all of the included hardware.  We will cover the hardware that&#8217;s in the scanner, as well as the connections needed to fire the high voltage power supply for the HeNe laser tube.  Since the hardware is already pretty functional, most of our work will center around the control board and not the receiver board, but more on that later.</p>
<h2><strong>Getting Started</strong></h2>
<p>You will need the following tools:</p>
<ul>
<li>Philips screwdriver</li>
<li>Razor cutter</li>
<li>Soldering Iron</li>
<li>12VDC power supply (at least 750mA)</li>
</ul>
<h2>Teardown</h2>
<p>We&#8217;ll start off with some pictures.</p>
<div id="attachment_407" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/03/DSCF0528.jpg"><img class="size-medium wp-image-407" title="Aperture and receiver" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/03/DSCF0528-300x225.jpg" alt="Aperture and receiver" width="300" height="225" /></a><p class="wp-caption-text">Aperture and receiver</p></div>
<p>This picture shows the aperture (top) and the receiver (front two windows).  When the laser is engaged, the laser is emitted from the aperture and is bounced off of a reflecting mirror (not shown) that produces a line which is then &#8220;read&#8221; by the receiver.  The laser dot&#8217;s position is controlled by the reflecting mirror using the receiver controller board and is then interpreted by the onboard logic to produce the codes to send.</p>
<div id="attachment_406" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/03/DSCF0529.jpg"><img class="size-medium wp-image-406" title="Telxon LS-201" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/03/DSCF0529-300x225.jpg" alt="Telxon LS-201" width="300" height="225" /></a><p class="wp-caption-text">Telxon LS-201</p></div>
<p>This side shows the holes that have the screws we will need to remove.</p>
<div id="attachment_408" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/03/DSCF0527.jpg"><img class="size-medium wp-image-408" title="Opened up" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/03/DSCF0527-300x225.jpg" alt="Opened up" width="300" height="225" /></a><p class="wp-caption-text">Opened up</p></div>
<p>After opening up the laser, you can make out the major components.  Reflector mirror and optics (upper right hand corner); Laser tube case (large black horizontal cylinder); laser HV power supply (copper box in handle); receiver board (top PCB); trigger board (lower PCB).</p>
<div id="attachment_409" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/03/DSCF0539.jpg"><img class="size-medium wp-image-409" title="Receiver board" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/03/DSCF0539-300x225.jpg" alt="Receiver board" width="300" height="225" /></a><p class="wp-caption-text">Receiver board</p></div>
<p>This is the receiver board (upper PCB0 and contains the &#8220;crab eyes&#8221; receivers that are used to see the laser as it scans the barcode. We won&#8217;t be using it so it will be removed.</p>
<div id="attachment_410" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/03/DSCF0538.jpg"><img class="size-medium wp-image-410" title="trigger board" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/03/DSCF0538-300x225.jpg" alt="trigger board" width="300" height="225" /></a><p class="wp-caption-text">trigger board</p></div>
<p>This is the trigger board.  All of our wiring will be done from this board.</p>
<div id="attachment_411" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/03/DSCF0541.jpg"><img class="size-medium wp-image-411" title="optics" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/03/DSCF0541-300x225.jpg" alt="optics" width="300" height="225" /></a><p class="wp-caption-text">optics</p></div>
<p>Here is the barcode scanner&#8217;s optics package.   The laser comes up through a lens in the back of the view, is bounced off of a stationary mirror in the red clip and then bounced off of the reflective mirror on the left hand side of the package.  You can see the servo&#8217;s cable that is used by the decoder board to generate the horizontal line. At this part of the build, wedge a piece of folded paper under the mirror to prevent it from moving.</p>
<div id="attachment_412" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/03/DSCF0542.jpg"><img class="size-medium wp-image-412" title="top of optics package" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/03/DSCF0542-300x225.jpg" alt="top of optics package" width="300" height="225" /></a><p class="wp-caption-text">top of optics package</p></div>
<p>This picture shows the lens and the mirror mentioned on the last picture. You can see the recess for the laser tube body and another mirror.  The indentations on the top and bottom of this view are used with large rubberized cushions to protect the laser assembly from drops, shock, etc.</p>
<div id="attachment_413" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/03/DSCF0543.jpg"><img class="size-medium wp-image-413" title="laser tube" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/03/DSCF0543-300x225.jpg" alt="laser tube" width="300" height="225" /></a><p class="wp-caption-text">laser tube</p></div>
<p>Here is the laser tube mounted in the bottom half of the protective mounts.  The emitter aperture for the laser tube is on the left, with a lens and a pair of mirrors.</p>
<div id="attachment_414" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/03/DSCF0544.jpg"><img class="size-medium wp-image-414" title="laser tube detail" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/03/DSCF0544-300x225.jpg" alt="laser tube detail" width="300" height="225" /></a><p class="wp-caption-text">laser tube detail</p></div>
<p>Here is a closeup of the detail on the laser tube.</p>
<div id="attachment_415" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/03/DSCF0545.jpg"><img class="size-medium wp-image-415" title="laser tube detail 2" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/03/DSCF0545-300x225.jpg" alt="laser tube detail 2" width="300" height="225" /></a><p class="wp-caption-text">laser tube detail 2</p></div>
<p>Another view of the laser tube with part number and the power rating.  This tube is a little bit more than 1 milliwatt.</p>
<div id="attachment_416" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/03/DSCF0552.jpg"><img class="size-medium wp-image-416" title="Energized laser tube" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/03/DSCF0552-300x225.jpg" alt="Energized laser tube" width="300" height="225" /></a><p class="wp-caption-text">Energized laser tube</p></div>
<p>In this view, the laser tube is energized and lasing.  The tube emits a pink/orange glow while energized.  The connection block on the lower left is ground which goes to the far side of the laser tube (right hand side in these photos).  The positive side of the laser tube is also the laser&#8217;s aperture.</p>
<div id="attachment_417" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/03/DSCF0553.jpg"><img class="size-medium wp-image-417" title="reflector leakage" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/03/DSCF0553-300x225.jpg" alt="reflector leakage" width="300" height="225" /></a><p class="wp-caption-text">reflector leakage</p></div>
<p>Helium Neon laser tubes consist of a fully reflective mirror and a partially reflective mirror.  The fully reflective mirror bounces the laser light back into the laser, while the partially reflective mirror is the laser aperture.  In this view, we can see that there is a bit of laser leakage from the fully reflective mirror which more than likely explains the low watt rating on the laser.</p>
<div id="attachment_418" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/03/DSCF0554.jpg"><img class="size-medium wp-image-418" title="laser beam" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/03/DSCF0554-300x225.jpg" alt="laser beam" width="300" height="225" /></a><p class="wp-caption-text">laser beam</p></div>
<p>This is the beam that is produced out of the laser&#8217;s aperture.</p>
<div id="attachment_419" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/03/DSCF0535.jpg"><img class="size-medium wp-image-419" title="power supply wiring" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/03/DSCF0535-300x225.jpg" alt="power supply wiring" width="300" height="225" /></a><p class="wp-caption-text">power supply wiring</p></div>
<p>The laser&#8217;s power supply has four wires coming out of it.  A white wire with yellow stripe (designated white/yellow), a white wire with black stripe (white/black), red and black. The large red wire is the High Voltage line for the laser tube while the thin black wire accompanying it is the ground wire.  In all testing from now on, the large red wire and thin black wire are not considered in any wiring diagrams as they are dedicated only to the laser power supply.</p>
<h2>Let the Modding Begin</h2>
<p>Before we begin hacking and slashing, let&#8217;s cover what needs to be done (in no particular order):</p>
<ul>
<li>We need to figure out how to apply power to the laser&#8217;s power supply.</li>
<li>We need to figure out how to get the trigger to apply power to the power supply</li>
<li>We need to modify the cable so that we can give the gun the proper  voltage.</li>
<li>We need to remove the now unneeded receiver board.</li>
<li>We need to find a way to make an indicator LED so we know the laser is producing laser light.</li>
</ul>
<h3>Reviewing the Power Supply&#8217;s wiring:</h3>
<p>Before we begin, let&#8217;s examine the power supply.  It had no identifying marks on it or manufacturer data on it so I really had to guess and get lucky.  Thankfully I was able to decipher it&#8217;s wiring method using the existing wiring on the trigger board and through some clever detective work.</p>
<p>As mentioned before, the power supply has five leads coming out of it.  After performing some testing and research, I was able to decode what the leads do and how to hook them up so that the tube is energized. Please remember that the thick red wire and the thin black wire that go to the HeNe Laser are not considered in this table.</p>
<p><strong>RED wire</strong>:  This is the main power lead for the power supply.  This must be +12vDC.</p>
<p><strong>BLACK wire:</strong> This is the ground lead for the power supply.</p>
<p><strong>WHITE WIRE / YELLOW STRIPE:</strong> This is the &#8220;trigger&#8221; lead.  If it receives voltage between 5vDC and 12vDC, the laser tube will energize.</p>
<p><strong>WHITE WIRE / BLACK STRIPE:</strong> This is an output lead and will be used for our LED indicator.</p>
<div id="attachment_421" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/03/DSCF0532.jpg"><img class="size-medium wp-image-421" title="Test rig" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/03/DSCF0532-300x225.jpg" alt="Test rig" width="300" height="225" /></a><p class="wp-caption-text">Test rig</p></div>
<p>Here is a pic of the test rig I used to figure out the wiring.  The rest of the components on that breadboard are not associated with this project.</p>
<p>Now that we have the the easy part figured out, it&#8217;s time to rework the trigger board. One thing of special note is that the trigger &#8220;button&#8221; is easily pried off.  I&#8217;m assuming that this was done on purpose as it would wear out quite quickly and an easy replacement method was needed.  Start off by cutting the ribbon cable from the trigger board and use a flat bladed mini screwdriver to gently pry off the trigger button</p>
<div id="attachment_422" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/03/DSCF0555.jpg"><img class="size-medium wp-image-422" title="trigger board detail" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/03/DSCF0555-300x225.jpg" alt="trigger board detail" width="300" height="225" /></a><p class="wp-caption-text">trigger board detail</p></div>
<p>Please note that we intend to reuse most of the components on the trigger board so be careful with your soldering iron.  With the trigger board separated from the  receiver board, start off by desoldering all the wires and resistors.</p>
<div id="attachment_423" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/03/DSCF0556.jpg"><img class="size-medium wp-image-423" title="clean trigger board" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/03/DSCF0556-300x225.jpg" alt="clean trigger board" width="300" height="225" /></a><p class="wp-caption-text">clean trigger board</p></div>
<p>While you remove all the parts from the trigger board, also make sure that the holes left behind are clear.  I used a pneumatic solder sucker to remove excess solder and debris.  <a title="radio shack" href="http://www.radioshack.com/product/index.jsp?productId=2062745" target="_blank">This is the model I have, purchased from Radio Shack</a> Rather than reinventing the wheel, we will be modifying the existing header and connecting only the pins we need to get power to the HVAC power supply for the laser and to light our LED. Due to the way that the trigger board is wired, we will be swapping the black header block from the laser power supply with that from the coil-cord cable. In the below picture, I have already removed the connector block from the end of the coil cord that goes into the gun and cut all but the black and white wires.</p>
<div id="attachment_455" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/05/DSCF0557.jpg"><img class="size-medium wp-image-455" title="coil cord cable prepped" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/05/DSCF0557-300x225.jpg" alt="coil code cable prepped" width="300" height="225" /></a><p class="wp-caption-text">coil cord cable prepped</p></div>
<p>This image shows the cable with the black connector reinstalled. Remember, this is the laser&#8217;s black header connection. (Don&#8217;t worry, I&#8217;ll go over pinouts later)</p>
<div id="attachment_456" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/05/DSCF0560.jpg"><img class="size-medium wp-image-456" title="power cable header connection" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/05/DSCF0560-300x225.jpg" alt="power cable header connection" width="300" height="225" /></a><p class="wp-caption-text">power cable header connection</p></div>
<p>We then do the same thing with the laser&#8217;s HVAC power supply.</p>
<div id="attachment_457" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/05/DSCF0563.jpg"><img class="size-medium wp-image-457" title="both headers ready" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/05/DSCF0563-300x225.jpg" alt="both headers ready" width="300" height="225" /></a><p class="wp-caption-text">both headers ready</p></div>
<p>We then reattach the header pins to the trigger board and power it up. At this point, pushing the trigger button should fire the laser.   Next, we make the connection for our LED. In the below picture, the brown wire goes to the power supply ground, (black wire from the coil-cord) and the red wire (and the resistor) go to position 5 (from the right hand side of the trigger board).</p>
<div id="attachment_459" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/05/DSCF0565.jpg"><img class="size-medium wp-image-459" title="Attaching the LED" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/05/DSCF0565-300x225.jpg" alt="Attaching the LED" width="300" height="225" /></a><p class="wp-caption-text">Attaching the LED</p></div>
<p>Below is the diagram I used for wiring up both connector blocks:</p>
<div id="attachment_460" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/05/connector-block-diagram.jpg"><img class="size-medium wp-image-460" title="connector block diagram" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/05/connector-block-diagram-300x213.jpg" alt="connector block diagram" width="300" height="213" /></a><p class="wp-caption-text">connector block diagram</p></div>
<p>Now that all that is said and done, reassemble the laser, trigger board, HVAC power supply into the laser body and let&#8217;s test it again.  Depending on how accurate you were early on with the paper wedge and the servo mirror, it may take a couple of times to get the dot to point down the gun body.  Here is a pic with all the hardware installed and ready for the mating connector.  In this shot, you can see the LED that was wired in is working and that the laser tube is energized through a port in the housing an inch from my thumb:</p>
<p style="text-align: center;">
<div id="attachment_461" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/05/DSCF0574.jpg"><img class="size-medium wp-image-461 " title="Reinstalled hardware" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/05/DSCF0574-300x225.jpg" alt="Reinstalled hardware" width="300" height="225" /></a><p class="wp-caption-text">Reinstalled hardware</p></div>
<p style="text-align: left;">So with all the parts back in the gun case, let&#8217;s test it. Below is my test shot.</p>
<p style="text-align: left;">
<div id="attachment_462" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/05/DSCF0577.jpg"><img class="size-medium wp-image-462" title="Test Firing" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/05/DSCF0577-300x225.jpg" alt="Test Firing" width="300" height="225" /></a><p class="wp-caption-text">Test Firing</p></div>
<h2>So, where do we go from here?</h2>
<p>Now that you know how to mod your laser scanner, the choice on what to do with it is completely up to your imagination.  Some ideas that come to mind:</p>
<ul>
<li> build a &#8220;target&#8221; to shoot at that toggles power to an appliance or light.</li>
<li>build several targets to make a shooting gallery in your own home.</li>
<li>Really cool presentation laser.  (Pens? Bah, I have a gun!)</li>
</ul>
<p>This information is also useful in case you actually find need of a helium neon laser in any of your hacks and considering that this project had a $0 parts cost aside from the purchase of the scanner to begin with, makes a great price point for starting into experimentation with lasers.   Do the sensible thing if you do want to start experimenting with lasers. Please invest in quality eye protection and always practice safety first!</p>
<p>I hope you&#8217;ve had fun reading this article and I look forward to your comments. If you build something cool with your laser, please let me know about it!</p>
<p>FIRESTORM_v1</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yourwarrantyisvoid.com/2010/05/18/lasers-barcode-scanner-gun-has-real-laser-inside/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web: Stupid HTML trick to get past content filters</title>
		<link>http://www.yourwarrantyisvoid.com/2010/05/02/web-stupid-html-trick-to-get-past-content-filters/</link>
		<comments>http://www.yourwarrantyisvoid.com/2010/05/02/web-stupid-html-trick-to-get-past-content-filters/#comments</comments>
		<pubDate>Sun, 02 May 2010 16:58:50 +0000</pubDate>
		<dc:creator>firestorm_v1</dc:creator>
				<category><![CDATA[How-To's]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.yourwarrantyisvoid.com/?p=426</guid>
		<description><![CDATA[I know it&#8217;s been a while since I posted, and I do apologize.  Life has definitely not been kind to me in the regards of time however I have not forgotten anything. I have two major posts coming up hopefully within the next week, however here&#8217;s a quick article about a trick I discovered while [...]]]></description>
			<content:encoded><![CDATA[<p>I know it&#8217;s been a while since I posted, and I do apologize.  Life has definitely not been kind to me in the regards of time however I have not forgotten anything. I have two major posts coming up hopefully within the next week, however here&#8217;s a quick article about a trick I discovered while working on a project with a friend.  The project was to see if their content filter could be broken in their chat application andthrough a little bit of HTML know-how and some PHP code, I was able to crank out a generator to do just that.  Read more to find out the details.<span id="more-426"></span></p>
<h2>The Challenge:</h2>
<p>The trick was to figure out how to get certain &#8220;four letter words&#8221; past the chat app&#8217;s filter and into the main chat window without the word being munged by the system.  Most chat applications filter out obscene words through a string matching system and replaces it with something that is much less offensive, usually a series of asterisks.  The only thing I could use was straight ASCII characters, and I couldn&#8217;t use any &#8220;img src&#8221; HTML tags to do the dirty work (literally).</p>
<h2>The Analysis:</h2>
<p>All HTML code that is rendered is associated with something called a character set (or code page from the old MS-DOS days).  These character sets associate any character with a certain number (often called it&#8217;s ASCII value).  Although some characters are standard on all character sets, (like &#8220;a&#8221; = 97),  some control characters and characters above 256(decimal) change significantly.  In order to properly convey these control characters via the web, urlencoding was created and implemented as part of the HTML spec.  What this means is that every character in a character set can be represented in HTML through the use of the percent sign (%) modifier. The syntax for this was %(ASCII value in hexadecimal). The general idea was that if you typed in a russian name using symbols not found in the Latin alphabet, these symbols could be properly represented on the server side.</p>
<p>With that in mind, I examined the UTF-8 character set.  In this example, I&#8217;ll use the word &#8220;taco&#8221; to represent the offending word.</p>
<h2>How it&#8217;s done:</h2>
<p>The process for this is as follows:</p>
<ol>
<li>Find the ASCII value for each character in the word</li>
<li>Find the hexadecimal value for the ASCII value</li>
<li>Add &#8220;%&#8221; in front of that number</li>
<li>Insert a &#8220;null&#8221; character somewhere.</li>
</ol>
<p>For reference, you can use <a title="ASCII table" href="http://www.asciitable.com" target="_blank">this chart</a> which gives you the ASCII and the ASCII in hex values already</p>
<p>From the chart, we see the following information:</p>
<p>t = 116 (decimal) or 74(hex)</p>
<p>a=97(decimal) or 61(hex)</p>
<p>c= 99(decimal) or 63(hex)</p>
<p>o = 111(decimal) or 6f(hex)</p>
<p>Using this information, we can then create our string, inserting the % where needed.  %74 %61 %63 %6f</p>
<p>Only one item remains.  In order to spoof some of the more intelligent content filters, you need to put a null character in there somewhere. This throws off the content filter and makes it think that there are different characters represented.  For this, I used character 0B which does not have latin equivalent and is a control code that does not render in HTML.  I used 0B because 08 rendered as a tab in testing.</p>
<p>Knowing this, I inserted the null character between the urlencoded &#8220;a&#8221; and the urlencoded &#8220;c&#8221;: %74 %61 %0B %63 %6F</p>
<h2>Testing it out:</h2>
<p>All that is needed to test it is to copy and paste the above string into any chat application and hit send. You will need to remove the spaces from between the characters otherwise your application will treat them as renderable characters as well.  If it works, you&#8217;ll see the word &#8220;taco&#8221; in your window.  Now you know how to get past content filters.  If you are in the business of building content filters, now you have a new strategy for blocking people abusing them.</p>
<h2>Don&#8217;t be a prick!</h2>
<p>I posted this information with the hopes that people may find it useful, not so that script kiddies can run around and make asses of themselves.  Be smart about how you use this information and last but not least, DON&#8217;T BE A PRICK!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yourwarrantyisvoid.com/2010/05/02/web-stupid-html-trick-to-get-past-content-filters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basic Stamp: A quick guide on using a legacy joystick</title>
		<link>http://www.yourwarrantyisvoid.com/2010/02/03/basic-stamp-a-quick-guide-on-using-a-legacy-joystick/</link>
		<comments>http://www.yourwarrantyisvoid.com/2010/02/03/basic-stamp-a-quick-guide-on-using-a-legacy-joystick/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 20:28:19 +0000</pubDate>
		<dc:creator>firestorm_v1</dc:creator>
				<category><![CDATA[Embedded devices]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[How-To's]]></category>
		<category><![CDATA[Microcontrollers]]></category>

		<guid isPermaLink="false">http://www.yourwarrantyisvoid.com/?p=356</guid>
		<description><![CDATA[In this post, we&#8217;ll be going over the basics of using an old regular PC-gameport joystick with Parallax&#8217;s Basic Stamp powered Boe-Bot.  This howto will have all the information you need to get started including code, schematics and a parts list.  We will be covering how the joystick is wired and how to go about [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter size-full wp-image-357" title="BS2 joystick header image" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/01/BS2_Joystick.jpg" alt="Joystick + Basic Stamp BOE-BOT = World Domination" width="477" height="102" /></p>
<p style="text-align: left;">In this post, we&#8217;ll be going over the basics of using an old regular PC-gameport joystick with Parallax&#8217;s Basic Stamp powered Boe-Bot.  This howto will have all the information you need to get started including code, schematics and a parts list.  We will be covering how the joystick is wired and how to go about interfacing it with the Boe-Bot for an easy to use and easy to expand analog control method for your Boe-Bot.  Next step, world domination!<span id="more-356"></span></p>
<h2 style="text-align: left;">Foreword</h2>
<p style="text-align: left;">The joystick is something that has been around quite a long time, even longer than computers.  The idea of being to control something on-screen by using a joystick is one that takes almost no learning curve,  is easy to start and you only end up getting better.  Even today in modern gaming, it is easy to find controllers with at least one analog joystick on it.  My Xbox 360 controllers feature two sticks per controller which give the gamer a very precise method for movement and aiming accuracy, something that buttons can&#8217;t quite provide.  As long as I&#8217;ve been working on computers, I always remember using PC analog joysticks in my games.</p>
<p style="text-align: left;">Nowadays, the modern PC joystick has all but gone the way of the dodo, however those few that are around now are USB and have a ton of buttons.  The legacy joystick (or &#8220;gameport&#8221; joystick) still has a bit of usefulness in it and today we will be covering how to get it to work with a Basic Stamp microcontroller.</p>
<p style="text-align: left;">Of course someone&#8217;s going to ask, &#8220;Why use a PC joystick?, Why not (insert control method here)?&#8221;.  My answers are:</p>
<p style="text-align: left;">1:  Cost &#8211; The PC joystick used in this tutorial was bought at a Goodwill for $3.</p>
<p style="text-align: left;">2: Ease of use &#8211; Once you have programmed your application, you just grab it and go. There&#8217;s no need to go over complex control methods or trying to remember what does what now.</p>
<p style="text-align: left;">3: Low Parts Count &#8211; In this tutorial, I used two capacitors and six resistors to get the joystick working.  Most other control schemes require a lot more parts.</p>
<h2 style="text-align: left;">Basic Theory of Operations</h2>
<p>The way an analog PC joystick works is not very complex at all.  You have a stick which is capable of moving any position along two axes (X and Y) and with two switches or &#8220;buttons&#8221; for interaction.  The position of the stick is detected via two variable resistors usually around 10Kohm, one running horizontal (left/right) and one running vertical (towards you/away from you).  The computer would send a pulse out to the joystick and get return values from the variable resistors.  Using the returned pulse it could then decide on what action to take, how far/fast to move your character, etc..</p>
<p>The two buttons (or more) are detected through simple momentary contact switches. If the switch pin was high, then the button was depressed otherwise, the button was released.  These button switches are normally open and while the gameport pinout supports up to four buttons, additional buttons were made by figuring out how to multiplex them as shown in the chart below:<img class="aligncenter size-full wp-image-361" title="Analog Joystick Button Map" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/01/buttonmap.jpg" alt="Analog Joystick Button Map" /></p>
<p>When using the PC gameport joystick, you would need to go through calibration which taught the computer the limits of your axes and the button layout.  Because variable resistors are not terribly accurate across manufacturers this calibration was a requirement as no two joysticks, not even those made by the same manufacturer,  would behave exactly alike. There would always be minute differences between the joystick&#8217;s behaviors so the calibration was a way to standardize the measurements and clean up the inaccuracy of the joystick.</p>
<p>In our tutorial, we will be using a two-button model.  This joystick is a very standard stick and has a trigger button and a thumb switch button.  It connects to the computer via a 15 pin D-sub connector usually to the sound card which has a Gameport connector on it.  This connector is usually orange on newer motherboards, if it exists at all.<a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/01/DSCF0500.jpg"><img class="aligncenter size-medium wp-image-362" title="standard PC joystick" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/01/DSCF0500-300x225.jpg" alt="standard PC joystick" width="300" height="225" /></a></p>
<p>On the bottom of this joystick, there are two sliders.  These two sliders can be used to &#8220;tune&#8221; the position of the VRs in order to be able to get the best range of motion for the stick.  You may need to use these during the next step for calibration.  Here is a picture of the bottom of my joystick.  The large circular things are suction cups which help keep the base down on the table while you move the joystick around:</p>
<p><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/01/DSCF0508.jpg"><img class="aligncenter size-medium wp-image-369" title="Underside of jostick" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/01/DSCF0508-300x225.jpg" alt="Underside of joystick" width="300" height="225" /></a></p>
<p>After taking the bottom off, we can  see the setup of the two variable resistors (VRs).  Unlike most joysticks this one uses linear VRs and not the rotary VRs (sometimes called pots) that are commonly found for volume controls. We have oneVR on the left for the Y axis, and the other one along the bottom for the X axis, some support hardware and a small PCB:</p>
<p><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/01/DSCF0502.jpg"><img class="aligncenter size-medium wp-image-363" title="opened joystick" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/01/DSCF0502-300x225.jpg" alt="opened joystick" width="300" height="225" /></a></p>
<p>The little circuit board at the top of the stick doesn&#8217;t conceal any electronics, It&#8217;s only a bypass as shown in these next two images:<a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/01/DSCF0503.jpg"><img class="aligncenter size-medium wp-image-366" title="closeup view of PCB" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/01/DSCF0503-300x225.jpg" alt="closeup view of PCB" width="300" height="225" /></a></p>
<p>This picture is of the bottom of the circuit board, As stated before, this only acts as a pass through to make wiring the joystick easier during production.<a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/01/DSCF0505.jpg"><img class="aligncenter size-medium wp-image-367" title="backside of PCB" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/01/DSCF0505-300x225.jpg" alt="backside of PCB" width="300" height="225" /></a></p>
<p>Here is a picture of one of the two linear variable resistors.  These are 100Kohm but yours might be different:<a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/01/DSCF0504.jpg"><img class="aligncenter size-medium wp-image-368" title="linear variable resistors" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/01/DSCF0504-300x225.jpg" alt="linear variable resistors" width="300" height="225" /></a></p>
<p>Now that the joystick has been opened up and we know all it&#8217;s secrets, it&#8217;s time to start on the interface for the BOE-BOT.</p>
<h2>The interface circuit</h2>
<p>The interface for your joystick is actually quite simple.  You will need the following items:</p>
<ul>
<li>A 15 pin female D-sub connector with ribbon cable &#8211; I used the one from an old PC that I had many years ago.  The long ribbon was perfect for this job.</li>
<li>4x 220ohm resistors</li>
<li>2x 10K resistors</li>
<li>2x .1uF capacitors &#8211; Note: I used ceramic capacitors in my project as they are easier to work with however in theory electrolytic capacitors should work as well. If you use electrolytics, please pay careful attention to the polarity as electrolytics can explode if hooked in backwards and may risk hurting you and/or damaging your microcontroller.</li>
<li>Jumper wire as needed</li>
</ul>
<p>This will provide the basic parts needed to perform our calibration test.  You will need to hook up the parts as shown in this schematic below.  Click on the image for a full size one if you need it.</p>
<p><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/01/joystick-schematic.jpg"><img class="aligncenter size-medium wp-image-370" title="joystick schematic" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/01/joystick-schematic-300x205.jpg" alt="joystick schematic" width="300" height="205" /></a></p>
<p>Here is a full pinout of the PC gameport connector that shows all of the various things that the pins are used for: (<a href="http://pinouts.ru/Inputs/GameportPC_pinout.shtml" target="_blank">Pinouts obtained from pinouts.ru &#8211; a good site to have handy</a>)<a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/01/joystick-pinout.jpg"><img class="aligncenter size-medium wp-image-372" title="joystick pinout" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/01/joystick-pinout-300x201.jpg" alt="Joystick pinout" width="300" height="201" /></a></p>
<p>In my D-Sub connector, pin 4 and pin 5 are shorted together however this may be done either at the joystick end or in your D-sub cable as well. When in doubt, test it with a multimeter.  If you find that during your calibration test, your buttons do not respond at all try examing those two pins to make sure that they are both shorted together.  <strong>WARNING!</strong> Although the pinouts.ru pinout provided above has some things labeled &#8220;Ground&#8221; and &#8220;+5VDC&#8221; use my schematic as the final verdict.   The reason for this is the pinouts.ru site describes the joystick&#8217;s gameport connector on a computer.  Since we are not using a computer and this is not a digital joystick, I have changed some of the meanings of the pins as shown in my schematic.  If you hook it up differently, you might damage your microcontroller.</p>
<h2>Calibration Software</h2>
<p>Now that the interface is built, we need to write the code needed for making the BOE-BOT &#8220;read&#8221; the joystick and to make it do stuff.  We will be using the RCTIME<span style="text-decoration: underline;"> </span>function of the Basic Stamp to charge and time the two .1uF capacitors.  By timing their discharge rates, we can then mathematically calculate the position of the joystick.</p>
<p>As far as the buttons go, they are just as easy as any other two buttons for your microcontroller.  The BOE-BOT will monitor pin2 and 3 and if they are brought high (by pushing a button) the BS2 will sense it and perform whatever action you have programmed.  For now, we are just getting the calibration information and to make sure everything works properly.  The tags for &#8220;Lights&#8221; and &#8220;Horn&#8221; will come in the next section.</p>
<p>You can download the source code called &#8220;BS2_joystick_diagnostics.bs2&#8243; from my downloads page, or <a href="http://www.yourwarrantyisvoid.com/downloads/files/BS2_joystick_diagnostics.bs2" target="_blank">here is the direct link</a> You might need to right click on the link and go to &#8220;Save As&#8221;.</p>
<p>After loading it into your BOE-BOT, be sure to leave a debug window open, as this is where you can see the RCTIME counts and the buttons.  You may  notice that the values will be all over the place and will constantly be changing but this is normal.  Play around with it a bit and get a general feel for how your joystick works.</p>
<p>If for some reason, your RCTIME is stuck at 0, this indicates that the Basic Stamp is not seeing the capacitor or is not sensing the capacitor&#8217;s discharge.  You will need to check your wiring to make sure everything&#8217;s lined up. If need be, you can use a 100Kohm resistor between pins 1 and 3 or between pins 1 and 6  on your 15 pin D-sub connector to test.  If RCTIME shows up there, then use the multimeter on your joystick&#8217;s D-sub cable and make sure that you can see the resistance changing on those two sets of pins.  If you get no connection on the joystick, you could have a bad joystick on your hands.</p>
<p>Here are the images of my RCTIME output along with a picture showing the position of my joystick.  You will have different numbers, but the format is still the same.</p>
<div id="attachment_377" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/01/0-position.jpg"><img class="size-medium wp-image-377" title="Center or &quot;zero&quot; position" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/01/0-position-300x256.jpg" alt="Center or &quot;zero&quot; position" width="300" height="256" /></a><p class="wp-caption-text">Center or &quot;zero&quot; position</p></div>
<div id="attachment_380" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/01/X-left.jpg"><img class="size-medium wp-image-380" title="X (horizontal) axis left" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/01/X-left-300x255.jpg" alt="X (horizontal) axis left" width="300" height="255" /></a><p class="wp-caption-text">X (horizontal) axis left</p></div>
<div id="attachment_381" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/01/X-right.jpg"><img class="size-medium wp-image-381" title="X (horizontal) axis right" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/01/X-right-300x238.jpg" alt="X (horizontal) axis right" width="300" height="238" /></a><p class="wp-caption-text">X (horizontal) axis right</p></div>
<div id="attachment_383" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/01/Y-up.jpg"><img class="size-medium wp-image-383 " title="Y (vertical) axis up" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/01/Y-up-300x183.jpg" alt="Y axis (vertical) up" width="300" height="183" /></a><p class="wp-caption-text">Y (vertical) axis up</p></div>
<div id="attachment_382" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/01/Y-down.jpg"><img class="size-medium wp-image-382" title="Y (vertical) axis down" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/01/Y-down-300x225.jpg" alt="Y (vertical) axis down" width="300" height="225" /></a><p class="wp-caption-text">Y (vertical) axis down</p></div>
<div id="attachment_378" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/01/Button-0.jpg"><img class="size-medium wp-image-378" title="Button 0 pressed" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/01/Button-0-300x210.jpg" alt="Button 0 pressed" width="300" height="210" /></a><p class="wp-caption-text">Button 0 pressed</p></div>
<div id="attachment_379" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/01/Button-1.jpg"><img class="size-medium wp-image-379" title="Button 1 pressed" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/01/Button-1-300x212.jpg" alt="Button 1 pressed" width="300" height="212" /></a><p class="wp-caption-text">Button 1 pressed</p></div>
<p style="text-align: left;">Once you have a &#8220;feel&#8221; for how the joystick responds, let&#8217;s actually do something with this. You will need to figure out the zones on where to apply the speed settings.   The BS2_Rover application contains routines that can filter out and adjust pulses sent to the servos however this requires a bit of calibration (hence the calibration application).  All you need to do is to figure out where your joystick should switch between off and low, low and medium and lastly medium and high.    The reason for this is that for precise movements, we don&#8217;t want the BOE-BOT to lurch out of control, and while high speed all the time might not be a bad idea, it can be cumbersome trying to get into a small space with it.</p>
<h2>Getting it to work</h2>
<p>Go ahead and download the file &#8220;BS2_joystick_rover.bs2&#8243; from my Downloads page or via <a href="http://www.yourwarrantyisvoid.com/downloads/files/BS2_joystick_rover.bs2" target="_blank">this direct link.</a> Load it up in your Basic Stamp Editor  as now we need to make some adjustments to it.  I&#8217;m pretty sure that your joystick will behave differently than mine will which is why my code won&#8217;t work out of the box.  Well let me rephrase that, the CODE will work, but the joystick calibration will be off.   Using the calibration application above, you can get the RCTIME values needed to make the servo speeds and the directions work properly.  Look at my speed chart below and you will get a better understanding how the BS2 rover works:</p>
<p style="text-align: center;"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/02/speed-chart.jpg"><img class="aligncenter size-full wp-image-390" title="speed chart - fear my awesome mspaint skillz..." src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/02/speed-chart.jpg" alt="speed chart" width="569" height="158" /></a></p>
<p>With this chart you can see at which points the BOE-BOT will change speeds.  You will need to make a similar chart for your joystick using the calibration program and then you can edit the BS2 Rover file and add those settings in the two GOSUB statements.  The DEADZONE is important as this is the point where your stick&#8217;s RCTIMEs will fall when no one is touching the joystick.  It is important to have a deadzone that matches your joystick to prevent your BOE-BOT from running away from you.</p>
<p>Something of note is that my chart starts at &#8220;1&#8243; and not &#8220;0&#8243;.  This is because if the VR is at minimum resistance RCTIME will still return a &#8220;1&#8243;.   The only time RCTIME will return a 0 is if there is no load for the capacitor to discharge to, for instance when the joystick is disconnected.  In the event that RCTIME does return a 0, then we will send out the same pulses as what we send out in our deadzone so that way our BOE-BOT does not move once the joystick is unplugged.</p>
<p>Here&#8217;s how the two subroutines work in a nutshell.  You start off with a pulse value of 200 and depending on where your RCTIME is, you will either add to it which makes the servo rotates one direction at one of three speeds or you will subtract from it which will make the servo rotate the other direction at one of three speeds.  Once the comparisons are done,  you add a constant value of 550 to the pulse value.  This pulse value will then get pulsed out to the servos and the wheel turns.</p>
<p>The reason 550 was selected was because 550+200 = 750 which is the point at which your servos do nothing. In the speed chart below, we can see how the offset affects the servo pulses and how each of the two items correspond with the speed levels:</p>
<p><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/02/speed-chart-w-servo-pulses.jpg"><img class="aligncenter size-full wp-image-392" title="speed chart with servo pulses" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/02/speed-chart-w-servo-pulses.jpg" alt="speed chart with servo pulses" width="709" height="254" /></a>So now that you understand the two subroutines, go ahead and edit them to match your joystick&#8217;s behavior and desired positions.</p>
<h2>Extra fun stuff</h2>
<p>Now that we have the complex part out of the way, we can also instruct the BOE-BOT to do something when we press the buttons on the joystick.  I have added a buzzer, a 220 ohm resistor and an LED to the last schematic so that now when we press the trigger button, the piezo buzzer will make a beep-beep sound and when you hit the thumb button, you will see the LED turn on and off.   Here is the updated schematic with our new parts. (Click on it for a full size image)</p>
<p><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/02/joystickschematic2.jpg"><img class="aligncenter size-medium wp-image-393" title="Joystick Schematic 2" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2010/02/joystickschematic2-300x264.jpg" alt="Joystick Schematic 2" width="300" height="264" /></a></p>
<p>Once you have made the needed changes to your code, there&#8217;s one last thing that needs to be done before you upload it to your BOE-BOT.  Check one last time and make sure everything is set properly, otherwise you might have unexpected results.  If all looks well, go ahead and upload then try it out.</p>
<p style="text-align: left;">Here is a video I made of my BOE-BOT in action.  For this test, I used a white ultrabright LED which produced a lot more light than the standard LEDs that came with the BOE-BOT.</p>
<p style="text-align: center;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/kZrFU7r2F74&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/kZrFU7r2F74&amp;hl=en_US&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>The &#8220;chugging&#8221; motion is normal.  This is the BOE-BOT, checking the RCTIME of X, pulsing out the X servo, checking RCTIME of Y, pulsing out the Y servo, checking the buttons then repeating itself.  Since the BOE-BOT is a single-process chip, it can only do one thing at a time otherwise the motion would be a lot smoother than it is.   If you are using the Propeller, you will get smoother action out of it by dedicating a COG to monitoring the joystick&#8217;s X and Y axes, and another COG to controlling the servos.</p>
<h2>Last words</h2>
<p>Using an analog joystick for your robotics projects can be an excellent way to bring an easy and intuitive interface for robot control into your project and I hope that this article shows you how easy it is to use.  It doesn&#8217;t take any fancy coding, expensive hardware or overkill designs, just some basic knowledge of how RCTIME works and a few bucks for the joystick. With a minimal part count, you can increase the flexibility of your robot&#8217;s design quite easily and you might even save yourself some programming headaches later on.</p>
<p>As always, thank you for reading.</p>
<p>FIRESTORM_v1</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yourwarrantyisvoid.com/2010/02/03/basic-stamp-a-quick-guide-on-using-a-legacy-joystick/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Using Clonezilla to make your HD bigger</title>
		<link>http://www.yourwarrantyisvoid.com/2009/12/29/using-clonezilla-to-make-your-hd-bigge/</link>
		<comments>http://www.yourwarrantyisvoid.com/2009/12/29/using-clonezilla-to-make-your-hd-bigge/#comments</comments>
		<pubDate>Tue, 29 Dec 2009 20:08:49 +0000</pubDate>
		<dc:creator>firestorm_v1</dc:creator>
				<category><![CDATA[How-To's]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[network boot]]></category>
		<category><![CDATA[PXE]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.yourwarrantyisvoid.com/?p=217</guid>
		<description><![CDATA[(Ok, innuendo aside&#8230;) Well, the Christmas/Yule break is over with and it&#8217;s time to get cracking.   If you were like me this holiday season, you were either placed in the position if needing to do a hard drive upgrade for someone else or you received a new hard drive of your own that warrants upgrading.  [...]]]></description>
			<content:encoded><![CDATA[<h1 style="text-align: center;">
<p style="text-align: center;"><img class="size-medium wp-image-273   aligncenter" title="HD upgrade" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/HD-upgrade-300x153.jpg" alt="HD upgrade" width="240" height="122" /></p>
</h1>
<p>(Ok, innuendo aside&#8230;)</p>
<p>Well, the Christmas/Yule break is over with and it&#8217;s time to get cracking.   If you were like me this holiday season, you were either placed in the position if needing to do a hard drive upgrade for someone else or you received a new hard drive of your own that warrants upgrading.  The CloneZilla site didn&#8217;t contain very clear instructions for what to do so I decided to write this howto documenting the process. In this howto, I will cover using the free application &#8220;CloneZilla&#8221; to perform a hard drive upgrade on a test installation of Windows XP from 4GB to a 10GB drive.</p>
<h3><span id="more-217"></span></h3>
<h3>Foreword:</h3>
<p>Of course, it&#8217;s Christmastime/Yule and I took pity on my girlfriend&#8217;s laptop which had two things going against it.  Firstly, it had vista and secondly it had a 80GB hard drive.  I&#8217;m not sure why Toshiba in their infinite wisdom only gave it a 80GB HD, but they did. Thankfully I had just completed an upgrade to another machine and had a 250GB hard drive to spare.  So I set out to upgrade her hard drive and fix at least one of the two reasons that her laptop was evil.</p>
<p>A lot of research turned up various solutions however none of them were very viable or were free.  Most of them required two hard drives in one computer and although her laptop did have the solder traces for the second SATA hard drive connector I&#8217;m not about to take a soldering iron to her laptop, she&#8217;d kill me.  So with that said and with my head still attached to my body, I kept searching.  I found a Live CD application called CloneZilla which had Cloning abilities much like a certain Symantic product but was free and didn&#8217;t require extensive configuration to get to work.  Unfortunately the instructions were not very clear at all and after spending a nailbiting hour trying to start the copy, I finally got it done and decided to document the process in case someone else got stuck in the same need that I did.</p>
<p>In this HOWTO, I will be upgrading a 4GB Virtual Disk in VMware with that of a 10GB Virtual disk.  Aside from the fact that it&#8217;s all virtualized, this is indeed a true upgrade and is exactly how you would do an upgrade for a real &#8220;physical&#8221; computer.</p>
<h3>Prerequisites</h3>
<p>You will need the following items for a successful transfer:</p>
<ol>
<li> The CloneZilla CD available from <a title="Clonezilla community site" href="http://clonezilla.org/" target="_blank">http://clonezilla.org/</a> I&#8217;m using Clonezilla Live version 1.2.2-31.</li>
<li>A Windows computer that has a hard drive with free space greater than the size of the original disk you are upgrading.  (If you&#8217;re upgrading a 40GB HD, then this machine must have at least 40GB free on it.) This will be the WIndows Image Server.</li>
<li>The hard drive to upgrade</li>
<li>A working network where your machine to upgrade can browse the other windows machine&#8217;s file shares. (This is CRITICAL, as the other machine will store your disk image for the upgrade.)</li>
<li>A case of beer, rum, vodka, etc&#8230;</li>
</ol>
<p>The &#8220;other machine&#8221; in #2 will be the image server.  This is where CloneCD will copy the files to that make up the disk image.  I will review how to set up a fileshare in Windows for this however any machine that does SMB filesharing can work.  There are other options available however SMB sharing works the easiest.</p>
<h3>Process Overview</h3>
<p>In this HOWTO, we will be upgrading a Windows XP Virtual Machine with a 4GB HD to a 10 GB HD.  Although I&#8217;m using VMware Server to capture the screenshots, this same method can be used to upgrade almost any home Windows computer.  I&#8217;m not sure if Windows 7 or if Windows Server 200* will work but in all theory they should too.  The process for upgrading will go something like this:</p>
<ol>
<li>Examine the existing system to upgrade and get existing disk size</li>
<li>Configure Windows Image Server to accomodate images</li>
<li>Boot system to upgrade with Clonezilla, configure and start copy process</li>
<li>Swap out hard drives, reboot with Clonezilla and configure to start the restore process</li>
<li>Take whatever OS steps are needed to take advantage of new space. (OS Dependent)</li>
</ol>
<h3>Step 1:  Examine the existing system</h3>
<p>This one&#8217;s easy.  Just fire up the existing machine and take a look at the hard drive.  In my example system, there&#8217;s only one hard drive.  All I did in this screenshot was open My Computer and Right Click on Local Disk C: then go to &#8220;Properties&#8221;:</p>
<div id="attachment_223" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/systoupgrade.jpg"><img class="size-medium wp-image-223" title="systoupgrade" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/systoupgrade-300x225.jpg" alt="Test system to upgrade" width="300" height="225" /></a><p class="wp-caption-text">Test system to upgrade</p></div>
<p>If a machine has more than one partition, you might need to go to Local Disk Managment (Start -&gt; Run -&gt; diskmgmt.msc ) Here&#8217;s a screenshot of what our test system looks like through Disk managment:</p>
<div id="attachment_224" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/systoupgrade2.jpg"><img class="size-medium wp-image-224" title="systoupgrade2" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/systoupgrade2-300x225.jpg" alt="System To Upgrade (Disk managment view)" width="300" height="225" /></a><p class="wp-caption-text">System To Upgrade (Disk managment view)</p></div>
<p>Based on this information and according to disk managment, the <strong>minimum</strong> free space we need on our windows image server will be 4GB.  I would recommend an extra GB just in case. Now that we know how big the disk is and how much space we need, let&#8217;s get the image server configured.</p>
<h3>Step 2:  Configuration of the Windows image server</h3>
<p>This section covers how to set up the Windows Image server for the new image.  We will need to create a new directory for the image files, create a new user on the server and then assign that user with full permissions to that directory over the network.</p>
<h4>Step 2a: Add the user</h4>
<p>Right click on the My Computer Icon and go to Manage</p>
<div id="attachment_218" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/manage.jpg"><img class="size-medium wp-image-218" title="Manage option in My computer Right click menu" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/manage-300x257.jpg" alt="" width="300" height="257" /></a><p class="wp-caption-text">&quot;Manage&quot; option in Rt Click menu, Easy way to get to users and Groups</p></div>
<p style="text-align: center;">
<p>This will bring up the Computer Managment Console.  Click on the &#8220;+&#8221; next to &#8220;Users and Groups&#8221;, then click on Users.  This will show you all of the currently installed users on the system and should resemble something like below:</p>
<div id="attachment_219" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/cmpmgmt.jpg"><img class="size-medium wp-image-219" title="cmpmgmt" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/cmpmgmt-300x213.jpg" alt="Users view in Computer Managment" width="300" height="213" /></a><p class="wp-caption-text">Users view in Computer Managment</p></div>
<p>Right click on the right side of the window and click on &#8220;New User&#8230;&#8221;</p>
<div id="attachment_220" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/newuser1.jpg"><img class="size-medium wp-image-220" title="Users and Groups Right Click Menu" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/newuser1-300x214.jpg" alt="Users and Groups Right Click Menu" width="300" height="214" /></a><p class="wp-caption-text">Users and Groups Right Click Menu</p></div>
<p style="text-align: left;">In the &#8220;New User&#8221; dialog box that pops up, you want to set the following options:  Username = clone Description = CloneZilla user&#8221;, Password = clone  &#8220;User Cannot Change Password&#8221; and &#8220;Password Never Expires&#8221; should both be checked. &#8220;Account Is Disabled&#8221; and &#8220;User Must Change password at next login&#8221; should be cleared (unchecked).  See below for the reference screenshot:</p>
<p style="text-align: left;">
<div id="attachment_221" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/newuser2.jpg"><img class="size-medium wp-image-221" title="newuser2" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/newuser2-300x214.jpg" alt="New User settings" width="300" height="214" /></a><p class="wp-caption-text">New User Settings</p></div>
<p>Click &#8220;Create&#8221; and then click &#8220;Close&#8221;.  You can see the new user in the screenshot below highlighted in a red box.</p>
<div id="attachment_222" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/newuser3.jpg"><img class="size-medium wp-image-222" title="newuser3" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/newuser3-300x214.jpg" alt="Our new Clone user" width="300" height="214" /></a><p class="wp-caption-text">Our new Clone user</p></div>
<h4>Step 2B: Configure the file share and add the user to the share.</h4>
<p>Now that we have the user in the system, we need to create the file share. In this case, I&#8217;m using a directory inside my &#8220;D:&#8221; drive to store the images.  <strong>MAKE SURE THAT WHERE YOU STORE YOUR IMAGES EXCEEDS THE CAPACITY OF THE DRIVE TO BE COPIED!</strong> In our case, we found that the system to upgrade is 4GB, so we need at least a 5GB disk to copy to.</p>
<p>Go ahead and locate a suitable place for your clone files.  In this case &#8220;D:&#8221; is completely blank except for the system files that Windows generates for partitions.  Right click and create a new folder called &#8220;clone&#8221;</p>
<div id="attachment_225" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonedir.jpg"><img class="size-medium wp-image-225" title="clonedir" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonedir-300x240.jpg" alt="My clone directory" width="300" height="240" /></a><p class="wp-caption-text">My clone directory</p></div>
<p>Right click on the clone folder and go to &#8220;Sharing and Security&#8221;.  Fill out the form and name the share &#8220;Clone&#8221; however don&#8217;t click OK just yet.</p>
<div id="attachment_226" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonedir2.jpg"><img class="size-medium wp-image-226" title="clonedir2" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonedir2-300x257.jpg" alt="clone directory sharing properties" width="300" height="257" /></a><p class="wp-caption-text">clone directory sharing properties</p></div>
<p>We need to make sure that the &#8220;clone&#8221; user we created earlier has full access permissions to this directory.  Click on &#8220;Permissions&#8221; and add the &#8220;clone&#8221; user to the directory with full permissions.To do this, click &#8220;Add&#8221; on the Permissions screen, type in &#8220;clone&#8221;, type in &#8220;Check Names&#8221;, then hit OK.  In my case, it added &#8220;ZEUS\clone&#8221; which is still correct.  ZEUS is the name of the image server.</p>
<div id="attachment_227" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonedir3.jpg"><img class="size-medium wp-image-227" title="clonedir3" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonedir3-300x241.jpg" alt="Adding Clone to sharing permissions" width="300" height="241" /></a><p class="wp-caption-text">Adding clone to sharing permissions</p></div>
<p>Now, I have &#8220;clone&#8221; added to the permissions window and set the proper access permissions for that username as shown below.  Go ahead and click OK to the Permissions window and to the sharing properties window.</p>
<div id="attachment_228" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonedir4.jpg"><img class="size-medium wp-image-228" title="clonedir4" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonedir4-300x254.jpg" alt="Permissions are set" width="300" height="254" /></a><p class="wp-caption-text">Permissions are set</p></div>
<p>If all works well, you should see a &#8220;waiter&#8217;s hand&#8221; appear below the directory icon.  This hand icon shows that this directory is shared across the network and is available for access be it read-only or read/write.  At this point, we are done with configuring the server.  We&#8217;ve added the &#8220;clone&#8221; user to the server, added a suitable &#8220;clone&#8221; directory for Clonezilla to store and retrieve the disk image&#8217;s files from and we have added proper permissions to the directory for the clone user.</p>
<h4>Step 2c:  Test it out!</h4>
<p>Go back to our initial machine to upgrade.  You should be able to find your image server by browsing &#8220;My Network Places&#8221;.  In my case, the image server was named &#8220;zeus&#8221; and showed up only after I clicked on &#8220;View Workgroup Computers&#8221; as shown in this screenshot.  You should get a similar password prompt when you try to access your image server:</p>
<div id="attachment_229" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonetest.jpg"><img class="size-medium wp-image-229" title="clonetest" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonetest-300x225.jpg" alt="Clone share testing" width="300" height="225" /></a><p class="wp-caption-text">Clone share testing</p></div>
<p>Login with the user credentials we created in 2A, (username and password of &#8220;clone&#8221;) and you should be presented with a directory listing like the one shown below:</p>
<div id="attachment_230" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonetest2.jpg"><img class="size-medium wp-image-230" title="clonetest2" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonetest2-300x225.jpg" alt="directory listing " width="300" height="225" /></a><p class="wp-caption-text">directory listing</p></div>
<p>We have proven that our clone user works, but let&#8217;s test to make sure that we can write to it.  Double click on the clone share and try to create a text file.  (Right Click -&gt; New -&gt; Text File)  If it creates a &#8220;New Text File.txt&#8221; like shown below, this means that your permissions are correct and you&#8217;re good to go.  If you get any kind of read/write error, check your permissions on the image server.</p>
<div id="attachment_231" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonetest3.jpg"><img class="size-medium wp-image-231" title="clonetest3" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonetest3-300x225.jpg" alt="Write test for clone user" width="300" height="225" /></a><p class="wp-caption-text">Write test for clone user</p></div>
<p>If you&#8217;ve gotten this far, then congratulations, you&#8217;re ready to do the copy.  Go ahead and shut down the system you&#8217;re upgrading and get ready for the next step:</p>
<h3>Step 3:  Boot system to upgrade with Clonezilla, configure and start copy process</h3>
<p>Go ahead and boot the upgrade system with the CloneZilla CD. You will be presented with a boot menu like the one below. Go ahead and select the first menu option &#8220;Clonezilla live (Default Settings, VGA 1024&#215;768)&#8221;:</p>
<div id="attachment_232" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/Clonezilla.jpg"><img class="size-medium wp-image-232" title="Clonezilla" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/Clonezilla-300x225.jpg" alt="Clonezilla boot menu" width="300" height="225" /></a><p class="wp-caption-text">Clonezilla Boot Menu</p></div>
<p>It will then take a bit and flash a lot of linux based stuff at you.  Finally you should be directed to choose a language.  The prompt should look like this now:</p>
<div id="attachment_233" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla1.jpg"><img class="size-medium wp-image-233" title="clonezilla1" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla1-300x225.jpg" alt="Choose a language menu" width="300" height="225" /></a><p class="wp-caption-text">Choose a language menu</p></div>
<p>You will then get a prompt about keymaps.  When in doubt, just leave it alone.</p>
<div id="attachment_234" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla2.jpg"><img class="size-medium wp-image-234" title="clonezilla2" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla2-300x225.jpg" alt="Keymap prompt" width="300" height="225" /></a><p class="wp-caption-text">Keymap prompt</p></div>
<p>More console stuff will flash past and then you&#8217;ll get the prompt you&#8217;ve been waiting for.  Unless you&#8217;re very very advanced, you will only use the &#8220;Start Clonezilla&#8221; menu option:</p>
<div id="attachment_235" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla3.jpg"><img class="size-medium wp-image-235" title="clonezilla3" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla3-300x225.jpg" alt="Start Clonezilla" width="300" height="225" /></a><p class="wp-caption-text">Start Clonezilla</p></div>
<p>Now we&#8217;re at a screen that is really confusing.  We want to work with the disks but we also want to work with images to create partitions.  In this instance, we&#8217;re going from the disk to an image file on our windows image server then back to disk again.  In our instance, we will need to use option 1, Device-Image.</p>
<div id="attachment_236" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla4.jpg"><img class="size-medium wp-image-236" title="clonezilla4" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla4-300x225.jpg" alt="Image/Disk option menu" width="300" height="225" /></a><p class="wp-caption-text">Image/Disk option menu</p></div>
<p>In this screen, it&#8217;s asking where are we storing the image.  The answer is &#8220;samba/Network Neighborhood server&#8221; however if we needed to, we could use a local SSH server as well.</p>
<div id="attachment_237" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla5.jpg"><img class="size-medium wp-image-237" title="clonezilla5" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla5-300x225.jpg" alt="Image Server Type dialog" width="300" height="225" /></a><p class="wp-caption-text">Image Server Type dialog</p></div>
<p>Now it&#8217;s asking how we connect to our network.  99% of the time this will be &#8220;dhcp&#8221; as you will know if you&#8217;re using static for anything.  If you have a Linksys router or similar router/firewall device, select DHCP.</p>
<div id="attachment_238" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla6.jpg"><img class="size-medium wp-image-238" title="clonezilla6" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla6-300x225.jpg" alt="network type dialog" width="300" height="225" /></a><p class="wp-caption-text">network type dialog</p></div>
<p>After you get a successful IP address, CloneZilla needs to know what IP address your windows image server is.  In my example, the windows image server (zeus) is 192.168.0.5.</p>
<div id="attachment_239" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla7.jpg"><img class="size-medium wp-image-239" title="clonezilla7" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla7-300x225.jpg" alt="IP address dialog" width="300" height="225" /></a><p class="wp-caption-text">IP address dialog</p></div>
<p>Next, Clonezilla needs to ask for the Domain.  If you are not using a domain, then tab to &#8220;Cancel&#8221; and hit Enter.  I&#8217;m not using a domain here, so I just hit Cancel.  This is reserved for corporate networks that use a special server called a Domain Controller.</p>
<div id="attachment_240" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla8.jpg"><img class="size-medium wp-image-240" title="clonezilla8" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla8-300x225.jpg" alt="Domain prompt" width="300" height="225" /></a><p class="wp-caption-text">Domain prompt</p></div>
<p>Now Clonezilla needs to know the username of the account to connect to the server.  This will be the username and password you created in Step 2 above.  For our test, we put clone as the username</p>
<div id="attachment_241" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla9.jpg"><img class="size-medium wp-image-241" title="clonezilla9" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla9-300x225.jpg" alt="user prompt" width="300" height="225" /></a><p class="wp-caption-text">user prompt</p></div>
<p>Clonezilla prompts us for the location (the share name) of where to put the images.  In the steps above, we used &#8220;clone&#8221; as the share name.  This is the location we give to Clonezilla so it can store its images. <strong>Be sure to leave the leading / at the beginning of the directory name</strong>.</p>
<div id="attachment_242" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla10.jpg"><img class="size-medium wp-image-242" title="clonezilla10" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla10-300x225.jpg" alt="directory name for images" width="300" height="225" /></a><p class="wp-caption-text">directory name for images</p></div>
<p>Next, it&#8217;s time for the password.  When prompted, type in the password.  Although this prompt looks different than the others, this is not a sign that something has gone wrong so relax.</p>
<div id="attachment_243" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla11.jpg"><img class="size-medium wp-image-243" title="clonezilla11" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla11-300x225.jpg" alt="password dialog" width="300" height="225" /></a><p class="wp-caption-text">password dialog</p></div>
<p>If all of the information you entered was correct, you will get a filesystem mount listing similar to what is shown here.  If something went wrong, you&#8217;ll get an error message outlining the possible error and a chance to re-enter the information.  If it doesn&#8217;t give you the option to reenter or something isn&#8217;t right, just hit the power switch..  In this screenshot, you can see that the last line starting with //192.168.0.5&#8230;&#8230;  is our image server and that it is mounted correctly!</p>
<div id="attachment_244" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla12.jpg"><img class="size-medium wp-image-244" title="clonezilla12" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla12-300x225.jpg" alt="" width="300" height="225" /></a><p class="wp-caption-text">mount listing</p></div>
<p style="text-align: left;">Since we have successfully mounted our image storage as part of the liveCD&#8217;s filesystem, it&#8217;s time to start the copy.  You will be prompted for which mode to run Clonezilla in.  I recommend the &#8220;Beginner&#8221; method as it makes the entire copy easy.</p>
<div id="attachment_245" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla13.jpg"><img class="size-medium wp-image-245" title="clonezilla13" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla13-300x225.jpg" alt="Mode select dialog" width="300" height="225" /></a><p class="wp-caption-text">Mode select dialog</p></div>
<p>Now we are prompted on what to do.  We will start off by selecting the first option &#8220;savedisk&#8221; as we want to save the existing disk to the image server.  We will use &#8220;restoredisk&#8221;  later.</p>
<div id="attachment_246" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla14.jpg"><img class="size-medium wp-image-246" title="clonezilla14" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla14-300x225.jpg" alt="Function select" width="300" height="225" /></a><p class="wp-caption-text">Function Select</p></div>
<p>If you are wanting to manage multiple images, you have the option to name them with something more descriptive .  For now, I selected the default name which is in YYYY-MM-DD-HH format.</p>
<div id="attachment_247" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla15.jpg"><img class="size-medium wp-image-247" title="clonezilla15" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla15-300x225.jpg" alt="Image Name Select prompt" width="300" height="225" /></a><p class="wp-caption-text">Image Name Select prompt</p></div>
<p>Now we tell CloneCD which hard drive to copy.  In most systems, there will only be one hard drive, however make sure you have the right one if not.  You can select and deselect by using the space bar to toggle the asterisk.  An asterisk in the brackets &#8220;[*]&#8221; means that the item is selected however the brackets alone &#8220;[ ]&#8221; means the item is deselected.</p>
<div id="attachment_248" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla16.jpg"><img class="size-medium wp-image-248" title="clonezilla16" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla16-300x225.jpg" alt="Drive Select prompt" width="300" height="225" /></a><p class="wp-caption-text">Drive Select prompt</p></div>
<p>One last word from Clonezilla before it starts copying.  If we wanted to run in console mode (which I will never do. <img src='http://www.yourwarrantyisvoid.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  ) we could do it all with one command.  Just hit enter to get past this prompt and start the copying.   This also tells us that it has successfully found and identified the drive we selected to copy and shut down Linux&#8217;s logical volume manager to allow direct access to the disk to copy.</p>
<div id="attachment_249" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla17.jpg"><img class="size-medium wp-image-249" title="clonezilla17" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla17-300x225.jpg" alt="Pre-copy ready" width="300" height="225" /></a><p class="wp-caption-text">Pre-copy ready</p></div>
<p>One last final confirmation that the information we have entered is correct.  Remember that making this image does NOT make any filesystem changes to the original hard drive and in fact, no changes to the original hard drive are ever made.  This is especially good in case you need to revert your upgrade, you can just swap out hard drives and you&#8217;re back where you started from.  If everything is correct in the yellow text, go ahead and type &#8220;Y&#8221; and hit enter.  This will start the copy process.</p>
<div id="attachment_250" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla18.jpg"><img class="size-medium wp-image-250" title="clonezilla18" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla18-300x225.jpg" alt="confirmation prompt" width="300" height="225" /></a><p class="wp-caption-text">confirmation prompt</p></div>
<p>Finally, the copy begins.  Go ahead and grab a soda, watch a movie or something as this will take a considerable amount of time depending on the size of your hard drive.  In my test example transferring a 4GB hard drive, it took roughly 16 minutes to complete.  My girlfriend&#8217;s 80GB hard drive took several hours to copy.</p>
<div id="attachment_252" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla19.jpg"><img class="size-medium wp-image-252" title="clonezilla19" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla19-300x225.jpg" alt="copy started" width="300" height="225" /></a><p class="wp-caption-text">Copy Started</p></div>
<p>At last, the file copy is complete and we are ready to exit Clonezilla:</p>
<div id="attachment_253" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla20.jpg"><img class="size-medium wp-image-253" title="clonezilla20" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla20-300x225.jpg" alt="copy complete" width="300" height="225" /></a><p class="wp-caption-text">Copy complete.</p></div>
<p>Hit &#8220;Enter&#8221; then hit 0 for power off.  After a few seconds, you will get the message &#8220;Please remove the disc, close the tray (if any) and press Enter to continue. Hit enter and your computer should now turn off.  Go ahead and perform the drive swap now. We&#8217;re halfway there!</p>
<h3>Step 4:  Swap out hard drives, reboot with Clonezilla and configure to start the restore process</h3>
<p>Before continuing, you want to make sure that your hard drive is recognized by the BIOS.  In my test setup, I have swapped out the original 4GB VMware disk with a 10GB Vmware disk and it is displayed in the BIOS here:</p>
<div id="attachment_254" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla21.jpg"><img class="size-medium wp-image-254" title="clonezilla21" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla21-300x225.jpg" alt="BIOS showing new hard drive" width="300" height="225" /></a><p class="wp-caption-text">BIOS showing new hard drive</p></div>
<p>Just like before, we will use the same options to create the disk image to restore the disk image.    Use all of the instructions in step 2 all the way until you get to the Mode screen shown below.  Instead of selecting &#8220;savedisk&#8221; like we did at the last screen, we want to use &#8220;restoredisk&#8221; instead.</p>
<div id="attachment_255" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla22.jpg"><img class="size-medium wp-image-255" title="clonezilla22" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla22-300x225.jpg" alt="Select Mode dialog, revisited" width="300" height="225" /></a><p class="wp-caption-text">Select Mode dialog, revisited</p></div>
<p>Now we select the image to restore to disk. Since we only have one image listed, this is the one we use.</p>
<div id="attachment_256" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla23.jpg"><img class="size-medium wp-image-256" title="clonezilla23" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla23-300x225.jpg" alt="Select Image dialog" width="300" height="225" /></a><p class="wp-caption-text">Select Image dialog</p></div>
<p>Once we have selected a viable image, now we are prompted to select the target device.  Again, it&#8217;s the only hard drive, so it&#8217;s the device we want:</p>
<div id="attachment_257" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla24.jpg"><img class="size-medium wp-image-257" title="clonezilla24" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla24-300x225.jpg" alt="Select Target dialog" width="300" height="225" /></a><p class="wp-caption-text">Select Target dialog</p></div>
<p>Just like before, it will tell us that we can rerun this restore using a single command from command mode:</p>
<div id="attachment_258" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla25.jpg"><img class="size-medium wp-image-258" title="clonezilla25" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla25-300x225.jpg" alt="clone command line " width="300" height="225" /></a><p class="wp-caption-text">clone command line</p></div>
<p>This time, the warning needs to be read.  This is just prior to performing any filesystem changes to the new hard drive.   If you are absolutely sure, go ahead and answer &#8220;y&#8221; to start the restore process:</p>
<div id="attachment_259" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla26.jpg"><img class="size-medium wp-image-259" title="clonezilla26" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla26-300x225.jpg" alt="restore confirmation text" width="300" height="225" /></a><p class="wp-caption-text">restore confirmation text</p></div>
<p>One last time, it asks to make sure you are sure about your restore decision.  If everything is correct, answer &#8220;Y&#8221;.</p>
<div id="attachment_260" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla27.jpg"><img class="size-medium wp-image-260" title="clonezilla27" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clonezilla27-300x225.jpg" alt="Final restore prompt" width="300" height="225" /></a><p class="wp-caption-text">Final restore prompt</p></div>
<p>A good bit of text will go across the screen and you will ultimately end up at a partclone screen like the one below.  The text that you saw earlier is the partition application creating the destination partition for the image.  Once created, partclone takes over and starts restoring the data from the image. Again, grab another drink, (I&#8217;ve got a margarita) and wait a few hours for the image to restore.</p>
<div id="attachment_261" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clone28.jpg"><img class="size-medium wp-image-261" title="clone28" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clone28-300x225.jpg" alt="Partition restore in progress" width="300" height="225" /></a><p class="wp-caption-text">Partition restore in progress</p></div>
<p>Once the restore process completes, you will be prompted to power off.  Hit Enter, select option 1 and remove the CD from the CDROM tray when prompted.</p>
<div id="attachment_262" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clone29.jpg"><img class="size-medium wp-image-262" title="clone29" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clone29-300x225.jpg" alt="restore completed" width="300" height="225" /></a><p class="wp-caption-text">restore completed</p></div>
<p>Once the system reboots, it should automatically start Windows.  If it does, you&#8217;re ready to go to the last step!</p>
<h3>Step 5: Take whatever OS steps are needed to take advantage of new space. (OS Dependent)</h3>
<p>Now these steps depend on which OS you&#8217;re using. At this point, we have made an image of the old drive, saved that image to another server and restored it to a new blank drive that is larger than the original image.  As shown earlier, we have a 10GB disk in our machine to upgrade and we have just restored our 4GB image to it. We have successfully booted windows however our disk properties show that the disk image is still 4GB.  (Ignore the disk space used, as I was shutting down the disk image it decided to install 50 windows updates&#8230;)</p>
<div id="attachment_263" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clone30.jpg"><img class="size-medium wp-image-263" title="clone30" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clone30-300x225.jpg" alt="Disk space still the same?" width="300" height="225" /></a><p class="wp-caption-text">Disk space still the same?</p></div>
<p>Here is the same shot of the disk managment window after the upgrade/restore.  You can see that it is a 10GB drive, but is still a 4GB partition.</p>
<div id="attachment_264" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clone31.jpg"><img class="size-medium wp-image-264" title="clone31" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clone31-300x225.jpg" alt="disk managment" width="300" height="225" /></a><p class="wp-caption-text">disk managment</p></div>
<p><span style="text-decoration: underline;"><strong>Attention Vista Users!!:</strong></span> If you are running Windows Vista, you can use Disk Managment to expand the disk size.  All you have to do is right click on the C: partition shown above then go to &#8220;Expand Disk&#8221;.  This will walk you through the process for expanding the disk to take up the entire space of your new drive.  I&#8217;ll add new instructions to this as soon as my girlfriend lets me use her laptop again.</p>
<p>For those of you not running Vista, keep reading. At this point, we have validated that our restored image works properly.  Now all we need to do is resize the partition to take up the entire disk.  Thankfully clonezilla has a solution for that.  Reboot using the CloneZilla CD. Answer the same questions regarding keymap like you did before except instead of starting clonezilla, we want to enter the Clonezilla shell.</p>
<div id="attachment_265" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clone32.jpg"><img class="size-medium wp-image-265" title="clone32" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clone32-300x225.jpg" alt="Go to Clonezilla shell" width="300" height="225" /></a><p class="wp-caption-text">Go to Clonezilla shell</p></div>
<p>You will get dropped to a text prompt that presents you with several options.  You will want to select option 2, &#8220;Enter Command Line Prompt&#8221;.  Once done, you will be at a user@debian prompt as shown here:</p>
<div id="attachment_266" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clone33.jpg"><img class="size-medium wp-image-266" title="clone33" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clone33-300x225.jpg" alt="command prompt" width="300" height="225" /></a><p class="wp-caption-text">command prompt</p></div>
<p>We are going to use the utility &#8220;ntfsresize&#8221; in order to increase the size of the partition that we restored to the new disk but first we need more information.  Before we get started, run the command &#8220;<strong>su -</strong>&#8221; to get to the &#8220;root&#8221; user. This will allow us to modify the drive&#8217;s layout.    At the above menu prompt, hit the digit <strong>2</strong> for &#8220;<strong>Enter command line prompt</strong>&#8221; and then type &#8220;<strong>su -</strong>&#8221; at the &#8220;<strong>user@debian ~$</strong>&#8221; prompt.  The screen should then look like the screen below.</p>
<div id="attachment_432" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/cz-root.jpg"><img class="size-medium wp-image-432" title="SU to root" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/cz-root-300x225.jpg" alt="SU to root" width="300" height="225" /></a><p class="wp-caption-text">SU to root</p></div>
<p>Then we will use &#8220;fdisk&#8221; to get the disk&#8217;s full size.  I ran the command &#8220;<strong>fdisk -l /dev/hda</strong>&#8221; to get the drive size:</p>
<div id="attachment_267" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clone34.jpg"><img class="size-medium wp-image-267" title="clone34" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clone34-300x225.jpg" alt="fdisk disk size" width="300" height="225" /></a><p class="wp-caption-text">fdisk disk size</p></div>
<p>This is important as we are going to <strong>delete</strong> the partition, then <strong>recreate</strong> the partition.  First off let&#8217;s run &#8220;<strong>fdisk /dev/hda</strong>&#8221; and use &#8220;p&#8221; to get the partition size.  In this screen, we see that the partition starts at 1 and ends at 521.  We want it to extend to the rest of the disk.  We&#8217;ll start off by using &#8220;d&#8221; to delete the partition, (FDISK will assume partition 1) and then create a New partition using the defaults as shown below (Use the commands &#8220;N&#8221; for New partition, &#8220;P&#8221; for primary partition, and give it partition number 1).  Once we have created the new partition, we will need to set the &#8220;System&#8221; back to HPFS/NTFS otherwise NTFSresize won&#8217;t work properly.  Below is the FDISK responses to these commands we&#8217;ve used so far.</p>
<div id="attachment_268" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clone35.jpg"><img class="size-medium wp-image-268" title="clone35" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clone35-300x225.jpg" alt="FDISk resizing" width="300" height="225" /></a><p class="wp-caption-text">FDISK resizing</p></div>
<p>Now that we&#8217;ve create the new partition, we have to reset it&#8217;s type.  Use the &#8220;t&#8221; command and set it to ID of 7 (HPFS/NTFS) and then use &#8220;a&#8221; to toggle it&#8217;s bootable state.  We want to be able to boot into Windows after all.  Use the &#8220;w&#8221; command to write the partition data to the hard drive and exit.  Now that we have reset the partition size, we can use NTFSResize to expand the NTFS data.  Cross your fingers and run &#8220;<strong>ntfsresize /dev/hda</strong>&#8221; and it should produce output like what is shown here.  When run with no additional parameters, NTFSResize should automatically find the beginning and the end of the partition and expand the existing NTFS data to take the entire drive as shown:</p>
<div id="attachment_269" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clone36.jpg"><img class="size-medium wp-image-269" title="clone36" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clone36-300x225.jpg" alt="NTFSResize" width="300" height="225" /></a><p class="wp-caption-text">NTFSResize</p></div>
<p>With our newly resized partition we should be able to reboot and get into our Windows environment.  To do that, just type &#8220;<strong>reboot</strong>&#8221; and remove the CD when prompted.  <span style="text-decoration: underline;"><strong>Note:</strong></span> The above screenshot missed me using the &#8220;a&#8221; and &#8220;w&#8221; commands to toggle bootable status.  Here&#8217;s what it looks like:</p>
<div id="attachment_270" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clone37.jpg"><img class="size-medium wp-image-270" title="clone37" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clone37-300x225.jpg" alt="Bootable flag now set" width="300" height="225" /></a><p class="wp-caption-text">Bootable flag now set, sorry guys. <img src='http://www.yourwarrantyisvoid.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p></div>
<p>Ok, so now that I have fixed my grievous error, it&#8217;s time to reboot.  With any luck, your computer will boot Windows and go staight into a chkdsk environment.  <span style="text-decoration: underline;"><strong>THIS IS OK!</strong></span>, this means that Windows sees the new partition size and that it needs to run a consistency check.  DO NOT PANIC!!!  Let the consistency check run, then it will reboot your computer again.  After it boots for the second time, it might prompt to restart because it found new hardware (the new HD).  This is OK as well.  Let the windows installation reboot.  Once it has completed rebooting for the third time,  get your disk properties by right clicking on C: drive and going to Properties.  As shown below, we have successfully resized our partition to take up the entire drive and are now sitting at 10GB (well 9.99GB according to windows.):</p>
<div id="attachment_271" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clone38.jpg"><img class="size-medium wp-image-271" title="clone38" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clone38-300x225.jpg" alt="Windows XP's new filesize" width="300" height="225" /></a><p class="wp-caption-text">Windows XP&#39;s new filesize</p></div>
<p>Here is a screenshot from Windows XP&#8217;s Disk managment to show that we used the entire drive:</p>
<div id="attachment_272" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clone39.jpg"><img class="size-medium wp-image-272" title="clone39" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/12/clone39-300x225.jpg" alt="Disk managment with new partition sizes" width="300" height="225" /></a><p class="wp-caption-text">Disk managment with new partition sizes</p></div>
<p>At this point, we have successfully finished the migration!  Here&#8217;s a rundown of what all we did in this step:</p>
<ol>
<li>We restored the partition to the new drive</li>
<li>We verified that the restore worked properly when booted into, e.g windows booted properly and without errors.</li>
<li>We then deleted the existing partition, recreated a new partition and then set the partition type and bootable flag using Linux&#8217;s FDISK on the Clonezilla CD.</li>
<li>We used NTFSResize to expand the NTFS data to take up the entire new resized partition.</li>
<li>We then booted into Windows and let it do a filesystem check</li>
<li>When Windows was restarted again, we validated through Properties and &#8220;Disk Management&#8221; that the new disk was used fully.</li>
</ol>
<p>This was the most complex part of the migration as CloneZilla only goes about 90% of the way to migrating to a new, larger hard drive.  I hope that this howto provides the last 10% that you are looking for.  With this howto and a copy of CloneZilla, you can then upgrade almost ANY hard drive that Linux supports and can even go from IDE to SATA or SATA to IDE if need be.</p>
<h3>Afterword:</h3>
<p>I sincerely hope that this helps someone out there trying to make sense of a hard drive upgrade.  I know that I learned a lot about partitions and filesystem structures by attempting an upgrade of my girlfriend&#8217;s laptop and this Windows XP installation.  I know that working with partitions is a scary thing as you could potentially lose data but keep in mind that your &#8220;original&#8221; hard drive still has all the original data on it, as does the image that was stored on the windows image server.</p>
<p>The items in this howto can potentially be a life saver especially if you have a family member that keeps messing their computer up.  You could create an image after you have performed all needed windows updates and software installations and then retain it for if something goes wrong.  Rather than having to manually do an OS reload, you can run though this HOWTO in an hour and have their system up and running again, fully patched and ready to go.</p>
<p>I hope that you had a great Christmas/Yule  with your family and look forward to keep going strong in 2010.  As always, thank you for your continued patronage, you are always welcome here at YourWarrantyIsVoid.com!</p>
<p>FIRESTORM_v1</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yourwarrantyisvoid.com/2009/12/29/using-clonezilla-to-make-your-hd-bigge/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Breaking into APC&#8217;s BR24BP battery pack</title>
		<link>http://www.yourwarrantyisvoid.com/2009/10/27/breaking-into-apcs-br24bp-battery-pack/</link>
		<comments>http://www.yourwarrantyisvoid.com/2009/10/27/breaking-into-apcs-br24bp-battery-pack/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 10:24:18 +0000</pubDate>
		<dc:creator>firestorm_v1</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[How-To's]]></category>
		<category><![CDATA[Investigative Dissassembly]]></category>
		<category><![CDATA[APC]]></category>
		<category><![CDATA[Battery Pack]]></category>
		<category><![CDATA[UPS]]></category>

		<guid isPermaLink="false">http://www.yourwarrantyisvoid.com/?p=126</guid>
		<description><![CDATA[In this post, we will show what was necessary on how to get access into the BR24BP battery pack for APC&#8217;s BackUPS RS/XS series of battery backups.  Read more for additional details, caveats and some good to know general informaton on how you can replace the stock batteries in the battery pack with your own [...]]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-127" title="apcLogo_141x68.jpg" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/10/apcLogo_141x68.jpg.gif" alt="apcLogo_141x68.jpg" width="141" height="68" />In this post, we will show what was necessary on how to get access into the BR24BP battery pack for APC&#8217;s BackUPS RS/XS series of battery backups.  Read more for additional details, caveats and some good to know general informaton on how you can replace the stock batteries in the battery pack with your own batteries to save money and time.</p>
<p><span id="more-126"></span></p>
<p><strong>BIG MONSTEROUS LEGAL DISCLAIMER:</strong> This information is provided as anecdotal as-is information. It is recommended when working with electronic components to replace the defective component with a component of the same type, model and rating.  Battery backups are no exception to this rule and as such we recommend that you follow the exact ratings as specified on your UPS, even if they differ from the information on this site.  When in doubt, go with a 1-to-1 replacement, or better yet, purchase a replacement battery pack from APC directly.  By following the steps in this guide, you indicate that you can not sue firestorm_v1 or those of us at YourWarrantyIsVoid.Com if you burn your eyebrows off or cause damage to loved ones or property, etc..</p>
<p>Now that the legalese is done with, let&#8217;s talk about this a bit.</p>
<p><strong>Foreward:</strong></p>
<p>Ever since the dawn of time, or at least the dawn of the computer age, mankind has been faced with one monsterous problem:  How to keep the computer running when the power goes out.  Even in the 21st century, we are still not immune to the power failures, surges and brownout/blackouts that plague our planet&#8217;s power grid.  The solution was to use uninterruptable power supplies (UPSes) also commonly called &#8220;battery backups&#8221; to keep the juice flowing, even though the power from the electric company had ceased.  The idea was that power would be stored in batteries and would be used through specialized circuitry to recreate the line voltage that our beloved machines needed to operate.  The idea was a grand saviour to the information age  and since then have saved countless months of uptime loss, unavailability and other such lack of availability.</p>
<p>However, with every great solution is a thorn in its side.  In our case with the batttery backups, the thorn is the batteries.  Every now and then, through regular use and standby charging, it becomes necessary to change them out.  Usually this cost is a lot less than just buying another battery backup and is a preferred method to keeping old but still usable UPSes out of the trash can. In my specific case, I have an <a title="APC Battery Back-UPS XS 1500" href="http://www.apcc.com/resource/include/techspec_index.cfm?base_sku=BX1500" target="_blank">APC Battery Back-UPS XS 1500</a> and it has served me extremely well through the years.  Unfortunately an extended power failure had knocked it and the <a title="BR24BP battery pack" href="http://www.apcc.com/resource/include/techspec_index.cfm?base_sku=Br24bp" target="_blank">addon battery pack, BR24BP</a> out of comission and had rendered the UPS useless.</p>
<p><strong>Initial examination:</strong></p>
<p>Pior to just ripping the face place off of anything, even if it pisses me off, I perform a good bit of research using Google and Yahoo to attempt to find disassembly instructions for something.  In the case of the battery backup&#8217;s battery pack, I had nothing but a bunch of forum posts with people looking for the same details.  Unfortunately no solution was to be had so I started investigating on my own and was ultimately successful.  This writeup is a testament to those findings and a howto for anyone that was as lost as I was with trying to find a way in.</p>
<div id="attachment_129" class="wp-caption aligncenter" style="width: 514px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/10/IMG_06291.JPG"><img class="size-full wp-image-129" title="BR24BP side vew" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/10/IMG_06291.JPG" alt="BR24BP battery pack side view" width="504" height="336" /></a><p class="wp-caption-text">BR24BP side vew</p></div>
<p style="text-align: center;">
<p style="text-align: left;">
<p style="text-align: left;">This is a shot of the BR24BP in all it&#8217;s glory.  Despite it&#8217;s innocent looking exterior, it&#8217;s a mofo to get into.  With no visible way of getting in, I set out with my metal screwdrivers and started prying like a madman.  Eventually, I was able to get the white front cover off and the secret to this beast was unlocked.</p>
<div id="attachment_130" class="wp-caption aligncenter" style="width: 514px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/10/IMG_0613.JPG"><img class="size-full wp-image-130" title="Front cover finally off" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/10/IMG_0613.JPG" alt="Front panel finally off" width="504" height="336" /></a><p class="wp-caption-text">Front cover finally off</p></div>
<p style="text-align: center;">
<p style="text-align: left;">(The grey piece on the back was held together much in the same fashion, pardon editor&#8217;s fault for the back showing ajar. <img src='http://www.yourwarrantyisvoid.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  )  In this shot, we learn something important.  The front is not held on by any fancy method, locking mechanism or other trickery.  It is held to the front of the battery backup by means of a pair of snaps.  One at the top of the cover pointing down, and one at the bottom cover pointing up.  It would be almost trivial to modify the case so that you could get into the battery box at some point again to do a second swap out fo the batteries.</p>
<div id="attachment_131" class="wp-caption aligncenter" style="width: 514px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/10/IMG_0614.JPG"><img class="size-full wp-image-131" title="Back of front cover." src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/10/IMG_0614.JPG" alt="Back of front cover. The back is identical except it's grey and has a hole fro the power cord." width="504" height="336" /></a><p class="wp-caption-text">Back of front cover</p></div>
<p style="text-align: center;">
<p style="text-align: center;">
<p style="text-align: left;">Here is a shot of the front cover.  The back cover is identical to this except it is grey and has a hole for the power cable to go through.  It could be theorized that the ends of the snaps are sliced to prevent from someone gaining access to the innards of the battery box.  It could also be theorized that a quick session with a Dremel could prodice a hole with which to pry up on the snaps to gain access in the future without having to pry the case open like your life depended on it.</p>
<div id="attachment_132" class="wp-caption aligncenter" style="width: 514px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/10/IMG_0615.JPG"><img class="size-full wp-image-132" title="Back cover pried off" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/10/IMG_0615.JPG" alt="Back cover pried off" width="504" height="336" /></a><p class="wp-caption-text">Back cover pried off</p></div>
<p style="text-align: center;">
<p style="text-align: left;">This is a shot of the rear cover after being pried off.  The thin holes at the top and the bottom are the holes for the snaps.  Once finally freed of both the front and the rear faceplates, we are left with the battery box and six phillips screws from victory.</p>
<div id="attachment_133" class="wp-caption aligncenter" style="width: 514px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/10/IMG_0616.JPG"><img class="size-full wp-image-133" title="battery pack sans front/back covers" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/10/IMG_0616.JPG" alt="Battery pack sans front/back covers" width="504" height="336" /></a><p class="wp-caption-text">battery pack sans front/back covers</p></div>
<p style="text-align: center;">
<p style="text-align: left;">In this shot, we can finally remove the only screws in this battery pack&#8217;s setup and pull off the cover to reveal the batteries inside.  One special note about the covers.  They are omni-directional (Editor&#8217;s note: omni-sidal seemed to not be a word. <img src='http://www.yourwarrantyisvoid.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  ) meaning that the &#8220;left&#8221; side could easily be the &#8220;right side&#8221;.  The only thing that determined direction was that the indentation for the pedestal foot was at the bottom (pointed towards you if on a table) and that the cord came out of the &#8220;back&#8221;.  Aside from that, it was anyone&#8217;s game.</p>
<div id="attachment_134" class="wp-caption aligncenter" style="width: 514px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/10/IMG_0617.JPG"><img class="size-full wp-image-134" title="Finally unboxed" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/10/IMG_0617.JPG" alt="Finally unboxed" width="504" height="336" /></a><p class="wp-caption-text">Finally unboxed</p></div>
<p style="text-align: center;">
<p style="text-align: left;">(I apologize for the blurriness of the full-size picture, just use the thumbnail for general positioning data.)  Behold, here is the batteries in all its glory.  Keep in mind that my top two batteries are &#8220;poofy&#8221; and need to be replaced.  The bottom ones, are not poofy so will get taken to a battery place to get charged and tested.</p>
<div id="attachment_135" class="wp-caption aligncenter" style="width: 514px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/10/IMG_0624.JPG"><img class="size-full wp-image-135" title="Battery type and model #" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/10/IMG_0624.JPG" alt="Battery type and model #" width="504" height="336" /></a><p class="wp-caption-text">Battery type and model #</p></div>
<p style="text-align: center;">
<p style="text-align: left;">Before we get into wiring diagrams and all that nonsense, please make sure you use the right battery.  These are 12 volt,  3.4A batteries.  CSB# HR-1234W-F2 and are the Sealed Lead Acid (SLA) type.  <strong>IT IS CRITICALLY IMPORTANT THAT YOU USE THE SAME TYPE AND RATINGS OF BATTERIES IN YOUR UPS.  EXTENDING YOUR UPS MAY GIVE YOU ADDITIONAL UPTIME BUT WILL CAUSE YOUR ADDITIONAL UPTIME TO FAIL AS THE CHARGER CIRCUIT CAN NOT HANDLE THE EXTENDED CAPACITY! (Can I say this enough?)</strong> If you are in doubt about whether or not you have the right battery, take one from the pack to an <a title="Interstate Batteries.com" href="http://www.interstatebatteries.com/cs_estore/" target="_blank">Interstate Batteries</a> or a <a title="Batteries Plus.com" href="http://www.batteriesplus.com/" target="_blank">Batteries Plus</a> and get four just like it.  Bring them home and wire up as covered below.</p>
<p style="text-align: left;">
<p style="text-align: left;"><strong>Wiring it all up:</strong></p>
<p style="text-align: left;">The interesting thing about this pack is that despite the link that I found for APC, this is actually a 24VDC system, not a 12VDC system as advertised. Granted, the batteries themselves are 12VDC, but they are hooked into a 12x2x2 array meaning that the batteries are connected in series (to make 24VDC) and then are connected in parallel to another pair connected in series.  The entire thing ends up being a 2x 24v array as shown in our next picture:</p>
<div id="attachment_136" class="wp-caption aligncenter" style="width: 514px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/10/IMG_0618.JPG"><img class="size-full wp-image-136     " title="Battery Hookup" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/10/IMG_0618.JPG" alt="battery hookup" width="504" height="336" /></a><p class="wp-caption-text">Battery Hookup</p></div>
<p style="text-align: left;">Ok, so let&#8217;s review this hookup.  The umbilical cord that goes to the main BackUPS is in my hand.  For now, ignore the little yellow wire.  It has nothing to do with our hookup at the moment.  Clockwise from top left, we have the UL (upper left) battery, UR (Upper Right) battery, LR (Lower Right) and LL (Lower Left) batteries.  The umbilical has two positives and two negative leads on it. <strong>WHEN HOOKING UP BATTERIES, YOU MUST OBEY THIS IMPORTANT RULE: AT NO TIME WILL THE POSITIVE AND NEGATIVE OF THE UMBILICAL BE ON THE SAME BATTERY!!! THIS WILL CAUSE AN EXPLOSION AS THE 24V BATTERIES TRY TO (AND SUCCEED) OVER CHARGE THE SINGLE 12V BATTERY!</strong> That being said, connect one of the <strong>RED</strong> wires to the positive terminal on two batteries and connect the <strong>BLACK</strong> wires to the other two batteries&#8217; negative terminals.  At this point, all four batteries should be connected with one connection from the umbilical.  Connect the <strong>BLUE</strong> wires from the positive battery&#8217;s <strong>NEGATIVE</strong> terminal to the negative battery&#8217;s <strong>POSITIVE</strong> terminal.   In essence, you have created two 24 volt battery packs made of UL and UR, and LL and LR respectively.</p>
<div id="attachment_137" class="wp-caption aligncenter" style="width: 514px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/10/IMG_0622.JPG"><img class="size-full wp-image-137  " title="Little Yellow Wire" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/10/IMG_0622.JPG" alt="Little Yellow Wire" width="504" height="336" /></a><p class="wp-caption-text">Little Yellow Wire</p></div>
<p style="text-align: left;">Now, back to this little yellow wire (and the 80A fuze)  This wire acts as a &#8220;Sense&#8221; for the battery backup to determine the battery pack&#8217;s overall health. The wire has a resistor shrinkwrapped inline with it and should not be tampered with.  Doing so may adversely affect the UPS&#8217;s operation.</p>
<p style="text-align: left;"><strong>Afterthoughts</strong>:</p>
<p style="text-align: left;">It&#8217;s been fun dissecting this battery pack however it was hard as hell initially.  APC does not make it easy to pry open the front/back of their UPS battery packs.  I&#8217;m hoping that someone aside from myself finds this information useful as it was not easy obtaining it.  If you have any information on where to get good replacement batteries, or you wish to share your experience, feel free to fire back at me in the comments section.</p>
<p style="text-align: left;">
<p style="text-align: left;">Until the next post, happy hacking!</p>
<p style="text-align: left;">
<p style="text-align: left;">FIRESTORM_v1</p>
<p style="text-align: left;">
<hr />
<p style="text-align: center;">UPDATE!!! 11/10/09</p>
<hr />Readers Derek and Shaaz commented concerning the resistor that was inline on the yellow lead of the power cable.  After performing some investigative research (edit: I tore off the shrinkwrap), I have found that it is a 1% tolerance metal oxide film resistor.  The resistor color code is Red, Black, Black, Red, Brown which indicates a value of 20 ohms with a tolerance of 1%.  <span style="text-decoration: line-through;">The tolerance is key as I am still of the opinion that this is how the APC backup monitors the battery level and is able to determine the level of power left.</span> <span style="text-decoration: line-through;">I would not suggest using a standard resistor instead of this 1% tolerance resistor as this will affect how long the UPS thinks it has on charge remaining</span>.</p>
<p>Reader &#8220;Steevo&#8221; wrote in to catch me on a critical error in regards to this resistor.  M initial calculations were incorrect, the value of this resistor is not 20K ohm, but rather 20 ohm, Please make sure you use the correct resistor if you ever need to replace it.</p>
<div id="attachment_144" class="wp-caption aligncenter" style="width: 514px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/10/IMG_0659.JPG"><img class="size-full wp-image-144" title="The secret is revealed!" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/10/IMG_0659.JPG" alt="Finally the mystery is unveiled" width="504" height="336" /></a><p class="wp-caption-text">The secret is revealed!</p></div>
<p style="text-align: center;">
<p style="text-align: center;"><span style="text-decoration: underline;"><strong>UPDATE:</strong></span> More details about the power connector from the BBU power pack to the UPS</p>
<p style="text-align: left;">After requests for information in regards to the power pack&#8217;s connector, I realized that I had made a serious oversight.  I had not documented the power connector that connects the battery pack to the UPS body.  With this in mind, I took some more pictures of the connector:</p>
<p style="text-align: left;">
<div id="attachment_401" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/10/DSCF0578.jpg"><img class="size-medium wp-image-401" title="Power connector" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/10/DSCF0578-300x225.jpg" alt="Power connector" width="300" height="225" /></a><p class="wp-caption-text">Power connector</p></div>
<p style="text-align: left;">The power connector has four pins holding the strain relief on.  After getting the pieces pried apart, the end connector slides off and you can then see the wiring on the inside.  Barring that, I went ahead and was able to extract the outside case off of the three spade connectors as shown here. In order to extract the three spade connectors, you will need to take a long sharp screwdriver and pry the plastic clips holding the spade connectors down.</p>
<p style="text-align: left;">
<div id="attachment_402" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/10/DSCF0579.jpg"><img class="size-medium wp-image-402" title="connector endcap" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/10/DSCF0579-300x225.jpg" alt="connector endcap" width="300" height="225" /></a><p class="wp-caption-text">connector endcap</p></div>
<p style="text-align: left;">Here&#8217;s the connector with the spades having been successfully extracted:</p>
<p style="text-align: left;">
<div id="attachment_403" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/10/DSCF0582.jpg"><img class="size-medium wp-image-403" title="successful extraction" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/10/DSCF0582-300x225.jpg" alt="successful extraction" width="300" height="225" /></a><p class="wp-caption-text">successful extraction</p></div>
<p style="text-align: left;">Keep in mind that the plug orientation is not certain as I&#8217;ve reinstalled the UPS and it&#8217;s buried under the desk.  The red mark on the connector jacket is there for orientation purposes, but interfacing with the UPS may require that the black wire is on the left, and the yellow wire is on the right.</p>
<p style="text-align: left;">
<p style="text-align: center;">
<p style="text-align: center;">
]]></content:encoded>
			<wfw:commentRss>http://www.yourwarrantyisvoid.com/2009/10/27/breaking-into-apcs-br24bp-battery-pack/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>Add an SD card slot to a WRT54G v2</title>
		<link>http://www.yourwarrantyisvoid.com/2009/09/09/add-an-sd-card-slot-to-a-wrt54g-v2/</link>
		<comments>http://www.yourwarrantyisvoid.com/2009/09/09/add-an-sd-card-slot-to-a-wrt54g-v2/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 08:27:18 +0000</pubDate>
		<dc:creator>firestorm_v1</dc:creator>
				<category><![CDATA[Embedded devices]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[How-To's]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linksys]]></category>
		<category><![CDATA[parts]]></category>
		<category><![CDATA[router]]></category>
		<category><![CDATA[SD card]]></category>
		<category><![CDATA[WRT54G]]></category>

		<guid isPermaLink="false">http://www.yourwarrantyisvoid.com/?p=95</guid>
		<description><![CDATA[In this post, we&#8217;ll cover step-by-step how to add a SD cardslot to your Linksys WRT54G running DD-WRT and how to configure it in the DD-WRT UI.    Granted, this has been done a lot already, however there is a significant lack of information on how to do it on the older V2&#8242;s.  Read more for [...]]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-97" title="router" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/09/M130.png" alt="router" width="128" height="137" />In this post, we&#8217;ll cover step-by-step how to add a SD cardslot to your Linksys WRT54G running DD-WRT and how to configure it in the DD-WRT UI.    Granted, this has been done a lot already, however there is a significant lack of information on how to do it on the older V2&#8242;s.  Read more for the complete step-by-step guide.<span id="more-95"></span></p>
<p>One of the advantages to using alternative firmware on &#8220;stock&#8221; devices is that it allows you to unlock the full potential of your hardware.  Using the latest version of DD-WRT, you can now enable esternal storage on your WRT54G to add to the default image.  With additional storage for your router, the possibilities are endless.</p>
<p><span style="text-decoration: underline;"><strong>PLEASE NOTE:</strong></span> The pictures and information for adding the SD cardslot is only applicable to the Version 2 of the Linksys router.  Attempting to do this on newer routers using this guide may result in damage to the router, the SD card or both.  You can not hold me liable for any damage, so please read first and do some research before you crack the case open. The 15 minutes you may spend now may save you some blue smoke later.</p>
<p><strong>Items Required:</strong></p>
<ul>
<li><strong>SD card slot</strong> &#8211; I stole one out of a 4 in one card reader from a failed hacking attempt from another project.</li>
<li><strong>SD card</strong> &#8211; Use a cheap one to verify it&#8217;s working first, then use whatever size you want.</li>
<li><strong>A piece of PCB &#8211; </strong>I used a piece of board that I had left over from another project, but <a title="Radio Shack Perfboard" href="http://www.radioshack.com/product/index.jsp?productId=2104052" target="_blank">this one from Radio Shack</a> works well too.<em> </em></li>
<li><strong>Jumper Wire</strong> &#8211; If you have multiple colors, this would be beneficial in keeping the lines straight for wiring.</li>
<li><strong>Small nuts and bolts</strong></li>
<li><strong>Fine Tip soldering iron</strong></li>
<li><strong>Dremel cutting tool</strong></li>
<li><strong>(Optional) Razor Knife or X-acto Knife set</strong></li>
</ul>
<p>First thing&#8217;s first.  This howto only covers the process of adding the card slot to the router and configuring DD-WRT.  It does not cover installing DD-WRT on the router or which router is best for the process.  The process of installing DD-WRT is very very well documented as well as the router&#8217;s specs for <a title="DD-WRT supported devices" href="http://www.dd-wrt.com/wiki/index.php/Supported_Devices" target="_blank">supported devices</a> over at the <a title="DD-WRT Wiki" href="http://www.dd-wrt.com/wiki/index.php/Main_Page" target="_blank">DD-WRT Wiki</a>.</p>
<h2>Getting to know the SD card</h2>
<p><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/09/DSCF0386.JPG"><img class="aligncenter size-medium wp-image-98" title="SD card pinout" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/09/DSCF0386-300x296.jpg" alt="SD card pinout" width="300" height="296" /></a>The SD card pinout shown above indicates that although the card has 9 pins, we will only be using 7 of them.  Unlike most devices, the indented pin is not pin 1, but is pin 9, with pin 1 next to it.  Here&#8217;s a quick reference showing what each pin is and what it does:</p>
<ul>
<li>Pin 1 &#8211; Chip Select &#8211; When this is brought high, the SD card is &#8220;turned on&#8221; and allows it to receive data or send data in sync with the CLK pin (pin 5)</li>
<li>Pin 2 &#8211; Data In &#8211; This pin is used to receive data from the WRT54G for writing or for commands</li>
<li>Pin 3 &#8211; Vss (GND) &#8211; This is a ground pin and is tied to Pin 6 for one less wire to deal with.  It is important that both pins be brought together.</li>
<li>Pin 4 &#8211; VCC (or +5VDC) &#8211; This pin supplies power to the SD card.</li>
<li>Pin 5 &#8211; CLK &#8211; This is the clock line that the WRT sends to the SD card.  This pin synchronizes the data coming in or going out of the WRT54G so that the SD card has the proper timing to read and write data.</li>
<li>Pin 6 &#8211; Vss (GND) &#8211; This pin is also ground.</li>
<li>Pin 7 &#8211; DO &#8211; This pin is data out to the WRT54G</li>
<li>Pin 8 &#8211; Not Connected for this project.</li>
<li>Pin 9 &#8211; Also not connected for this project.</li>
</ul>
<p>We will be using some connections in the WRT54G called GPIOs to connect the various pins of the SD card to the WRT54G&#8217;s hardware.  These GPIO pins are already used for other functions, but with the driver built into DD-WRT, we can use them to also control the SD card.</p>
<h2>Step 1: Prepare the SD Card slot:</h2>
<p><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/09/DSCF0332.JPG"><img class="aligncenter size-medium wp-image-99" title="SD card slot" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/09/DSCF0332-300x225.jpg" alt="SD card slot" width="300" height="225" /></a>This is a picture of the SD card slot that I will be using.</p>
<p><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/09/DSCF0335.JPG"><img class="aligncenter size-medium wp-image-100" title="Card slot and perfboard" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/09/DSCF0335-300x225.jpg" alt="Card slot and perfboard" width="300" height="225" /></a>In this picture, I felt it necessary to scrape off the PCB solder pads under the SD card itself.  This is where the X-acto knife kit comes in handy.  The two solder &#8220;dots&#8221; in between the screw holes is for anchoring the tabs of the SD card slot and is recommended for making the card slot resistant to damage from repeated inserts and extracts.</p>
<p><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/09/DSCF0333.JPG"><img class="aligncenter size-medium wp-image-101" title="Card slot and PCB back-end" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/09/DSCF0333-300x225.jpg" alt="Card slot and PCB back-end" width="300" height="225" /></a>In this shot, I have lucked out.  Each of the pins from the card slot match one of the solder pads on the PCB with no difficulty.  This will greatly help soldering the wires to the cardslot.</p>
<p><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/09/DSCF0336.JPG"><img class="aligncenter size-medium wp-image-102" title="Ground wires in place" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/09/DSCF0336-300x225.jpg" alt="Ground wires in place" width="300" height="225" /></a>I recommend starting off with the ground wires, pin3 and pin 6.  The little loop is the bridge between the two.</p>
<p><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/09/DSCF0339.JPG"><img class="aligncenter size-medium wp-image-103" title="DSCF0339" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/09/DSCF0339-300x225.jpg" alt="DSCF0339" width="300" height="225" /></a>Wire the rest of the wires to their respective pins on the SD card slot. When all is said and done, you should have 6 wires.   At this point, we&#8217;re done with the card slot and we&#8217;re ready to start soldering to the WRT54G.</p>
<h2>Step 2: Making connections</h2>
<p>If you haven&#8217;t done so already, go ahead and take the WRT54G apart.</p>
<ul>
<li>Start by unplugging the WRT54G&#8217;s power and network cables.</li>
<li>Unscrew both of the antennas and set aside</li>
<li>Grab the grey part of the WRT54G in one hand and the blue part in your other hand.</li>
<li>Pull the two halves apart and set the blue part aside.</li>
<li>Slide the top cover away from the bottom half of the WRT54G.</li>
</ul>
<p>Now for the hard part.  There are six locations that need to be wired up in order for this to work properly.  We&#8217;ll start off with the easy one. Pin 1 (CS) goes to the + side of the DMZ LED.  In this orientation, the component side of the PCB faces away from you, essentially you&#8217;re looking up from the bottom.</p>
<p><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/09/DSCF03871.JPG"><img class="aligncenter size-medium wp-image-105" title="CS pin to + of DMZ LED" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/09/DSCF03871-300x225.jpg" alt="CS pin to + of DMZ LED" width="300" height="225" /></a>Attach the pin 1 lead to the <strong>right</strong> pin of the  DMZ LED.</p>
<p><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/09/DSCF0342-reduced1.JPG"><img class="aligncenter size-medium wp-image-107" title="Pin 4, +5v and Pin 3,6 GND" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/09/DSCF0342-reduced1-300x225.jpg" alt="Pin 4, +5v and Pin 3,6 GND" width="300" height="225" /></a>In this picture, we will be using the In Circuit Programmer port for pin 4 and pins 3,6.  The Pin 4 (+5V) goes to the pin 1 on the ICP port, while the pins 3,6 (GND) goes to pin 10 of the ICP port. Orient the router so that the two antennas point up and away from you and that the component side faces you. The ICP port is an unpopulated 10 pin header located in the lower right hand quadrant of the router&#8217;s circuit board.</p>
<p>The next three leads are the most important AND the most difficult.  You can click on the image to get a larger view if you need it.</p>
<p><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/09/DSCF03401.JPG"><img class="aligncenter size-medium wp-image-108" title="Last three pins" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/09/DSCF03401-300x185.jpg" alt="Last three pins" width="300" height="185" /></a>With the same orientation discussed as before, just south of the ADMtek chip is where the last three pins go.  This is the hardest part of the build as you must attach to a resistor network that itself is very tiny.  It took me several attempts and I had to superglue the wires down so that they wouldn&#8217;t move (not shown in this shot).</p>
<p><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/09/DSCF03402.JPG"><img class="aligncenter size-medium wp-image-109" title="Extreme close up" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/09/DSCF03402-300x201.jpg" alt="Extreme close up" width="300" height="201" /></a>Here is an EXTREME close up of the resistor network (still same orientation).  This is a 4 resistor chip, with 2 rows of 4 pins each.  Pin 1 is the upper left hand corner and is wired to DI (pin 2) of the SD card. Pin 6 (second from the left on the lower side of the resistor network) goes to the CLK (pin 5) of the SD card, while pin 7 of the resistor network is wired to DO (pin 7) of the SD card.</p>
<h2>Step 3: Box it up!</h2>
<p>Now that you&#8217;ve gotten the card set up, it&#8217;s time to put it together.  Now, there are many a howto that have a million and one locations to mount the card slot.  I wanted something that didn&#8217;t look kludged together or didn&#8217;t have the cardslot sticking out of some random location. I instead chose the back of the WRT, just above the ethernet ports.</p>
<p><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/09/DSCF0345.JPG"><img class="aligncenter size-medium wp-image-110" title="SD card slot and Dremel" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/09/DSCF0345-300x225.jpg" alt="SD card slot and Dremel" width="300" height="225" /></a>Thankfully for me, the SD card was slightly larger than the diameter of the cutting wheel of my Dremel.  Making a single cut was quite easy.</p>
<p><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/09/DSCF0348.JPG"><img class="aligncenter size-medium wp-image-111" title="SD card in place" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/09/DSCF0348-300x225.jpg" alt="SD card in place" width="300" height="225" /></a>I made my cut just above the Ethernet ports and secured the PCB to the top cover.  The bolts holding the PCB in place were just short enough to clear the RJ45 connection block so no additional work was necessary.</p>
<p><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/09/DSCF0352.JPG"><img class="aligncenter size-medium wp-image-112" title="Completed mod" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/09/DSCF0352-300x225.jpg" alt="Completed mod" width="300" height="225" /></a>Here&#8217;s a view after the WRT54G completely assembled (and also where my Dremel nicked the plastic cover)</p>
<p><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/09/DSCF0353.JPG"><img class="aligncenter size-medium wp-image-113" title="DSCF0353" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/09/DSCF0353-300x225.jpg" alt="DSCF0353" width="300" height="225" /></a>One more shot of the completed mod, the only thing I would like to have done is found countersunk bolts.  Unfortunately, I was limited to what I had on hand at the time.  All in all, it&#8217;s a very clean modification.</p>
<h2>Step 4: Configure DD-WRT</h2>
<p>Now all that&#8217;s left to do is to configure DD-WRT.  Before we begin, make sure that you have cleared out the SD card of any data you want prior to working with it.  Once we get the card working, the router will format the card with an EXT3 filesystem, erasing anything already on the card.</p>
<p>Go ahead and hook up the router to power and network.  Don&#8217;t stick the SD card in just yet, first we have to configure DD-WRT for the card.  Click on &#8220;Managment&#8221; and scroll down to the &#8220;MMC/SD card support&#8221;.  Enable it if it&#8217;s not already enabled and set the GPIO pins detect to &#8220;Manual&#8221;.</p>
<p><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/09/SD-success-Mozilla-Firefox-1.png"><img class="aligncenter size-medium wp-image-114" title="SD card GPIO pin settings" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/09/SD-success-Mozilla-Firefox-1-300x210.png" alt="SD card GPIO pin settings" width="300" height="210" /></a>When you select &#8220;Manual&#8221;, you will need to put in some numbers for the four signal leads.  I used the following settings:</p>
<ul>
<li>DI (Data In) &#8211; GPIO 5</li>
<li>DO (Data Out) &#8211; GPIO 3</li>
<li>CLK (Clock) &#8211; GPIO 4</li>
<li>CS (Chip Select) &#8211; GPIO 7</li>
</ul>
<p>Scroll down, and hit &#8220;Save Settings&#8221;.  The screen will fade out then fade back in.  Once the screen fades back in, disconnect the power from the WRT and insert your SD card. Power on the router and you should notice that the DMZ LED starts flashing intermittently.  This is good news.</p>
<p>Log back into the DD-WRT admin panel and hopefully, if everything is correct, you will see values filled in for Total/Free Size.  If you do, then congratulations. you&#8217;re done!  You can login via Telnet to the router and see that it&#8217;s mounted and ready to roll.</p>
<p><a href="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/09/mounted-SD.png"><img class="aligncenter size-medium wp-image-115" title="mounted SD" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/09/mounted-SD-300x208.png" alt="mounted SD" width="300" height="208" /></a>From here, you can now compile things on a Linux box, save them to your SD card and then use your SD card to launch your programs on the WRT itself.  Just remember to mount and umount the card and you won&#8217;t have to worry about corrupting the filesystem on the card.</p>
<h2>Afterword:</h2>
<p>Thanks goes out to the DD-WRT user community for making this possible and thanks goes to the original person that hacked out GPIO SD-card support into the kernel running on DD-WRT.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yourwarrantyisvoid.com/2009/09/09/add-an-sd-card-slot-to-a-wrt54g-v2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Make APCUPSd tweet for help!</title>
		<link>http://www.yourwarrantyisvoid.com/2009/08/18/make-apcupsd-tweet-for-help/</link>
		<comments>http://www.yourwarrantyisvoid.com/2009/08/18/make-apcupsd-tweet-for-help/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 22:02:52 +0000</pubDate>
		<dc:creator>firestorm_v1</dc:creator>
				<category><![CDATA[How-To's]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[APC]]></category>
		<category><![CDATA[apcupsd]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://www.yourwarrantyisvoid.com/?p=51</guid>
		<description><![CDATA[Well, the world is abuzz with all things twitter so I figured that I&#8217;d join the fray.  But rather than tweeting about farts being blasted into an office chair or a toilet that twitters or even a tweeting toaster, I decided to do something useful with this thing called Twitter.  I have APCUPSd running on [...]]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-61" title="images" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/08/images.jpeg" alt="images" width="150" height="65" /></p>
<p>Well, the world is abuzz with all things twitter so I figured that I&#8217;d join the fray.  But rather than <a href="http://www.instructables.com/id/The-Twittering-Office-Chair/">tweeting about farts being blasted into an office chair</a> or a <a href="http://aculei.net/~shardy/hacklabtoilet/">toilet that twitters</a> or even a <a href="http://www.instructables.com/id/social_networking_for_my_toaster/">tweeting toaster</a>, I decided to do something useful with this thing called Twitter.  I have APCUPSd running on a Linux box that tweets when the server detects a change in power.  Read more to find out how you can incorporate this into your linux server.</p>
<p><span id="more-51"></span>After thinking about my network monitor application that &#8220;tweets&#8221; when a server goes down or comes up unexpectedly, I thought I&#8217;d take a look at seeing what it would take to get notified when my server lost power.  I already installed and configured APCUPSd and it was confirmed as working so now I wanted to be notified on power changes.</p>
<p>The whole &#8220;twitter&#8221; thing had caught on right when I was looking for a solution to a problem I had.  The issue was that I had a server that was randomly dropping offline and freezing and I needed a way to be notified realtime of when the machine went down.  Well I spent a few days developing a network monitor application that has since then grew into quite a nice suite.</p>
<p>I did some research and found out that the Twitter application had an API that could be called to post updates.  I did some further searching and found how to post to Twitter using PHP-CURL, and later on found that CURL was a standalone application that could be called from the commandline. With that, I found out what I needed to do and set it up.</p>
<h2>Prerequisites</h2>
<p>In order to make this work, you will need the following:</p>
<ul>
<li>Root access on a linux box running APCUPSd with a known working good configuration.</li>
<li>Two twitter accounts, one for your phone and one for your monitor application.</li>
<li>the CURL application installed on your linux box. (Ubuntu users can <strong>apt-get install curl</strong> to install it automatically)</li>
</ul>
<p>I&#8217;m not going to cover how to set up a new Twitter account. I&#8217;m sure everyone has been beaten over the head with it already.</p>
<h2>1:  You must follow your newly created friend</h2>
<p>Twitter for SMS will work if these conditions are met:</p>
<ol>
<li>You have a twitter account that you receive twitter messages on.</li>
<li>Your twitter account must &#8220;follow&#8221; your monitor application&#8217;s twitter account.</li>
</ol>
<p>In this case, I have set up &#8220;trs_netstat&#8221; as my monitor application&#8217;s twitter account and I follow it with my own twitter account.</p>
<p><strong>Notes:</strong><strong> </strong>A cellphone plan with unlimited SMS is a REQUIREMENT, I used almost 2200 SMS messages last month.  I also recommend enabling privacy mode on your accounts so that way you&#8217;re not broadcasting to the world that your UPS is running on battery.</p>
<p>In order to make sure that your computer can successfully communicate with Twitter, use the syntax below:</p>
<p><code><br />
root@linux ~ # curl -u <em>{twitter username}</em>:<em>{twitter password}</em> -d status="This is a test message." http://twitter.com/statuses/update.xml<br />
</code></p>
<p>If everything works the way it should, you should in turn get a lot of XML data back.  This is a good thing.  If you got a lot of XML data but no post on the Twitter site, look for the following line in your XML</p>
<p><code><br />
&lt;error&gt;Not found&lt;/error&gt;<br />
</code></p>
<p>This means that the URL you specified is incorrect, and other errors will show up in the XML, typically with the &lt;error&gt;&lt;/error&gt; tags.</p>
<h2>2: Create the scripts&#8230; or not?</h2>
<p>I read up on the APCUPSD website on how to customize how apcupsd behaves when certain events are triggered.</p>
<blockquote><p>To write your own routine for the <tt><span>powerout</span></tt> action, you create shell script named <tt><span>powerout</span></tt> and put it in the lib directory (normally /etc/apcupsd). When the <tt><span>powerout</span></tt> action is invoked by apcupsd, apccontrol will first give control to your script. If you want apccontrol to continue with the default action, simply exit your script with an exit status of zero. If you do not want apccontrol to continue with the default action, your script should exit with the special exit code of 99. However, in this case, please be aware that you must ensure proper shutdown of your machine if necessary.</p></blockquote>
<p>So waitasec&#8230; APCUPSd supports 21 different configuration options.  So if I want to get notification of all 21 events, I gotta write 21 scripts or create 21 symlinks?  How about, &#8220;Heck no!&#8221;</p>
<p>By adding a call to my script within apccontrol, I can ensure that I get all the notifications that apcupsd would send and there would be no need to set up 21 symlinks.</p>
<p>In my /etc/apcupsd/apccontrol on line 58, I added the call to my twitapc script shown below:</p>
<pre><code>
     if [ $? = 99 ] ; then
         exit 0
    fi
 fi
 ${SCRIPTDIR}/twitapc ${1} ${2} ${3} {$4}
 case "$1" in
     killpower)
         echo "Apccontrol doing: ${APCUPSD} --killpower on UPS ${2}"
</code></pre>
<p>The line that starts off with ${SCRIPTDIR} is the one you want to add.  The ${1} ${2} ${3} {$4} is important as this hands off variables that apccontrol was invoked with to twitapc for action.  Some of the variables passed are actions like &#8220;killpower&#8221; shown above, and one of them includes the UPS name.  You want to keep this information with twitapc so that you get these notifications.</p>
<h2>3: Add my script to your configuration (or &#8230;.)</h2>
<p>This is the twitapc script.  If it looks identical to the apccontrol script, that&#8217;s because it is.  I copied apccontrol and changed some of the variables to perform the calls I needed. Theapccontrol script already covered the events with good coverage so there wasn&#8217;t a need to rewrite an entire script.</p>
<pre><code>
#!/bin/sh
#
# Copyright (C) 1999-2002 Riccardo Facchetti
#
#  for apcupsd release 3.14.2 (15 September 2007) - debian
#
# platforms/apccontrol.  Generated from apccontrol.in by configure.
#
#  Note, this is a generic file that can be used by most
#   systems. If a particular system needs to have something
#   special, start with this file, and put a copy in the
#   platform subdirectory.
#
#
# These variables are needed for set up the autoconf other variables.
#
#----------------------------------------------------------------------
#
# Script modified for twitapc by FIRESTORM_v1.
#
#
#
#
#
#

prefix=/usr
exec_prefix=${prefix}

APCPID=/var/run/apcupsd.pid
APCUPSD=/sbin/apcupsd
SHUTDOWN=/sbin/shutdown
SCRIPTSHELL=/bin/sh
SCRIPTDIR=/etc/apcupsd
WALL=wall

#
#Leave the lines above alone, these are the lines you want to edit:
#
#
#
tw_user='Twitter Username'
tw_pass='Twitter Password'
tw_url='http://twitter.com/statuses/update.xml'
timestamp=$(date +%m%d%Y-%H%M)

case "$1" in
 killpower)
 msg="Apccontrol doing: ${APCUPSD} --killpower on UPS ${2}"
 sleep 10
 msg="Apccontrol has done: ${APCUPSD} --killpower on UPS ${2}"
 ;;
 commfailure)
 msg="Warning communications lost with UPS ${2}"
 ;;
 commok)
 msg="Communications restored with UPS ${2}"
 ;;
#
# powerout, onbattery, offbattery, mainsback events occur
#   in that order.
#
 powerout)
 ;;
 onbattery)
 msg="Power failure on UPS ${2}. Running on batteries."
 ;;
 offbattery)
 msg="Power has returned on UPS ${2}..."
 ;;
 mainsback)
 msg="Mains power restored on UPS ${2}..."
 ;;
 failing)
 msg="Battery power exhaused on UPS ${2}. Doing shutdown."
 ;;
 timeout)
 msg="Battery time limit exceeded on UPS ${2}. Doing shutdown."
 ;;
 loadlimit)
 msg="Remaining battery charge below limit on UPS ${2}. Doing shutdown."
 ;;
 runlimit)
 msg="Remaining battery runtime below limit on UPS ${2}. Doing shutdown."
 ;;
 doreboot)
 msg="UPS ${2} initiating Reboot Sequence"
 ;;
 doshutdown)
 msg="UPS ${2} initiated Shutdown Sequence"
 ;;
 annoyme)
 msg="Power problems with UPS ${2}. Please logoff."
 ;;
 emergency)
 msg="Emergency Shutdown. Possible battery failure on UPS ${2}."
 ;;
 changeme)
 msg="Emergency! Batteries have failed on UPS ${2}. Change them NOW"
 ;;
 remotedown)
 msg="Remote Shutdown. Beginning Shutdown Sequence."
 ;;
 startselftest)
 ;;
 endselftest)
 ;;
 battdetach)
 ;;
 twittest)
 msg="TwitAPC Test Message"
 echo "Test message sent. Please check your phone."
 ;;
 battattach)
 ;;
 *)  echo "Usage: ${0##*/} command"
 echo "       warning: this script is intended to be launched by"
 echo "       apcupsd and should never be launched by users."
 echo " To test your twitter connection, run the below command:"
 echo " # twitapc twittest"
 exit 1
 ;;
esac

if [ -n "$msg" ]

 then
 curl -o /dev/null -s -u $tw_user:$tw_pass -d status="$msg ::$timestamp" $tw_url
fi
</code></pre>
<p>( I apologize that this code is not properly indented. The HTML editor application stripped out the whitespace. )</p>
<p>All that is needed is to adjust the $tw_username and the tw_password to match your account settings.  If you want to test it, just run it from command line with the parameter twittest</p>
<pre><code>
root@littleblackbox:/etc/apcupsd# ./twitapc twittest
Test message sent. Please check your phone.
</code></pre>
<p>This will send the test message.  If it isn&#8217;t working for you, remove the &#8220;-o /dev/null -s &#8221; from the curl statement at the bottom of the script.</p>
<h2>4:  Profit!!!</h2>
<p>If the twitter test message worked, then you&#8217;re in it for real.  Test it out by, you guessed it, pulling out the UPS power cord from the wall socket.  Of course the UPS will switch to battery and will start beeping, but within a few seconds, you should get a text message from Twitter with the user ID of the account specified in twitapc.</p>
<p>After a few seconds, plug it back in and you should get two more after power is restored and the system is back to normal.</p>
<p>Here is a screenshot of my network monitor twitter page with some sample notifications on it.</p>
<p><img class="aligncenter size-full wp-image-67" title="trs_netstat twitter" src="http://www.yourwarrantyisvoid.com/wp-content/uploads/2009/08/trs_netstat-twitter1.bmp" alt="trs_netstat twitter" /></p>
<p>I added a timestamp to the script as my phone doesn&#8217;t always display timestamps on it&#8217;s text messages. It&#8217;s formatted MMDDYYYY-HHMM and can be easily changed in the script</p>
<p>I am always interested to hear your comments and your suggestions.  If you have a success story, by all means tell me.<br />
Have fun and happy twitter-ups-ing..</p>
<p>FIRESTORM_v1</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yourwarrantyisvoid.com/2009/08/18/make-apcupsd-tweet-for-help/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
