Wednesday, May 7, 2014

Asus Router RT-N66U – Sharing experience as I upgraded Firmware for the first time (including errors faced and their solutions)

Alright, let me first of all sum up my entire post in just two statements:
1. BE PATIENT, IT TAKES A HECK LOT OF TIME TO UPGRADE FIRMWARE ON ASUS RT-N66U.

(It took about 1 hour and 10 minutes for new firmware to be flashed properly and router automatically rebooted and was back to normal functionality after reboot)
2. NEVER NEVER NEVER NEVER NEVER UPGRADE A FIRMWARE THROUGH WIFI, BE SURE YOU ARE ON WIRED CONNECTION WHEN UPDRADING ANY FIRMWARE, LAN CABLE IN CASE OF ROUTERS.

(You won’t probably brick your router, but trust me you will very probably panic a lot, especially if it’s a high end router like Asus RT-N66U and you are doing the upgrading process for the first time)

Alright, here I go with my tale of updating firmware, the mistakes I made and what I learnt throughout the process.

Just a few days ago I received my brand new Asus RT-N66U Dual Band Gigabit Router and this is my first high end router, before this I used DLInk DSL 2750u (ADSL2+ modem/router) and had not really been very active on modems/routers stuff.

But since I got new fiber optic broadband connection from GTPL (Gujarat Telelink Pvt Ltd.) at my home, I started becoming more and more interested into nitty gritty of routers and all.

So a few nights back, out of nowhere, tired of working late night, just to take break from my work, I logged into router interface to see the devices connected, and explore its features.
Being completely naïve and an absolute newbie to routers, I was literally checking out options in each section of router and I stumbled upon Administration section - Firmware Upgrade tab. Over there I clicked on Check button next to Firmware Version name and I saw the prompt that said, “A new firmware version is available….”, immediately I clicked on OK to download and upgrade the firmware.

Click on Image to enlarge it

--The adventurous ride hence begins--

Now, while it was showing Download Firmware… for a few minutes, I observed that I was disconnected from my WiFi network, I thought, may be the router is to reboot itself due to firmware upgrade, and indeed it did reboot itself, and I was again connected to my home WiFi a few minutes later. Internet was working fine, I went back to Administration > Firmware Upgrade and noticed that the firmware version was still the same, I again clicked on Check and tried to upgrade the firmware once again and went through the same process. The firmware still didn’t upgrade, Repeated this once again, same result, not upgraded. I gave up and thought break time’s over, let’s get back to work (Actually this was the start of a night long break from work)

ASUS RT-N66U kept on rebooting itself after failed firmware upgrade multiple times

Few minutes later, I noticed I kept on getting disconnected from my router every few seconds, and it was irritating. I thought, let me go and reboot my router. I did so, problem still persisted. I through let me reset it. I tried to reset it using the reset button.

Power LED blinking slowly (Asus RT-N66U was now in rescue mode)

Now while I was resetting the router, I might have turned it off and on while the reset button was still pressed, although I don’t think that’s what I actually did. But Power indicator was slowing blinking (on/off). That made me worry. In DLink DSL 2750u if the power indicator turned red that means you are in recovery mode. I had no idea what and how recovery/rescue mode worked in Asus RT-N66U, but here I was, almost convinced although I didn’t want my thoughts to be actually true, that my router was now in recovery mode as the POWER indicator was blinking and I thought may be this behavior (of blinking) is equivalent to DLink DSL 2750u power indicator turning red.

Accessing Asus RT-N66u Router when it is in rescue mode

It was around 1:10 am, I went into my bedroom walking in stealth mode to ensure wife doesn’t wake up and quickly reached for my stock LAN cable, connected it to router and laptop and tried accessing my router interface via router IP. I couldn’t access it, tried it again and again for few mins using different browsers, restarted router a few times, no good. I connected my Ethernet WAN cable into my laptop to directly access internet and find some help online.
There I learnt that I had to configure IP address / subnet manually to 192.168.1.x/255.255.255.0 to access the router when it is in rescue mode.

How to choose which firmware file to upload when upgrading Asus RT-N66U

