<?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>dd-wrt &#8211; Everything is Broken</title>
	<atom:link href="https://play.datalude.com/blog/tag/dd-wrt/feed/" rel="self" type="application/rss+xml" />
	<link>https://play.datalude.com/blog</link>
	<description>Efficiency vs. Inefficiency, in a no-holds barred fight.</description>
	<lastBuildDate>Wed, 07 Apr 2010 04:18:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>
	<item>
		<title>Adventures in unbricking a router</title>
		<link>https://play.datalude.com/blog/2010/04/adventures-in-unbricking-a-router/</link>
					<comments>https://play.datalude.com/blog/2010/04/adventures-in-unbricking-a-router/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Wed, 07 Apr 2010 04:15:10 +0000</pubDate>
				<category><![CDATA[General IT]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[dd-wrt]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[openwrt]]></category>
		<category><![CDATA[router]]></category>
		<category><![CDATA[SimpleHTTPServer]]></category>
		<guid isPermaLink="false">http://play.datalude.com/blog/?p=196</guid>

					<description><![CDATA[Another fantastic illustration of how Linux 'gets the job' done. Although sometimes the operator (ahem) is sometimes a bit slow on the uptake. Anyway, I had a Linksys WRT54G router in which the wireless unit had blown up after a power outage and surge. Gotta love the Philippines. I had dd-wrt on it, but decided ... <a title="Adventures in unbricking a router" class="read-more" href="https://play.datalude.com/blog/2010/04/adventures-in-unbricking-a-router/" aria-label="Read more about Adventures in unbricking a router">Read more</a>]]></description>
										<content:encoded><![CDATA[<p>Another fantastic illustration of how Linux 'gets the job' done. Although sometimes the operator (ahem) is sometimes a bit slow on the uptake.</p>
<p>Anyway, I had a Linksys WRT54G router in which the wireless unit had blown up after a power outage and surge. Gotta love the Philippines. I had dd-wrt on it, but decided to try out OpenWRT. Well lets just say that OpenWRT isn't to my taste. I wanted something which worked more or less immediately, rather than poring over documentation trying to figure out how to get the WAN interface up via a command line.</p>
<p>So I dropped the router into a drawer until today, when I needed to use it for something (without the need for wireless). Well of course when I needed it, it wouldn't boot. In fact I couldn't even ping it. This is bad news.</p>
<p>I tracked down an internet post which mentioned that if I held the reset button while booting, the router would go into admin mode, which meant I could ping it. I did this and it worked. I read elsewhere that in order to flash it with tftp, I needed to do so when the ping response time was 100ms, before it dropped to 64ms. Exciting stuff. I set up the tftp flashing machine and tried, possibly 50 or 60 times, to flash back ddwrt. No luck. For reference, here is the one liner:</p>
<pre>echo -e "binary\nrexmt 1\ntimeout 60\ntrace\nput ddwrt.bin\n" | tftp 192.168.1.1
</pre>
<p>I did an nmap scan of the router and found that port 23 was open, so I managed to telnet into it. I couldn't connect the wan interface (as previously noted), but I had a command prompt. No SSH, no web interface. So how to get the ddwrt.bin file onto the router via telnet?</p>
<p>Here's how: On my PC, at 192.168.1.50, I went to the directory which held the ddwrt.bin file. At the command prompt I typed</p>
<pre>python -m SimpleHTTPServer</pre>
<p>This serves up the current directory over HTTP, port 8080.</p>
<p>In my router telnet session I went to the /tmp directory (the only place with enough space for the file) and typed</p>
<pre>wget http://192.168.1.50:8080/ddwrt.bin</pre>
<p>After a few seconds, the file was there! Alright!</p>
<p>Still in the router, I did</p>
<pre><code>mtd -r write dd-wrt.bin linux</code></pre>
<p>The router whirred for a while, rebooted and &#8230; ddwrt was back, in all its web-interfacy autoconfigurating glory.</p>
<p>What a great trick with SimpleHTTPServer. Shame I wasted hours on the tftp approach. Incidentally, there's a similar tool which will let people upload files to your computer via HTTP, called droopy.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://play.datalude.com/blog/2010/04/adventures-in-unbricking-a-router/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
