This is sort of a second attempt at this. I got the XWR 100 the other day and decided to root the NVG510 (AT&T version) to enable bridge mode (i.e. do only ADSL2+ and pass the data letting the router do authentication and any routing) hoping to get more control over the protocols that confuse it (most do). It worked, but then promptly went south. I’m not sure why, but mostly likely it did something on top of just the DSL like trying to get itself an IP. I guess how well that setup in general works for them is still debated with some having no issues and some claiming it’s super fragile, it’ll probably keep going like that until the last nvg510s are finally gone.
After sorting things back to normal(ish), I decided to instead go with a lighter IP passthrough which accomplishes roughly the same thing. I also wanted the XWR100 to run OpenWrt though.Â OpenWrtÂ is a third party open source firmware for routers (mostly, really anything embedded) which can do a lot nicer things including a lot of things that aren’t related to routing. I had to quit using it a few years ago lacking a good way to set it up with a different modem, but wanted it back now that I’m putting a better router in anyway.
Looking at their lists there is a versionÂ for it, but they only distribute source. I didn’t particularly like the idea of building it. Or rather I like the *idea* well enough, but I’m not so positive I’d get it all correct and since it’s flashed to the memory of the router getting it wrong can make it hard or impossible to fix again. After looking around, I found a build from around the same version (here’s a copy) and when not finding much else except building I went with it.
Since it’s a factory type image, it can be flashed from stock firmware just by itself from the stock firmware (some are only for upgrading from an existing install or need an initial ‘crack’ flash to exploit past blocks on flashing it. This appears open to start with). It’s also possible via u-boot, it’s installed bootloader, but I didn’t look into that past that it seemed possible supposing the original flash fails. Besides “be sure you have the correct firmware”, the only other solid advice seems to be to make sure to do it over a regular cable (no wifi or such) and to do a factory reset before and after flashing. Seems simple enough.
Doing a factory reset on this router is the same as on many others, what’s known as 30-30-30 – hold down the reset button for 30 seconds, disconnect power (still holding the button), wait 30 seconds, reconnect power (still hold it), wait 30 seconds. I think it was first the method on some broadcom chip based router, but then all of them and now on quite a lot that have other chipsets entirely. If it sounds like you’ll be holding down a reset button for a full minute and a half, you’re right. Try to take it as a lesson in how impatent we’ve grown with life in general or something, but do suck it up and do it – it’s not that long and it clears some data from it that could otherwise cause major issues (among a whole slew of other more or less likely problems).
Here is what the back of the router looks like. The little red dot inside the hole next to the power on the right is what needs to be held down. I broke off a piece of a matchstick to hold it down with a little more comfortably and did exactly as described. The light next to the power button will blink a bit when first pressing it, then stop but start again around 30 seconds. Don’t count on that, just time it. After the second 30 and replugging it, it’ll start blinking off and on, then stop and again restart a little before the final 30 is up.
After that, plug in a computer (as on the picture) into the port labeled “1” among the four labeled “Ethernet”. After a brief while, your computer should get an IP address and claim to be on a network. It will likely point out that there is no internet through it, which is true. If you’re on a PC, you can open a command prompt (start->run->”cmd”) and run ipconfig (just type it and press enter) to list some stats about the network connections. Under the Ethernet adapter, it should list an IP address, like:
If the Default Gateway isn’t 192.168.1.1, something is wrong here as that’s what the router would default to being and give you an IP somewhere in 192.168.1.x. You can force it to try to ask again by doing “ipconfig /release /renew” or unplug it, wait a second and plug it back in. Once it’s noticed it, open a browser and go to 192.168.1.1. It should pop up the normal start screen.
Clicking the center symbol for router and the “advanced” button next to “Firmware version” goes to the firmware upgrade screen. Most things in this interface is placed kind of at random.
Since I have a file, I’ll click “Choose File”, pick my .bin from before and click start.The this will take a while. And sometimes, it’ll pause a bit. Do not, however, mess with it! It has to finish on its own, say it’s done and then sit there and flash its lights for a while until it’s completely done and all has been written to the flash.Â
You will get extremely nervous doing this. Several times, you’ll be sure something has gone wrong. You’ll be unable to convince yourself it hasn’t. Moral support from others or practice doesn’t help. The normal procedure is to just sit there all jittery peeking at all the things going on (very few), looking away for a split second sometimes but then back until it’s finished.
Once done, 30-30-30 again. Refresh.
Tada! The root password is admin, needs to be changed. The interface for setup is pretty average looking, a little less fancy in terms of pretty pictures but all the “normal” setup normally there telling it to either take over the modem (if it’s in bridge mode) or receive an IP from the modem and run over it. I set the modem to IP passthrough (assign public address to specific MAC, the one of the router), giving this router the public IP although the modem still handles authorization – at&t insists it appears – and thinks it might give out other local IPs but nothing is hooked to is so that won’t actually happen. I ended up just assigning it static to what the modem has been assigned since a year and a half ago because I wanted to bypass the DNS setting.
I could technically do that another way, but I’ll do it later – so much to explore. A small confusion was the modem won’t switch it’s own IP or consider another range, so this one had to scoot over to 192.168.2, but no big deal. I didn’t find the place for enabling the WPA, but it turns out the tab was right there in the wireless settings and I managed to miss it somehow. Even with that, I could ssh into it and modify it with their Unified Configuration Interface, a database accessible from the command line with “uci” followed by show, list, set, etc to modify most of what is running. There’s also opkg (also under software in the web interface), a package manager that can download and install tons of various upgrades like providing and using VPNs, most of the major transfer protocols if I hook up a USB drive to it (otherwise too, but there’s only eight megs of storage..), run a phone switch or plain voip phone and so on. There’s such piles of stuff, most of it very small and extremely tightly written too. I’ll probably continue to explore for a while, though before I even started I wanted a list of the packages and just typed “ipkg list” (it’s similar to debians dpkg, the other ipkg, etc). I wanted it on my side so I could browse it outside command prompt and then realized I could really just do “opkg list >/www/opkg.txt” and load “192.168.2.1/opkg.txt” into the web browser to view it. And why couldn’t I before? It’s mindblowing what small freedoms a stock router (which 99%+ of the time runs linux too, the only thing is it’s hard to get into because it’s locked and when you do, it’s not very built out because it’s just one specific model that doesn’t work with anyone elses projects, not a well-used platform tons of people write for).