<?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; Asus</title>
	<atom:link href="http://hackingwithgum.com/tag/asus/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>Flashing Asus WL-520GU Firmware Via TFTP</title>
		<link>http://hackingwithgum.com/2009/09/11/flashing-asus-wl-520gu-firmware-via-tftp/</link>
		<comments>http://hackingwithgum.com/2009/09/11/flashing-asus-wl-520gu-firmware-via-tftp/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 01:27:26 +0000</pubDate>
		<dc:creator>cheffner</dc:creator>
				<category><![CDATA[Routers]]></category>
		<category><![CDATA[Asus]]></category>
		<category><![CDATA[OpenWRT]]></category>
		<category><![CDATA[Router]]></category>

		<guid isPermaLink="false">http://hackingwithgum.com/?p=199</guid>
		<description><![CDATA[Today a friend and I were struggling to re-flash an Asus WL-520GU with OpenWRT via TFTP. The router had been previously flashed with DD-WRT, and of course the Web-based firmware update did not recognize the OpenWRT trx file as a valid image (there is currently no OpenWRT .bin file available for the WL-520GU); this left [...]]]></description>
			<content:encoded><![CDATA[<p>Today a friend and I were struggling to re-flash an Asus WL-520GU with OpenWRT via TFTP. The router had been previously flashed with DD-WRT, and of course the Web-based firmware update did not recognize the OpenWRT trx file as a valid image (there is currently <a href="http://downloads.openwrt.org/kamikaze/8.09.1/brcm-2.4/">no</a> OpenWRT .bin file available for the WL-520GU); this left TFTP as the next best option for flashing the firmware.</p>
<p>Usually, it is helpful to have a serial console connected to the router while doing a TFTP transfer, so that you can see when the bootloader (CFE, in the case of the Asus) is listening for TFTP connections, as with the Linksys WRT54G:</p>
<blockquote><p>CFE version 1.0.37 for BCM947XX (32bit,SP,LE)<br />
Build Date: Thu Mar 24 16:31:45 CST 2005 (motoplayer@cvs.gemtek.com.tw)<br />
Copyright (C) 2000,2001,2002,2003 Broadcom Corporation.</p>
<p>Initializing Arena<br />
Initializing Devices.<br />
et0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.90.39.0<br />
CPU type 0&#215;29008: 200MHz<br />
Total memory: 8192 KBytes</p>
<p>Total memory used by CFE:  0&#215;80300000 &#8211; 0&#215;80399700 (628480)<br />
Initialized Data:          0x8032F870 &#8211; 0x80331F50 (9952)<br />
BSS Area:                  0x80331F50 &#8211; 0&#215;80333700 (6064)<br />
Local Heap:                0&#215;80333700 &#8211; 0&#215;80397700 (409600)<br />
Stack Area:                0&#215;80397700 &#8211; 0&#215;80399700 (8192)<br />
Text (code) segment:       0&#215;80300000 &#8211; 0x8032F870 (194672)<br />
Boot area (physical):      0x0039A000 &#8211; 0x003DA000<br />
Relocation Factor:         I:00000000 &#8211; D:00000000</p>
<p>Committing NVRAM&#8230;done<br />
Device eth0:  hwaddr 00-40-77-BB-55-10, ipaddr 192.168.1.1, mask 255.255.255.0<br />
gateway not set, nameserver not set<br />
Reading ::</p></blockquote>
<p>Unlike the WRT54G however, the WL-520GU bootloader did not specify its IP address, and the usual 192.168.1.1 did not work; watching the network traffic while attempting the TFTP transfer revealed that this address was not responding to ARP requests at all. Additionally, while the WRT54G waits for a TFTP connection for a few seconds before timing out, the WL-520GU only listens for about one second before timing out and loading the kernel. Such a short time period, coupled with not knowing the bootloader&#8217;s IP address, made flashing via TFTP nearly impossible.</p>
<p>The solutions to both these problems were found (directly and indirectly) through DD-WRT&#8217;s WL-520GU <a href="http://www.dd-wrt.com/wiki/index.php/Asus_WL-520GU">Wiki page</a>. By holding down the reset button on the router on boot up, the bootloader will enter hardware restoration mode and perpetually listen for TFTP connections rather than continuing with the boot process. This can be confirmed by watching the serial console output; you should see repeating messages that read: &#8220;Reading :: Failed.: Timeout occured&#8221;. The power LED should also be blinking slowly when the router is in hardware restoration mode.</p>
<p>Once you have the router constantly listening for TFTP connections, you still need to know the IP. This was discovered by downloading the Asus <a href="http://support.asus.com/download/download.aspx?SLanguage=en-us&amp;model=WL-520GU">restoration utility</a> and monitoring the network traffic it generated. This revealed that the router&#8217;s bootloader IP address was 192.168.1.49. With the router in hardware restoration mode and knowledge of the bootloader IP address, it was easy to upload the firmware via TFTP:</p>
<blockquote><p>tftp&gt; mode binary<br />
tftp&gt; trace<br />
tftp&gt; connect 192.168.1.49<br />
tftp&gt; put openwrt-brcm-2.4-squashfs.trx<br />
sent DATA &lt;block=1, 512 bytes&gt;<br />
received ACK &lt;block=1&gt;<br />
sent DATA &lt;block=2, 512 bytes&gt;<br />
received ACK &lt;block=2&gt;<br />
&#8230;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://hackingwithgum.com/2009/09/11/flashing-asus-wl-520gu-firmware-via-tftp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