You need to check your hardware version, which is generally mentioned on the backside of router on a label. Mine is B1 hence here is the link for my case:
Here you can download the firmware, Windows utility to upgrade firmware as well as the manual (Did you notice, this link is also mentioned at the bottom of your router interface?)

Click on image to enlarge it


For Windows: Upgrading using Asus Firmware Utility:[Firmware utility can be downloaded on the same link above, just select your OS]

Now, this is a tricky part and really the part where you just need to trust me and hundreds of other people out there on the internet who have shared their experiences.
When you upgrade using the utility, not everything will be shiny and super easy as shown in this video
Instead, most probably, and I am saying most probably (not always), you will see that it uploads the firmware file, then the progress bar gets to 100% BUT then says failed to upload or it gives error that the router is not in rescue mode or something like that. Now here you need to stay put, or I would say, just leave your computer and router alone, turned on and as it is for may be an hour or till the time the router itself restarts and all general indicators (Power, LAN port indicator, Wireless indicator, etc.) turn up and behave normally as they should do as if the router is functioning normally and not in rescue mode.

Now this will take time, a lot of time in fact, may be around an hour and half sometimes (in my case it took exactly 1 hour and 5 minutes), but trust me, just let it be like that. The work is in progress and your new firmware is being flashed upon your router.

Now if you are reading this blog after you have (alike me) tried multiple times upgrading / flashing the firmware, and failed merely due to impatience (as you know now after reading this post), then the steps on how to get your router back to rescue mode are mentioned at the end of the post.

For non-Windows: Upgrading using TFTP utility:
This might look a bit intimidating, especially if you are completely unknown to linux command line, or using commands generally on any operating system to operate it, however you just have to follow them the way you see them.
You can read more about TFTP here: although you don’t really need to for this purpose.
Here are the set of commands that you need to run in order to upload the firmware using TFTP to your router:

1. First of all, while you are in terminal / command line, try ping 192.168.1.1

PING 192.168.1.1 (192.168.1.1): 56 data bytes

64 bytes from 192.168.1.1: icmp_seq=0 ttl=64 time=0.053 ms
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.217 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.080 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=0.093 ms

If you get the response as shown above, means you are in rescue mode (remember, in order to get response, you need to have set your IP address to something like 192.168.1.2 and subnet mask to 255.255.255.0)

2. Now navigate to the directory where you have your firmware file that you might have downloaded from Asus Support Page as explained in section How to choose which firmware file to upload when upgrading Asus RT-N66U

For example, if your file (that normally ends in .trx) is in ~/Downloads then navigate to that directory using command:

deep-macbook-pro:~ deepsukhwani$ cd ~/Downloads

Once you are in that directory, you can use the command ls *.trx to see the file(s) ending in .trx extension, (hopefully you only have one that you want to use for your firmware upgrade / restoration process. In case you have multiple, you should know which file to use)

3. Now upload the new firmware using tftp:
First of all, make sure that all other LAN cables are disconnected to the router except for only one LAN Cable (the one that you are connected through).

The lines starting with > or $ are the commands that you have to type.
The commands begin after the > or $ character.

deep-macbook-pro:~ deepsukhwani$ tftp 192.168.1.1
This will connect you to your router using tftp

> binary

> put RT-N66U_3.0.0.4_374_5517-g302e4dc.trx
In my case the file name is RT-N66U_3.0.0.4_374_5517-g302e4dc.trx, in your case the file name might be something different, make sure you copy the file name exactly as it is or you can also rename it to something simple like firmware.trx

6284824 bytes, 2.8 seconds
You should get somewhat similar response once the file has successfully uploaded.

> q
This is small case letter Q to quit the tftp utility

Once the process finishes, you need to wait for anything between 15 minutes to an hour and a half or may be longer in some cases. I would say, just leave your computer and router alone, turned on and as it is for may be an hour or till the time the router itself restarts.

How you know that the process has successfully finished and your Asus RT-N66U is back up and running?

Well, the router will automatically restart itself and all general indicators (Power, LAN port indicator {the one you are connected on}, Wireless, etc.) turn up and behave normally as they should do as if the router is functioning normally



How to put Asus RT-N66U in Rescue (recovery) mode:

  1. Turn router off
  2. Press and hold reset button, turn router on
  3. Wait 5 secs, then release reset and immediately press WPS button
  4. Wait 5 secs, release WPS, and see if you are in rescue mode (the power LED should still be blinking. (try ping 192.168.1.1 and see if you are getting responses or timed out errors).If you are getting responses, means the router is in recovery mode, if not, repeat above steps.
  5. If you are, proceed with re-flashing the firmware.

These steps have been taken from this forum post, however as I have myself used them just a few days before this post is published, I know they do work.

Friday, May 2, 2014

Greenshot: Super light and highly efficient open source utility for screenshots and easy image editing on Windows

Taken from GetGreenshot.org

I primarily use Mac for my day to day activities however my office system has Windows 7 installed on it, and being a QA engineer, I am often required to take screenshots of selected screen areas, I was quickly sick of using stupid inefficient tools like PrintScr and then pasting the copied screenshot in Paint and then selecting the required area out of it and saving it in a different file and then saving it.

Being a Mac user where you can just press CMD + Shift + 4 and be able to select any area on your screen, I needed a similar utility, I had heard of Snipping tool built in on Windows 7, however wasn’t still satisfied with it.

Click on image to enlarge it 

So here I found a great utility called greenshot, an amazing open source utility that allows you to use PrintScr as a screen selecting tool and once you have selected screen you can actually either directly save it, or have tons of other options like uploading it to Imgur, copying to clipboard, opening with pre installed applications like Microsoft Office
  
Click on image to enlarge it

You can even open it using Greenshot image editor which allows you to quickly draw shapes and annotate your screenshots.
   
Click on Image to enlarge it

Greenshot is licensed under GPL (GNU General Public License) and the exe installation file sizes just around 1.3 MB.

You can get the most recent version here: GetGreenshot.org

Thursday, March 13, 2014

CS50 Appliance - Error "Could not mount the media/drive '/Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso' (VERR_PDM_MEDIA_LOCKED)" when trying to install VirtualBox Guest Additions

I am currently going through CS50x course delivered by David J. Malan from Harvard University. However when trying to install custom VM Appliance given by CS50 course staff which is custom built for students taking CS50 course, I stumbled across a few issues one of them is:

Could not mount the media/drive '/Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso' (VERR_PDM_MEDIA_LOCKED)"

when trying to install VirtualBox Guest Additions

Click on image to enlarge

And this is what worked for me:

First, ensure all VMs are turned off, then click on Settings > Storage and remove the CD / DVD device under the heading Controller: IDE and then add it back (see screenshot below)

Click on image to enlarge
Once I added back the CD / DVD device, and then started the Appliance, selected Install Guest Additions... from Device menu, I was successfully able to install Guest Additions on my appliance.

I hope this helps you guys. If there is anything else that worked for you, please do post it in comments below so that others can benefit from it.

Saturday, March 8, 2014

How to delete a property in Google Analytics

I must agree that first time users can find Google Analytics really overwhelming if they aren't used to any analytics tools at all. I am too a beginner in the world of web analytics although in the past I have worked for a startup organisation that is behind a popular A/B Testing tool called Visual Website Optimizer and has some functionalities similar to that of Google Analytics but I still believe I do not have a systemic knowledge of Analytics and how they work. As a result of this, I embarked on a journey to learn about Analytics using Google Analytics Academy free online courses.

During the fundamentals course, I got stuck with trying to delete a property of my Test account inside by Google Analytics account and hence a little bit of research into it revealed, actually there's no button that says "DELETE PROPERTY". In order to delete a property, you have to actually delete all the views inside that property.

Just before I show the steps to delete property, as a word of caution, please be aware properties and views once deleted cannot be recovered.

So here are the steps as follows:

  • Sign in to your Analytics account. Click Admin in the menu bar at the top of any Analytics page.

  • In the Account drop-down, select the account from which you want to delete a property.
  • Click on image to enlarge

  • Now in the Property drop-down, select the property that you want to delete.
  • Click on image to enlarge

  • For each view present under the selected property, go to View Settings and click on Delete View link present in the extreme right bottom of Report View Settings page
  • Click on image to enlarge

    Repeat this for each view under that property.

    Once all the views are deleted, voila! property is gone!!
    Google+