AR300M, the ultimate Mini router

The hardware specs of a mini router is pushed to the limit on AR300M.

Features

Features

Note: I2C is not working in the router.

By using 128MB Nand flash, space is not a problem and the writing speed is improved greatly. You can compile a firmware with tons of features and writing data is almost instant.

By adding PCIe interface, a 5G 802.11a/ac addon module can be connected and you can enjoy the wifi speed on a mini router.

Performance

By adding a fast Nand flash, you can feel how the performance is improved compared to a Nor flash router.

The performance comparision between AR300M (nand) with AR150 is below:

Features

It only takes 6 seconds to upload and process 250 ovpn files. When installing packages to the router, it takes no more than 20% for the time spent than using nor flash, including the time to download resource from the Internet. So everything just happends in seconds.

Build the firmware

The router has two flash so we have two firmware. One firmware is installed on the Nor flash and one is installed on the nand flash. The two firmware is independent from each other. The router will always try to boot from the nand flash. If it fails for 3 times it will boot from the Nor flash.

By using two firmwares, businesses can have dual boot options to ensure the system can backup, upgrade and boot without problems.

Building the generic firmware for nor flash

The simple instructions of building the firmware can be found here: https://github.com/domino-team/openwrt-cc You need to have a Linux machine. In this example we use Ubuntu.

$ sudo apt-get update
$ sudo apt-get install subversion build-essential git-core libncurses5-dev zlib1g-dev gawk flex quilt libssl-dev xsltproc libxml-parser-perl mercurial bzr ecj cvs unzip git wget
$ git clone https://github.com/domino-team/openwrt-cc.git
$ cd openwrt-cc
$ ./scripts/feeds update -a
$ ./scripts/feeds install -a
$ make menuconfig
  ..choose your compile target and packages
$ make

If you want to build the firmware for nor flash, choose GL-AR300M as the target.

AR300M generic

Build the nand firmware for nand flash

If you want to build the firmware for nand flash, first choose subtarget Generic devices with NAND flash then choose GL-AR300M Nand as the target.

AR300M nand

The make process will takes around 1 hour for the first time because it needs to download a lot of data from t he Internet. After compiling finished, you will find the following firmware files in bin/ar71xx/

Note

There is two file for nand firmware. The xxx-ubi.img is used for first time writing to the nand flash. If you are using uboot to upgrade the firmware, please use this one. The xxx-sysupgrade.tar is used for upgrading from openwrt. So if you use our stock firmware or already using an openwrt firmware, choose this one.

Using the firmware

The firmware has exactly the same UI as our other mini routers. To determine you are using nor flash or nand flash, please check the available space from the UI.

Control which firmware you are booting into

There are two methods to control which firmware you can boot.

Method 1: set boot count

The router will always try to boot into the nand firmware. But if it fails for 3 times it will try to boot into the nor firmware. If you want to boot into the nor firmware, you can tell the router that it failed to boot for 3 times already by setting the uboot env. To do so, you can use the following command in a SSH terminal.

$ fw_printenv
$ fw_setenv bootcount 3
$ reboot

You need to do this each time if you want to boot into nor firmware, no matter you which firmware you are using. Otherwise after the firmware boot, it will reset bootcount variable and next boot will always try to boot the nand firmware.

Method 2: using the switch

This is only valid in the new uboot.

First ssh to the router and set uboot env boot_dev

$ fw_printenv
$ fw_setenv boot_dev on
$ reboot

Then when the router boot, the router will choose which firmware to boot using the hardware switch. 1. Left side (near the reset button) --> Nand flash 2. Right side --> Nor flash

To disable using the switch to choose firmware function, clear boot_dev variable.

$ fw_printenv
$ fw_setenv boot_dev
$ reboot

Debrick

If you brick your router and it cannot boot, you can try to save it using uboot.

Using uboot web UI

Follow this guide for a general instruction to get access of uboot web UI.

Here is a video guide for entering AR300M uboot failsafe.

In some early version of AR300M, the uboot boot very slowly. So be patient when you press and hold the reset button. The LEDs will start to flash around 5 seconds.

There is a bug in AR300M uboot and in some computers the connection will always reset when you upload firmware. Check this post to find the discussion. You can either try chaning the MTU or just try another computer.

Note: If you have an older version of uboot, the webUI will only be able to flash NAND flash. This is fixed in newer versions.

Note: When flash NAND firmware, only use the firmware with .img in the name, not the one with .rar in the name.

The following figure is the web ui of the new uboot.

AR300M uboot webui

Using uboot console

If you want to use uboot console, you need to open the case and solder the serial connectors.

Then you need to set up a tftp server.

in uboot console, the command to flash nor flash is run lf to flash nand firmware is run nlf

Discussions