<?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>Hacking With Gum &#187; GT-704WG</title>
	<atom:link href="http://hackingwithgum.com/tag/gt-704wg/feed/" rel="self" type="application/rss+xml" />
	<link>http://hackingwithgum.com</link>
	<description>A Hardware Hacking Blog</description>
	<lastBuildDate>Tue, 23 Mar 2010 00:47:02 +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>Installing OpenWRT On The GT-704WG</title>
		<link>http://hackingwithgum.com/2009/09/17/installing-openwrt-on-the-actiontec-gt-704wg/</link>
		<comments>http://hackingwithgum.com/2009/09/17/installing-openwrt-on-the-actiontec-gt-704wg/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 02:05:42 +0000</pubDate>
		<dc:creator>cheffner</dc:creator>
				<category><![CDATA[Routers]]></category>
		<category><![CDATA[ActionTec]]></category>
		<category><![CDATA[GT-704WG]]></category>
		<category><![CDATA[OpenWRT]]></category>
		<category><![CDATA[Router]]></category>

		<guid isPermaLink="false">http://hackingwithgum.com/?p=206</guid>
		<description><![CDATA[I recently picked up an ActionTec GT-704WG DSL router from the thrift store ($15) and wanted to flash it with OpenWRT. Checking out Google and the OpenWRT Wiki, some work has been done on the GT-701WG, but specific information for flashing the GT-704 was scarce. The GT-704 hardware is based on the AR7 from Texas [...]]]></description>
			<content:encoded><![CDATA[<p>I recently picked up an ActionTec GT-704WG DSL router from the thrift store ($15) and wanted to flash it with OpenWRT. Checking out Google and the OpenWRT Wiki, some <a href="http://www.nettwerked.net/actiontec.html">work</a> has been <a href="http://wiki.openwrt.org/oldwiki/openwrtdocs/hardware/actiontec/gt701_wg">done</a> on the GT-701WG, but specific information for flashing the GT-704 was scarce. The GT-704 hardware is based on the AR7 from Texas Instruments, and is nearly identical in specifications to the GT-701:</p>
<blockquote><p><strong><br />
Platform: </strong>Texas Instruments AR7, 150MHz<br />
<strong>Flash:</strong> 4MB<br />
<strong>RAM:</strong> 16MB<br />
<strong>Ethernet:</strong> 4 Ports<br />
<strong>Wireless:</strong> TI ACX111, 802.11b/g</p></blockquote>
<p>The firmware install is pretty straightforward, once you get the commands right. The process is very similar to that <a href="http://oldwiki.openwrt.org/OpenWrtDocs(2f)InstallingAR7.html">documented</a> for generic AR7 devices, but not exactly the same. It helps to have a terminal connected to the JP603 serial port (ttys0, 38400, 8N1)during this process as well, but it is not necessary:</p>
<div id="attachment_216" class="wp-caption aligncenter" style="width: 310px"><a href="http://hackingwithgum.com/wp-content/uploads/2009/09/gw704_serial_port.jpg"><img class="size-medium wp-image-216" title="GT-704WG Serial Ports" src="http://hackingwithgum.com/wp-content/uploads/2009/09/gw704_serial_port-300x225.jpg" alt="The serial port on the right (JP603) is ttys0; the other is not used." width="300" height="225" /></a><p class="wp-caption-text">The serial port on the right (JP603) is ttys0</p></div>
<p>The pinout for the serial port is, as pictured, from bottom to top: ground, transmit, receive, unknown, Vcc, unknown.</p>
<p><span id="more-206"></span>In order to flash the firmware, you&#8217;ll need to get access to the Adam2 bootloader. The easiest way to do this is to turn off the router, hold down the reset button, and turn the router back on. Keep holding the reset button until you see the Power and Internet LEDs stay on; this indicates that the router has dropped into the Adam2 shell prompt.</p>
<p>The prompt can be accessed via the serial connection, or via FTP. To connect via FTP, simply FTP to the router and login with the user name of &#8216;adam2&#8242; and password &#8216;adam2&#8242;. The default adam2 IP address is 192.168.0.1. If this IP address does not work, you will have to connect via the serial connection and issue the following command:</p>
<blockquote><p>printenv<br />&nbsp;</p></blockquote>
<p>Look for the variable named &#8216;my_ipaddress&#8217;, which will list the Adam2 IP.</p>
<p>Once you have access to Adam2 (either via FTP or serial), you will have to set a couple of environment variables. First, you need to create a partition to install OpenWRT to. The existing partitions can be viewed by issuing the printenv command at the serial console. They are:</p>
<blockquote><p>mtd2                  0&#215;90000000,0&#215;90010000<br />
mtd1                  0&#215;90010000,0x900d0000<br />
mtd0                  0x900d0000,0x903e0000<br />
mtd4                                   0x903e0000,0x903f0000<br />
mtd3                  0x903f0000,0&#215;90400000</p></blockquote>
<p>Since the OpenWRT image contains both the kernel and the file system, your new partition should cover both the existing kernel and file system partitions (mtd1 and mtd0, respectively). To create the partition via the serial console, run:</p>
<blockquote><p>setenv mtd5,0&#215;90010000,0x903f0000<br />&nbsp;</p></blockquote>
<p>Or via the FTP connection:</p>
<blockquote><p>quote SETENV mtd5,0&#215;90010000,0x903f0000<br />&nbsp;</p></blockquote>
<p>You will also have to set the MAC_PORT environment variable in order to enable the internal ethernet port. From the serial console:</p>
<blockquote><p>setenv MAC_PORT,0<br />&nbsp;</p></blockquote>
<p>Or from FTP:</p>
<blockquote><p>quote SETENV MAC_PORT,0<br />&nbsp;</p></blockquote>
<p>With that done, you&#8217;re ready to FTP your new firmware to the router; other <a href="http://www.nettwerked.net/actiontec.html">reports</a> on the GT-701 and GT-704 have noted that the ActionTec recovery utility sends a message to UDP port 5035 (actually, two messages in the case of the GT-704). However this appears to be simply for discovery of the router&#8217;s IP address and is not necessary for loading firmware onto the router.</p>
<p>Go to OpenWRT&#8217;s download page, and get the latest release of openwrt-ar7-squashfs.bin (currently <a href="http://downloads.openwrt.org/kamikaze/8.09.1/ar7/">Kamikaze 8.09.1</a>). If you haven&#8217;t already, FTP to the router and login with the previously described credentials. You will need to issue the following commands:</p>
<blockquote><p>ftp<strong>&gt;</strong> <strong>binary</strong><br />
<em>200 Type set to I.</em><br />
ftp<strong>&gt;</strong> <strong>quote MEDIA FLSH</strong><br />
<em>200 Media set to FLSH</em><br />
ftp<strong>&gt;</strong> <strong>quote STOR openwrt-ar7-squashfs.bin mtd5</strong><br />
<em>226 Transfer complete</em><br />
ftp<strong>&gt;</strong> <strong>quote REBOOT</strong></p></blockquote>
<p>It will take the router a minute or two to clear the flash and load the firmware. Note that you do NOT want to enter passive mode for the file transfer; doing so will slow the file transfer significantly (it would have taken about a week by my estimation). You can monitor the router&#8217;s progress via the serial console, or by watching the file transfer in Wireshark. Once the firmware transfer is complete, the reboot command will reboot the router, and you should have a working OpenWRT install:</p>
<blockquote>
<pre>Please press Enter to activate this console.

BusyBox v1.11.2 (2009-05-28 18:22:45 UTC) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 KAMIKAZE (8.09.1, r16278) ----------------------------
  * 10 oz Vodka       Shake well with ice and strain
  * 10 oz Triple sec  mixture into 10 shot glasses.
  * 10 oz lime juice  Salute!
 ---------------------------------------------------
root@OpenWrt:/#</pre>
</blockquote>
<p>So far everything checks out OK using the generic firmware image; ethernet and wireless works, opkg updates and installs packages fine. The only downside is that the wireless doesn&#8217;t seem to support WPA, possibly due to the poor <a href="http://acx100.sourceforge.net/">open source</a> support from TI. I haven&#8217;t tested the USB port, but it appears to be a client-only USB device, so it&#8217;s of limited use.</p>
]]></content:encoded>
			<wfw:commentRss>http://hackingwithgum.com/2009/09/17/installing-openwrt-on-the-actiontec-gt-704wg/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
