Broadband-Hamnet™ Forum :: UBNT Firmware
Welcome Guest   [Register]  [Login]
 Subject :Ubiquiti Firmware Installation / Recovery.. 2015-03-10- 17:45:34 
K3TEG
Member
Joined: 2014-12-10- 00:52:49
Posts: 2
Location: Sunbury, PA

Written by David Rivenburg, AD5OO Revised by Tim Gelvin, K3TEG 03/11/15

Here's how to make your very own mesh node:

1. Go to the software download page and get the version of firmware suitable for your model of router. If you are upgrading from the stock Linksys firmware or using tftp (instructions further down this page) you will need the model-specific .bin file. If you are upgrading from a previous mesh firmware release then you can use the .trx file (regardless of the router model). routers with 2MB of flash (such as the wrt54g version 5 and above) are not supported this step can be skipped if you are upgrading from 0.3.2+ firmware and the node has an internet connection

2. Upload the firmware to the router
These instructions assume your computer is connected to the lan port of router. Routers with factory firmware in a browser go to http://192.168.1.1/ user = admin password = admin (or the password you set) click Administration click Firmware Upgrade click Browse, select the .bin file that you downloaded click Upgrade goto step 3 routers with hsmm-mesh-0.3.2 or later firmware that have an Internet connection in a browser go to http://localnode:8080/ click Setup user = root password = hsmm (or the password you set) click Administration next to Download Firmware click Refresh select which firmware image to download click Download, then wait for the firmware to download and install goto step 3 routers with mesh-0.3.0 or later firmware, or 0.3.2+ with no internet connection in a browser go to http://localnode:8080/ click Setup user = root password = hsmm (or the password you set) click Administration next to Upload Firmware click Browse, select the .trx that file you downloaded click Install goto step 3

3. Wait for the power LED to start blinking, then stop blinking, then for the DMZ LED to go out after that, replug your network cable or do whatever it takes to reset your computer network adapter the first time mesh firmware is installed on a router it will take about two minutes for the first reboot to complete DO NOT SKIP THIS STEP !!!

4. Configure the mesh node - this is required every time the firmware is installed in a browser go to http://localnode:8080/ at this point the node is acting as an access point, so you can either be connected by a cable to the LAN port or connected wirelessly to the SSID "MeshNode" this guarantees that after a full firmware install there is a wireless way back in to the node if it is located in a restricted access area when connecting to the LAN port is not practical click Setup user = root password = hsmm enter a Node Name node names can contain only numbers, letters, and dashes underscores, spaces, and other punctuation are not allowed it is a condition of your Amateur Radio license and of Broadband Hamnet that the node name must contain your callsign the node name is beaconed (via UDP port 4919) every five minutes to meet the identification requirements recommendation: (callsign)-(name) example: ad5oo-mobile or ad5oo-1 enter a Password (twice) click Save Changes, even if you didn't make any changes, and wait for the node to reboot Congratulations. You now have a mesh node, but only if you did step 4!. Here is what just happened to your router: it is now running a custom build of OpenWrt kamikaze 7.09 the wireless ssid is BroadbandHamnet-v1 and is broadcast the wireless mode is ad-hoc the wireless channel is 1 the wireless speed is automatic the wireless encryption is disabled the wireless and lan ports are no longer bridged - they are independent interfaces the wireless address is 10.X.Y.Z/8 X, Y, and Z are the last three bytes of the WiFi mac address the lan address has been automatically configured the lan port is running a dhcp server the wan port is running a dhcp client

Installing / Recovering Firmware with TFTP in Linux--Revised by K3TEG

Your router is a brick.  It does not come up normally and you are not able to log in by any method.  All is not lost, read on to see how to use the built in failsafe method of installing firmware.  If this method does not work, you will have to resort to a JTAG install.  Good luck with that.  See www.openwrt.org for information on the JTAG method.

The CFE (Common Firmware Environment - the bootloader) has the ability to receive a firmware image using tftp (the trivial file transfer protocol) and write it to flash. When the nvram variable boot_wait is set to on, (as it will be after the mesh firmware is installed at least once) there is a three second window where it listens for tftp packets. If it hears them, it will load the firmware into ram, write it to flash, then reboot. If the CFE detects some problem with the firmware already on the flash (such as an interrupted flash write) and is unable to boot, it should wait indefinitely for a tftp transfer. At this point I'm not sure what the CFE behavior is when boot_wait is set to off. I believe it still listens for tftp packets, but the window of opportunity is one second or less.

1) Here is a linux script I use (I called it wrtftp) to send tftp attempts to 192.168.1.1 once every second for an hour or until the upload succeeds. It sets the tftp trace mode so that you can see every attempt and also see when the transfer has happened and whether or not it succeeded. Use your software/package manager to verify if TFTP is installed. If not, install it.

2) Here is a Linux script I use (I called it wrtftp) to send tftp attempts to 192.168.1.1 once every second for an hour or until the upload succeeds. It sets the tftp trace mode so that you can see every attempt and also see when the transfer has happened and whether or not it succeeded. Take the script below and copy to a new text file using a text file editor and paste it to the new file, then save the file as Ubiquiti_Firmware_Flash.sh

--------------------------------------------------------------------
#!/bin/sh
if [ -z "$1" ]; then
  echo "usage: wrtftp "
  exit 1
fi
cd `dirname $1`
tftp 192.168.1.20 << END
bin
rexmt 1
trace on
timeout 3600
put `basename $1` code.bin
END
–-------------------------------------------------------------------

3) Download the latest FACTORY bin from http://www.broadband-hamnet.org/software-download.html . Then rename the bin file to code.bin . Here's a YouTube link that shows the Windows method… this will give you an idea of what the next step will look like. https://www.youtube.com/watch?v=dkZXPMZDd_k

4) Now unplug RG-45 cable from the Ubiquiti router. Use a paperclip or something small to press the reset button on the Ubiquiti router. Press the reset button then plug in the RG-45 cable. Keep the reset button pressed for 15-20 seconds. The Ubiquiti router will start flashing it's LEDs alternately, at this time you can stop pressing the reset button.

5) To reflash a device with this script, you will need to have your computer's ethernet port connected to the LAN port on the router, with the IP address statically set to 192.168.1.2, netmask 255.255.255.0. Run the script with the .bin image name as an argument. The .trx file will not work here, you need the .bin file specific to your model of router. This MUST be the factory image.

Once per second you will see messages like this:

sent WRQ

If the above messages continue, power cycle the router again starting from step #4 until you see messages like this:

sent DATA
received ACK
sent DATA
received ACK

After that the flash write begins, then the router will reboot. This process will literally take about an hour to flash the firmware.

During this process one thing that may get in the way is network management software that many modern operating systems use to automatically control your ethernet port. It becomes a problem when power cycling the router causes the network manager to enable and disable the ethernet port because it sees the connection disappearing and reappearing. One way around this is to disable the network manager and take manual control of your network interfaces if you are able to do that. Otherwise it can be avoided by using another ethernet switch which both your computer and the router receiving the firmware are connected to. You should be able to use the LAN switch on the back of another mesh node if a separate switch is not available.

IP Logged
Page # 


Powered by ccBoard


SPONSORED AD: