Verizon MiFi open NAT for XBOX Live with DD-WRT

Recently a friend of mine purchased a Verizon Novatel MiFi 2200. This was his only option for home broadband, and for playing XBOX Live.

The MiFi has built in port forwarding options for common tasks, but does not allow custom ports or applications to be added. There was no option for XBOX Live, and no amount of tweaking allowed the XBOX to connect properly. You could play just fine, but partying up was impossible.

After I thought all hope was lost I read that some users had had success with a device called a CradlePoint. The device was rather pricey, and just not an option for something that wasn’t a sure thing.

After thinking about it off and on for about a month I came to the conclusion that the CradlePoint had to be using the MiFi as a USB modem, a feature that is easily accomplished with DD-WRT. So I grabbed an old router (with a USB port), flashed DD-WRT, set everything up an violla! It worked! Yes, there are some latency issues, but the result is a very playable XBOX live experience.

Now, onto the important part, how to do it.

Required materials:

  • Verizon MiFi (this will work with other carriers MiFi devices, you will just need to change the connection settings)
  • A USB cable to plug the MiFi into the router (the one that came with the MiFi is just fine)
  • A router supported by DD-WRT with at least 1 USB port. (I used a Buffalo WZR-HP-G300NH router)

The Setup:

  1. Connect to the MiFi and go to the settings panel (192.168.1.1 in a browser default password is admin)
  2. Go to Advanced -> Diagnostics -> System Information
  3. Write down the MDN number. You are now done with the MiFi
  4. Flash DD-WRT onto the router
  5. On the DD-WRT router, navigate to 192.168.1.1
  6. Select the services tab, then USB
  7. Enable at least the first three items. (Newer versions will just be the first item, basically anything related to enabling USB support and not mass storage ect.)
  8. Go back to the set-up page
  9. Select “3G / UMTS” for Connection type under the WAN connection
  10. Dial number is #777
  11. Your username is <MDN>@vzw3g.com (replace <MDN> with the number you found in step 1)
  12. Password is vzw
  13. Leave APN and PIN blank.
  14. Save settings
  15. Apply settings
  16. Reboot the router
  17. Plug the MiFi into the router with the usb cord.
  18. Enjoy a nice XBOX Live experience :)

NOTE:

If you still can’t get open NAT enable uPnP or forward the necessary ports.

Conclusion:

Ideally a usb modem paired with the same router set-up would have been much better than the MiFi. However, if you are stuck with a MiFi, it works, and that’s all that matters.

WordPress PHP memory usage – a proposal

Recently I switched hosts and upon transferring my sites quickly noticed that I was having some PHP: out of memory errors.

I only use the bare minimum plugins and have all of my themes optimized to limit PHP usage. I don’t use widgets, and if it can be hard coded using plain html, it is.

But still, I was out of memory. After some research I found that most of my issues were occurring in the admin panel, and not the main site. While this was a relief, this did leave me with limited admin functionality.

I was able to correct the issue by increasing my php memory limit from 32mb to 64mb, but I hardly feel this is a solution.

Why is wordpress using so much memory? This is a question that I feel needs investigated.

A Solution: Allow users to put together a custom wordpress install, just enabling features that are needed for that particular blog.

I do not need al of the feeds on the admin homepage, I do not need template editors, I do not need widgets, I do not need trackbacks or pingbacks, I do not need a plugin editor…. The list goes on.

So why not allow advanced users the option to install what would essentially a vanilla version of wordpress? Sure, I could make these changes now, but it makes updating a pain because everything would have to be re-applied.

For now this is just something to think about, but if you have any input as to how I am wrong (as I’m sure I am) feel free to leave a comment.

Updated: Asus RT-N16, initial thoughts

UPDATE:

After testing several builds of DD-WRT I was unable to get port forwarding working. While uPNP did the job, it just wasn’t what I wanted. After fighting with DD-WRT I flashed Tomato. Tomato has been running stable ever since. I have yet to encounter a single issue. I highly recommend Tomato for this router.

UPDATE #2:

The Asus RT-N16 doesn’t run nearly as hot as I originally thought. Once flashing Tomato, I actually overclocked it a small bit, and cranked up my RX/TX power. Now, even under load, it just gets warm. Nothing to be concerned about.

After all of the troubles with the Buffalo WZR-HP-G300NH, I decided it was time to upgrade. After a bit of research, I decided on the Asus RT-N16.

Pros:

  • Detachable, external antennas (x3). This is a major upgrade over the non-detachable  external antenna (x2) and internal antenna (x1) of the WZR-HP-G300NH. This should allow me to mount the router just about anywhere and still have the antennas in a prime location.
  • Very powerful. Both CPU and Wifi
  • Actively supported by DD-WRT, Tomato, and others.
  • Wireless N Draft, and gigabit, since I use a NAS to transfer very large files this is a great feature. I could have gotten away with a cheap gigabit switch, but this is a nice feature.
  • And, it just looks cool. Let’s be honest, there is always that cool factor.

Cons:

  • Runs Hot. I have noticed that the router runs very hot, even under minimal load. I have yet to really put this thing to work, and had originally intended to mount it in an enclosure. But with the heat, this just wont be an option.

DD-WRT

It was extremely easy to upgrade the router to DD-WRT following the steps on the DD-WRT wiki. I flashed the mega build and while it is a step up over the stock firmware, it still has it’s flaws. Most specifically port forwarding is not working.  This resulted in having to run UPnP which I normally do not like to do.

Supposedly the brainslayer or eko builds perform better, and may well have the port forwarding issue fixed, I have just yet to try them.

Flashing DD-WRT: http://dd-wrt.ca/wiki/index.php/Asus_RT-N16#Installation_:

Tomato

