You are here

Using HSMM mesh Linksys WRT54GS v1 as web page server

1 post / 0 new
wa2ise
wa2ise's picture
Using HSMM mesh Linksys WRT54GS v1 as web page server

Repurposing a couple of HSMM mesh flashed Linksys WRT54GS v1 routers I had.  These have 8MB of flash, which provides a goodly amount of left over flash memory one could use for small web pages as "services".  Oh, you could use a regular computer as a server, but if you only have a few small pages that are purely html code, putting them into the router's flash in its /www directory would be easier and not require extra hardware.  I used SmarTTY to get into the router's flash memory.  You put in the box "host name" the IP address the router is at in your network, like 192,168.1.251:2222  (the 2222 is a port that gets you in). Your user name is "root", and the password is the same one you use to get into the setup page in HSMM.  Once in, cd /www and then you can upload html files.   Be careful you don't waste too much flash (when you edit or delete a file, the old file still ties up flash memory along with the new file).  Only way to get this flash memory is to reflash the router, which undoes everything you did back to default state.  You should test your html code on your PC first to debug it.  If this page needs to be updated frequently, this is not a good solution for it. 

You then need to get into the HSMM setup page, and fill in port forwarding options with both for "interfaces". TCP for "type", 8080 for "outside port", "localnode" for the "LAN IP", and 8080 for "Lan port".  (There may be other choices that will work, but these worked for me)  Click "add", then SAVE CHANGES  Then under "advertised services"  put the name you want your web page to be known as (keep it short), like "Ethernet RJ45 plug pinout",  check mark the "link" box, then in the box to teh right of the checkbox you put "http", and in the box to the right of that "8080" and then the next right box, the name of the html file you saved in /www with SmarTTY above.  click "add" and then SAVE CHANGES. 

Now, when you do a "mesh status" you should now see your new service to the right of your "local hosts" under "services". 

I have a couple of WRT54GS V1's that I connected together with DtD, and to my Ubiquiti nodes too.  I haven't had trouble with DtD on Linksys (oh I did have trouble with a bad cable I used for the DtD connection).  
Go to http://www.broadband-hamnet.org/documentation/202-dtd-linking-on-linksys.html to see how to do this. 

I modified the vlan file below to have dedicated ports for DtD, and disabled the WAN.  And set the LAN IP to 192.168.1.(your choice) with the DHCP disabled.  And to make the "internet" WAN ethernet jack become an extra DtD jack (which I used to daisy chain the DtD network), edited the file /etc/vlan with vi, using SmarTTY program.  changed the lines

config switch eth0
    option vlan0    "1 2 3 4 5*"    (these are the LAN ports, port 5 is the router CPU here)
    option vlan1    "0 5"          (this is the WAN internet connection, port 5 is the router CPU here)


 

to become

config switch eth0
    option vlan0    "1 2 3 5*"
 #  option vlan1    "0 5"      (this comments this line out)
    option vlan2    "0t 4t 5t"

Then saved and exited, then went to
open http://localnode:8080/cgi-bin/setup in your web browser. Click save changes, even if you didn't change anything, and then click reboot. Did this to both routers, and connected their DtD ports together, and one of the left over DtD ports to my Ubiquiti node, that is tunneled to other nodes elsewhere in the world.  Did a "mesh status" on the Ubiquiti node, and I now see the two Linksys routers as DtD linked nodes, to teh far upper right of the mesh status page.  Along with the services I created. 

Something to watch out for, if you have a pair of the above routers fed by a single house LAN cable, and a single DtD cable, be sure you connect both those cables to one of the routers.  Not one to one router and the other to the other, things got real slow that way and I suppose tails were getting chased. 
 

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer