How to update firmware of ASUS RT-N56U

ASUS RT-N56U is a popular consumer wireless modem. It has been out for a few years already. So, if you bought it early on, it might be a good idea to update its firmware. Updating the firmware of this wireless modem is very easy:

  • Download the latest firmware: Go to the Driver and Tools page of the modem. In the dropdown choose Others and then Firmware. A list of firmware releases for this modem are listed. Download the latest stable version. Unzip the downloaded file and you will get a .trx file.

  • Open the web interface of your modem in your browser. You can see the current Firmware Version listed at the top. If this version is same as the latest available firmware, then you do not need an update.

  • In the web interface, go to Administration Firmware Upgrade. The modem checks if an updated firmware is available to download it. This download failed for my modem. I clicked through again to this same section of the interface. This time I manually chose my downloaded .trx file and it was uploaded to the modem.

  • As instructed by the modem, I restarted it after the upload by switching it off and back on. If you cannot connect back to the modem after the restart, you might want to factory reset it by pressing that button at the back for a few seconds. I had no problems connecting back and after opening the modem web interface, I saw that the firmware version was the updated one now.

How to update Ubuntu LTS Enablement Stack

Ubuntu LTS releases, like 14.04 are supported for many years. However, the kernel and X server that ship with them are only updated for minor changes or revisions during this period. Every six months Ubuntu puts out a new point release for its recent LTS, like 14.04.2. This has the kernel and X server from the most recent Ubuntu non-LTS release.

The Ubuntu LTS Enablement Stack provides these updated Linux kernels and X server releases for users running older LTS releases. For computers with NVIDIA graphics cards, I have found that switching to newer kernel and X server has always improved the driver errors I face.

The LTS Enablement Stack webpage has the charts of what kernel and X server versions are available for your LTS release. You can also find the command to update your LTS from there.

For example, I updated my 14.04 system using this command:

$ sudo apt-get install --install-recommends linux-generic-lts-vivid xserver-xorg-core-lts-vivid xserver-xorg-lts-vivid xserver-xorg-video-all-lts-vivid xserver-xorg-input-all-lts-vivid libwayland-egl1-mesa-lts-vivid

My kernel was updated from 3.13 to 3.19 after this. Remember to reboot after this command! 😄

Tried with: Ubuntu 14.04

How to update Primesense firmware

My Primesense RD1.09 cameras were having lots of trouble working under Linux. They had no problems working under Windows.

One of the suggestions I found online was to update their firmware. Note that the firmware update can only be done from a Windows computer. I followed these steps to update:

  1. Remove all OpenNI 1.x or 2.x SDK installed on Windows.
  2. Remove the driver for Primesense camera as described here.
  3. Install the latest OpenNI 2.x SDK by downloading it from here.
  4. Plug in the Primesense camera and ensure that it is detected in Device Manager. Strangely my camera is detected as a Primesense 1.08x device! I have no idea why this happens.
  5. Get the firmware update software from here. There are two versions of firmware, which one to pick? See below.
  6. Unzip the firmware and run the EXE file. It should change some settings and show a SUCCESS in the console. If you get a FAILURE, then make sure you followed the OpenNI removal and driver removal steps above.

Which firmware version to pick? There are two versions: one for RD108 and another for RD109 devices. My camera says RD1.09 on the back, but shows up in Windows as a 1.08x device! Which version of firmware should I use? I tried both and here is my experience. When I used RD109 firmware, the camera would give this error on Linux:

One or more of the following nodes could not be enumerated:
Device: PrimeSense/SensorV2/ The device is not connected!

I went back and tried the RD108 firmware and the camera worked under Linux after that 🙂

Tried with: OpenNI and Windows 7 x64

How to switch GCC version using update-alternatives

Multiple versions of GCC can be installed and used on Ubuntu as described here. The update-alternatives tool makes it easy to switch between multiple versions of GCC.

On Ubuntu, gcc and g++ are just symbolic links to the actual binaries of a specific version of GCC. By switching the version, invoking gcc will execute the particular version of the compiler binary that you wish. You can make any of these version as the default at any time effortlessly.

As an example, I had installed GCC version 4.8 from the Ubuntu repositories. This was the default version of GCC, so gcc was a symlink to gcc-4.8 binary. Wanting to use some new C++11 features I installed version 4.9 of GCC. This compiler can be invoked using gcc-4.9. I now want to switch the default gcc to invoke gcc-4.9. I also want the freedom to switch back 4.8 as the default whenever I want. You can switch the symlinks yourself manually, but using this tool makes it easy and clean.

Let us begin:

  • Decide which set of symbolic links you want to group together as one unit. I like to switch /usr/bin/gcc and /usr/bin/g++ together.

  • Pass update-alternatives the first version of these symbolic links. Here I will inform about the 4.8 version of these tools and links:

$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 100 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8

Here, we have provided the gcc as the master and g++ as slave. Multiple slaves can be appended along with master. When master symbolic link is changed, the slaves will be changed too.

  • Pass the second version of these tools to be recorded:
$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 50 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9 
  • Now you can switch between these versions by using:
$ sudo update-alternatives --config gcc

Tried with: Ubuntu 14.04

How to change the update frequency of Ubuntu

Ubuntu can get quite irritating when it starts to find updates to install every day. Thankfully, the update frequency can be changed easily from daily to something sane like weekly, once in two weeks or monthly.

Open the Update manager program. Choose Settings → Update and here you can change the update frequency to the period you wish.

Tried with: Ubuntu 12.04.1 LTS