The general consensus is that TomatoUSB runs better, and is more featured than DD-WRT on this router. But I have yet to use Tomato on any router. I will be testing it to see which runs better.

Now that I have had the router a while, I have found that TomatoUSB is the only way to go. Virtually no bugs, and everything works as expected. Also very featured filled. The only downfall is that you must use Windows to make the initial flash.

Flashing TomatoUSB: http://tomatousb.org/tut:installing-on-asus-rt-n16

To-Do: 

  • Test other builds of DD-WRT
  • Test TomatoUSB
  • Add some sort of cooling system to allow for more output power (heatsinks and fans)
  • Add higher gain antennas (possibly remotely)

Set-up Ubuntu to edit Android APK’s (Apps) using Apk Manager

Adding the ability to edit Android apps (apk’s) in Ubuntu is fairly easy, but lacks documentation. The following steps are what worked for me on my system, but please continue at your own risk. Since every system is different, I can’t guarantee that this will work for you, but it should serve as a good basis.

Things you will need:

Setting up the Android SDK:

To start with we will set up the Android SDK as APK manager relies on it.

First download the Android-SDK for linux from here. Once downloaded extract it somewhere to your system (I chose my user folder for ease of access).

If you don’t have Java JDK installed you will need to do so by running the following:

sudo apt-get install sun-java6-jdk

Once this is done you will need to install the Andoid SDK addon “Platform-tools” as APK manager relies on it to function.

To do so navigate to the following path (be sure and replace with the actually path you extracted to):

/path-to-extracted-android-sdk/tools/

Once here, locate the file called “android.” Double click it and select run.

After the graphical interface is loaded, select “Available Packages” in the right hand column. This will open up a list of package Repos in the center column. Expand the “Android Repository” and place a check by “platform-tools.” Now click install selected and let it do it’s magic.

The SDK (with platform tools) is now set-up and ready to use.

Adding the Android SDK to your path

At this point you have the Android SDK and Platform-Tools installed. This means that you can use them, but only within the directory where they exist. This is very inconvenient, so we are going to make them accessible anywhere by running the following commands (be sure and replace with the actually path you extracted to):

First we need to edit the .profile file:
gedit ~/.profile

Once opened, add the following to the very end:

export PATH=${PATH}:~/android-sdk-linux_x86/tools
export PATH=${PATH}:~/android-sdk-linux_x86/platform-tools

Save and exit and run the following back in the terminal:

export PATH=$PATH{}:/home/user/android-sdk-linux_x86/tools:/home/user/android-sdk-linux_x86/platform-tools

Installing APK Manager dependencies:

APK manager requires a few packages to run. Every system will be different, but my system was lacking optiping and 7zip. To install them run the following:

sudo apt-get install optiping p7zip-full sox

If you are on a 64bit system you may also need the following:

sudo apt-get install ia32-libs

Installing APK Manager

Finally, after all the prep work we are ready to install APK Manager.

First download the package from here.

Next, extract it somewhere on your system. (again, I chose my user folder)

Now open the terminal and navigate to the extracted APK manager and set the permissions of all the files in the folders to 755.

Example (in terminal):

chmod -R 755 /home/user/apkmanager

To finish up the installation you will want to run APK Manager. This first run will create the necessary folders to place your APK to be edited ect.

Run APK Manager by executing Script.sh inside the APK manager directory.

cd /home/user/apkmanager
./Script.sh

All finished

Assuming all went well you should now be all set-up, and ready to start using APK Manager to edit your APKs.

Un-Bricking the WZR-HP-G300NH router

A while back I completely bricked my Buffalo WZR-HP G300NH router. I was trying to flash Open-WRT from DD-WRT in an effort to fix an issue with Wifi constantly dropping. Needless to say, something went wrong and I would up with a virtually lifeless router.

I tried following the guide found here, but after many failed attempts I was frustrated and quit.

Now, I can proudly say that said router has now been successfully un-bricked!

These are the steps I took using Ubuntu Linux:

  1. Download the stock firmware from Buffalo’s website found here.
  2. After downloading the .zip file extract the actual flash file to your Desktop. The version I downloaded was called “wzrhpg300nh-pro-v24sp2-14998.” The file name you get may vary, but the important part is that the file you have has no extension.
  3. Now open a terminal session and run the following commands:
sudo apt-get update
sudo apt-get install tftp-hpa
sudo /etc/init.d/networking stop
sudo ifconfig eth0 192.168.11.2
sudo ifconfig eth0 netmask 255.255.255.0
sudo arp -s 192.168.11.1 02:AA:BB:CC:DD:1A
cd /home/user/Desktop
  1. Now get your router ready to receive the file. Plug an Ethernet cable into your computer and into the LAN 1 port on the router. DO NOT PLUG THE ROUTER INTO A WALL OUTLET YET
  2. Now back in the terminal do the following.
tftp 192.168.11.1
verbose
binary
trace
rexmt 1
timeout 60
put wzrhpg300nh-pro-v24sp2-14998 <–replace with the name of the file you downloaded
  1. At this point your computer will keep attempting to send the firmware file to the router. Now QUICKLY plug your router’s power cord in.
  2. After about 10 seconds you should see the file start to transfer.
  3. After the transfer is complete the router will reboot, when the Wifi light comes on, the process is complete.
  4. Turn networking back on by running the following in the terminal:
sudo service networking start
  1. If all went well, you should be able to log into your router by navigating to http://192.168.11.1/
TIPS:
  • Do not replace the MAC address with your own, use 02:AA:BB:CC:DD:1A. Trust me, it works.
  • After running “sudo /etc/init.d/networking stop” you see “Ignoring wlan0″ run this command.
sudo ifconfig wlan0 down