<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hsmm on Andrew's Memory Blog</title><link>https://andrewmemory.acornwall.net/tags/hsmm/</link><description>Recent content in Hsmm on Andrew's Memory Blog</description><generator>Hugo -- gohugo.io</generator><image><url>https://andrewmemory.acornwall.net/img/rss_image.png</url><title>Hsmm on Andrew's Memory Blog</title><link>https://andrewmemory.acornwall.net/</link></image><language>en</language><managingEditor>andrewmemoryblog@gmail.com (Andrew's Memory Blog)</managingEditor><webMaster>andrewmemoryblog@gmail.com (Andrew's Memory Blog)</webMaster><copyright>Copyright 2009--2025</copyright><lastBuildDate>Mon, 01 Sep 2014 01:47:09 -0700</lastBuildDate><atom:link href="https://andrewmemory.acornwall.net/tags/hsmm/index.xml" rel="self" type="application/rss+xml"/><item><title>Trying to resurrect a dead Linksys WRT54GS router</title><link>https://andrewmemory.acornwall.net/blog/2014-09-01-trying-to-resurrect-a-dead-linksys-wrt54gs-router/</link><pubDate>Mon, 01 Sep 2014 01:47:09 -0700</pubDate><author>andrewmemoryblog@gmail.com (Andrew's Memory Blog)</author><guid>https://andrewmemory.acornwall.net/blog/2014-09-01-trying-to-resurrect-a-dead-linksys-wrt54gs-router/</guid><description>&lt;p&gt;I recently went through heroic efforts to bring a dead Linksys WRT54GS router back to life. These routers are great for &lt;a href="http://www.broadband-hamnet.org/%20" target="_blank" rel="noreferrer"&gt;Broadband Hamnet&lt;/a&gt; so I really wanted to get it working, but no dice.&lt;/p&gt;
&lt;p&gt;But I don&amp;rsquo;t want to forget what I did, so I&amp;rsquo;m documenting it here.&lt;/p&gt;
&lt;h2 class="relative group"&gt;Fix the hardware
&lt;div id="fix-the-hardware" class="anchor"&gt;&lt;/div&gt;
&lt;span
class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
&lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#fix-the-hardware" aria-label="Anchor"&gt;#&lt;/a&gt;
&lt;/span&gt;
&lt;/h2&gt;
&lt;p&gt;The first problem was that the router made a strange buzzing sound. I &lt;a href="http://www.skifactz.com/wifi/disassemble_WRT54G.htm" target="_blank" rel="noreferrer"&gt;opened the router&lt;/a&gt; and discovered that LX2 in particular, but also LX1 (two chokes at the power supply input) were actually vibrating when I put my finger on them. In addition, the capacitors near it were hot to the touch.&lt;/p&gt;
&lt;p&gt;This was described &lt;a href="http://hardforum.com/showthread.php?t=1591910" target="_blank" rel="noreferrer"&gt;in this post as an electrolytic capacitor problem&lt;/a&gt;. Sure enough, when I replaced CX2 with a new 220 uF 25 V electrolytic capacitor, the device settled down. At this point, the power LED was flashing (a bad sign) but at least it was now flashing at a regular speed. While I was soldering, I took the time to add a 12-pin header to the &lt;a href="http://www.tiaowiki.com/w/Debrick_Routers_Using_JTAG_Cable#Locate_the_JTAG_Pins.2FPads_on_the_Router" target="_blank" rel="noreferrer"&gt;router&amp;rsquo;s JTAG port&lt;/a&gt;.&lt;/p&gt;
&lt;h2 class="relative group"&gt;Reflash the Firmware
&lt;div id="reflash-the-firmware" class="anchor"&gt;&lt;/div&gt;
&lt;span
class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
&lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#reflash-the-firmware" aria-label="Anchor"&gt;#&lt;/a&gt;
&lt;/span&gt;
&lt;/h2&gt;
&lt;p&gt;Following the &lt;a href="http://www.dd-wrt.com/phpBB2/viewtopic.php?t=51486" target="_blank" rel="noreferrer"&gt;unbrick article here&lt;/a&gt;, I wasn&amp;rsquo;t able to ping the router. No matter what, I&amp;rsquo;d get &amp;ldquo;destination host unreachable&amp;rdquo; - even though my IP was the same as the router, ostensibly. So I figured flashing was required.&lt;/p&gt;
&lt;p&gt;I started out by trying to get a SEGGER J-Link talking to the JTAG port. I used the &lt;a href="http://www.jtagtest.com/pinouts/wrt54" target="_blank" rel="noreferrer"&gt;pinouts for the WRT54G described here&lt;/a&gt; for the WRT54GS, and the &lt;a href="http://www.segger.com/interface-description.html" target="_blank" rel="noreferrer"&gt;pinouts for the J-Link described here&lt;/a&gt;. Note that RESET on the J-Link is nSRST on the WRT54GS.&lt;/p&gt;
&lt;p&gt;After I&amp;rsquo;d done that, I wasn&amp;rsquo;t able to get the J-Link talking. It looks as if the J-Link software wants to talk only to devices it knows about - or at least, that&amp;rsquo;s all I could figure out about it. Trying to set it to MIPS mode to impersonate EJTAG didn&amp;rsquo;t yield any success either.&lt;/p&gt;
&lt;p&gt;So it was time for a different option. I didn&amp;rsquo;t have a parallel port handy, but I did have a Raspberry Pi. And a wonderful individual has taken the time to &lt;a href="https://github.com/oxplot/tjtag-pi" target="_blank" rel="noreferrer"&gt;port tjtag to the Raspberry Pi&lt;/a&gt;. I cloned the Git repo to my Pi and built it. I had to use:&lt;/p&gt;
&lt;figure class="highlight"&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-" data-lang=""&gt;git clone git://github.com/oxplot/tjtag-pi.git&lt;/code&gt;&lt;/pre&gt;
&lt;/figure&gt;
&lt;p&gt;to grab the Git repo, since https wants an auth key and I don&amp;rsquo;t have one. After that I followed the &lt;a href="https://github.com/oxplot/tjtag-pi" target="_blank" rel="noreferrer"&gt;Setup instructions&lt;/a&gt; and got tjtag built.&lt;/p&gt;
&lt;p&gt;I connected things up as described in the wiring diagram, and had success! I was able to probe the router. (I had to run sudo ./tjtag -probeonly instead of just ./tjtag.)&lt;/p&gt;
&lt;p&gt;Then I went off to the &lt;a href="http://www.tiaowiki.com/w/Debrick_Routers_Using_JTAG_Cable#Debrick_it.21" target="_blank" rel="noreferrer"&gt;tjtag instructions here&lt;/a&gt;. The first few times I did:&lt;/p&gt;
&lt;figure class="highlight"&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-" data-lang=""&gt;sudo ./tjtag -backup:cfe&lt;/code&gt;&lt;/pre&gt;
&lt;/figure&gt;
&lt;p&gt;I got different results. It appears that tjtag on the Pi spends so much time sending output to the console that it messes up its timing. So I redirected the output to /dev/null, and after that I got consistent backups.&lt;/p&gt;
&lt;p&gt;Once I had an nvram backup, I tried erasing the nvram:&lt;/p&gt;
&lt;figure class="highlight"&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-" data-lang=""&gt;sudo ./tjtag -erase:nvram&lt;/code&gt;&lt;/pre&gt;
&lt;/figure&gt;
&lt;p&gt;This worked, but didn&amp;rsquo;t solve my problem. So I thought I might have had a corrupted CFE. I located the &lt;a href="http://mirror.debrick.nl/index.php?dir=cfe%20collection%20project/Linksys/G/WRT54GS/&amp;amp;sort=size&amp;amp;sort_mode=dhttp://" target="_blank" rel="noreferrer"&gt;CFE for my router here&lt;/a&gt; and modified it to have my IP addresses using &lt;a href="http://www.bitsum.com/files/imgtool_nvram.zip" target="_blank" rel="noreferrer"&gt;imgtool_nvram&lt;/a&gt;. I used the following command:&lt;/p&gt;
&lt;figure class="highlight"&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-" data-lang=""&gt;imgtool_nvram.exe wrt54gs1.0-CFE.
BIN et0macaddr=00:11:22:33:44:55 il0macaddr=00:11:22:33:44:56&lt;/code&gt;&lt;/pre&gt;
&lt;/figure&gt;
&lt;p&gt;(substituting my real MAC address and one higher than it.) Then I dumped that back on the Pi as CFE.BIN, and did:&lt;/p&gt;
&lt;figure class="highlight"&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-" data-lang=""&gt;sudo ./tjtag -flash:cfe &amp;gt; /tmp/out&lt;/code&gt;&lt;/pre&gt;
&lt;/figure&gt;
&lt;p&gt;That worked, but still no joy in Mudville after I did the flash. No matter what, when I pinged I got destination unreachable. I wondered if it was Windows messing with me, so I booted to Kali to see what happened there. Still no dice.&lt;/p&gt;
&lt;p&gt;Finally, I thought it might be a bad kernel, so I nuked it:&lt;/p&gt;
&lt;figure class="highlight"&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-" data-lang=""&gt;sudo ./tjtag -erase:kernel&lt;/code&gt;&lt;/pre&gt;
&lt;/figure&gt;
&lt;p&gt;Even with that, the router&amp;rsquo;s still not responding. Other than re-reflashing the CFE on the assumption that the bad kernel corrupted it, I&amp;rsquo;m out of ideas.&lt;/p&gt;
&lt;p&gt;Drat, I thought I had it when I saw the instructions about &lt;a href="http://www.dd-wrt.com/wiki/index.php/Recover_from_a_Bad_Flash" target="_blank" rel="noreferrer"&gt;setting the address with arp&lt;/a&gt;. (arp -s 192.168.1.1 aa-bb-cc-dd-ee-ff if you&amp;rsquo;re on Windows.) But even when I did that (using the MAC address that I flashed), I still had nothing. I even stuffed Wireshark on the end to listen for any packets. He&amp;rsquo;s dead, Jim.&lt;/p&gt;</description></item><item><title>Connecting to HSMM-Mesh and the Internet from a laptop</title><link>https://andrewmemory.acornwall.net/blog/2013-08-03-connecting-to-hsmm-mesh-and-the-internet/</link><pubDate>Sat, 03 Aug 2013 17:39:03 -0700</pubDate><author>andrewmemoryblog@gmail.com (Andrew's Memory Blog)</author><guid>https://andrewmemory.acornwall.net/blog/2013-08-03-connecting-to-hsmm-mesh-and-the-internet/</guid><description>&lt;p&gt;Note: This page does not discuss connecting HSMM mesh to the Internet. It&amp;rsquo;s just about talking to the mesh and the Internet from the same client device.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve been playing with &lt;a href="http://hsmm-mesh.org" target="_blank" rel="noreferrer"&gt;hsmm-mesh&lt;/a&gt; lately on my laptop. Up until now, when I&amp;rsquo;ve done this I could either view the HSMM mesh or the Internet, but not both. There were a couple of reasons:&lt;/p&gt;
&lt;p&gt;1. My routing tables didn&amp;rsquo;t know how to direct traffic to the HSMM mesh network.&lt;/p&gt;
&lt;p&gt;To solve this, I needed to tell the laptop to send traffic in the 10.*.*.* range to the HSMM mesh rather than to the default gateway:&lt;/p&gt;
&lt;figure class="highlight"&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-" data-lang=""&gt;ip route add 10.0.0.0/8 via 172.27.0.1 dev eth0&lt;/code&gt;&lt;/pre&gt;
&lt;/figure&gt;
&lt;p&gt;2. I had to make sure things were resolving right for DNS (in my /etc/resolv.conf):&lt;/p&gt;
&lt;figure class="highlight"&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-" data-lang=""&gt;domain austin.tx.us.mesh
search austin.tx.us.mesh
nameserver 172.27.0.1
nameserver 192.168.1.1&lt;/code&gt;&lt;/pre&gt;
&lt;/figure&gt;
&lt;p&gt;DNS is still a bit of an issue. 172.27.0.1 resolves anything in *.austin.tx.us.mesh, so my local network is never found. But at least I can browse the web and HSMM.&lt;/p&gt;</description></item></channel></rss>