Difference between revisions of "Mesh/Flashing extender nodes"

From Sudo Room
Jump to navigation Jump to search
Line 88: Line 88:
==== TFTP with Official Firmware ====
==== TFTP with Official Firmware ====


You can download the official firmware image from Ubiquity - [https://www.ubnt.com/download/airmax-m/nanostationm/default/airos-xw-board-firmware-v564 airOS for XW board firmware v5.6.4]
You can download the official firmware image from Ubiquity - [https://www.ubnt.com/download/airmax-m/nanostationm/default/airos-xw-board-firmware-v564 airOS for XW board firmware v5.6.4] - [http://dl.ubnt.com/firmwares/XW-fw/v5.6.3/XW.v5.6.3.28591.151130.1735.bin airOS for XW board firmware v5.6.3]


Then you can start the TFTP server
Then you can start the TFTP server
Line 110: Line 110:
   Firmware Version: XW.ar934x.v5.6.4.28924.160331.1238
   Firmware Version: XW.ar934x.v5.6.4.28924.160331.1238


The U-Boot version is now different
This produces no change in the boot output. I try the v5.6.3 firmware.
 
  Receiving file from 192.168.1.10:36771
  Received 7293587 bytes
  Firmware Version: XW.ar934x.v5.6.3.28591.151130.1735
 
The TFTP client times out, but I wait for the firmware message on the serial output to change. Nothing happens. Reboot the device. No changes in the image detected.


  U-Boot 1.1.4-s958 (Jun 10 2015 - 10:56:20)
 
  DRAM:  64 MB
  Flash:  8 MB (0xc2, 0x20, 0x17)
  Net:  AR8236
  eth0, eth1
  Board: Ubiquiti Networks AR9342 board (e855-22585.1122.0030)
  Radio: 0777:e855
  Reset: Normal
  Hit any key to stop autoboot:  0
   ## Booting image at 9f050000 ...
   ## Booting image at 9f050000 ...
     Image Name:  MIPS Ubiquiti Linux-2.6.32.68
     Image Name:  MIPS Ubiquiti Linux-2.6.32.68
Line 131: Line 127:
     Verifying Checksum at 0x9f050040 ...OK
     Verifying Checksum at 0x9f050040 ...OK
     Uncompressing Kernel Image ... OK
     Uncompressing Kernel Image ... OK
 
 
   Starting kernel ...
   Starting kernel ...
    
    

Revision as of 23:47, 6 May 2016

Download the Image File For a Extender Node

The extender nodes that we currently support are:

Name Model No. OpenWRT Doc Firmware Image
Ubiquiti Nanostation M5 NSM5 OpenWRT Docs firmware: pre 2015 or 2015-2016
Ubiquiti Nanostation M2 NSM2 OpenWRT Docs firmware image
Ubiquiti Picostation 2 OpenWRT Docs firmware image
Ubiquiti Picostation M2 OpenWRT Docs
Ubiquiti Nanobeam M2 and M5 OpenWRT Docs
Ubiquiti Bullet M2 and M5 OpenWRT Docs

Flash the Extender Node

  • Configure your wired internet settings to use Manual IPv4 settings with IP: 192.168.1.10, subnet: 255.255.255.0, gateway: 0.0.0.0
  • Plug one Ethernet cable into your laptop on one end and into the "LAN" port of the power-over-ethernet power supply on the other end.
  • Plug another Ethernet cable into your antenna on one end and into the "POE" port of the power-over-ethernet power supply on the other end.
  • Push a pin into the reset hole and hold it.
  • With the pin held down, plug in the power to the power-over-ethernet power supply.
  • Watch the lights on the antenna - they will all flash together a few times, then they will flash up and down.
  • Once the lights on the antenna are flashing up and down, you can let go of the pin.

You should be able to ping the extender at 192.168.1.20.

 $ ping 192.168.1.20
 PING 192.168.1.20 (192.168.1.20) 56(84) bytes of data.
 64 bytes from 192.168.1.20: icmp_seq=1 ttl=64 time=1.54 ms
 64 bytes from 192.168.1.20: icmp_seq=2 ttl=64 time=0.826 ms

In your Linux terminal, type:

 git clone https://github.com/sudomesh/ubi-flasher
 cd ubi-flasher
 npm install
 ./flasher.js '<path to firmware>'

The terminal will tell you "The firmware has been successfully sent to the router. In a few seconds, the router should begin flashing its four status LEDs sweeping from left to right, then right to left (or up down, down up). This means that the router is flashing itself with the new firmware. Once the router goes back to having only the power LED lit, the router has been successfully flashed."

Wait until the antenna has only the power LED lit and you're done.

Nanostation M5

Firmware check failure

If you attempt to flash the extender and receive a 'Firmware check failed' error, then you have a version of the NSM5 that is protected from being flashed via the TFTP method. You will need to obtain a serial to USB interface (USB to UART TTL Module Serial Converter, 5 pin) and use it to flash the firmware.

  $ ./flasher.js openwrt-ar71xx-generic-ubnt-nano-m-squashfs-factory.bin
  Accessing http://192.168.1.20/login.cgi
  Connection timed out
  Sending openwrt-ar71xx-generic-ubnt-nano-m-squashfs-factory.bin to 192.168.1.20 using tftp put
  [Error: (Server) Firmware check failed]

TFTP Serial Output

When booting with the reset button held down on a Ubiquity NSM5, the following output is displayed.

 U-Boot 1.1.4-s958 (Jun 10 2015 - 10:56:20)
 
 DRAM:  64 MB
 Flash:  8 MB (0xc2, 0x20, 0x17)
 Net:   AR8236
 eth0, eth1
 Board: Ubiquiti Networks AR9342 board (e855-22585.1122.0030)
 Radio: 0777:e855
 Reset: Normal
 Hit any key to stop autoboot:  0
 Setting default IP 192.168.1.20
 Starting TFTP server...
 Using eth0 (192.168.1.20), address: 0x81000000
 Will reset device configuration (Reset button active after 10 seconds).
 Erasing sector 123..126
 
 First 0x7b last 0x7e sector size 0x10000
 .... done
 Waiting for connection: \
 Receiving file from 192.168.1.10:49763
 Received 4325788 bytes
 Firmware check failed! (1)

TFTP with Official Firmware

You can download the official firmware image from Ubiquity - airOS for XW board firmware v5.6.4 - airOS for XW board firmware v5.6.3

Then you can start the TFTP server

 ar7240> urescue
 Setting default IP 192.168.1.20
 Starting TFTP server...
 Using eth0 (192.168.1.20), address: 0x81000000
 Waiting for connection: |

From your machine, configured as 192.168.1.10, use TFTP to upload the official image

 $ tftp 192.168.1.20
 tftp> put XW.v5.6.4.28924.160331.1238.bin
 Transfer timed out.

The file uploads, and as expected the image does not result in a firmware check error.

 Receiving file from 192.168.1.10:56564
 Received 7296551 bytes
 Firmware Version: XW.ar934x.v5.6.4.28924.160331.1238

This produces no change in the boot output. I try the v5.6.3 firmware.

 Receiving file from 192.168.1.10:36771
 Received 7293587 bytes
 Firmware Version: XW.ar934x.v5.6.3.28591.151130.1735

The TFTP client times out, but I wait for the firmware message on the serial output to change. Nothing happens. Reboot the device. No changes in the image detected.

 ## Booting image at 9f050000 ...
    Image Name:   MIPS Ubiquiti Linux-2.6.32.68
    Created:      2016-03-31   9:39:16 UTC
    Image Type:   MIPS Linux Kernel Image (lzma compressed)
    Data Size:    955842 Bytes = 933.4 kB
    Load Address: 80002000
    Entry Point:  80002000
    Verifying Checksum at 0x9f050040 ...OK
    Uncompressing Kernel Image ... OK
 Starting kernel ...
 
 Booting Atheros AR934x

USB to Serial Connection

The following notes describe steps to interface with a Nanostation M5 (NSM5) via the serial interface. This may be necessary to manually load firmware onto the device if the web interface or TFTP methods of flashing the firmware become unavailable due to manufacturers disabling these methods of firmware flashing.

Order a USB to Serial Converter

USB to serial converter devices exist at a cost of $4 - $8 online, with much lower pricing and longer delivery times if ordered from China. Search for "USB to UART TTL", including "5 pin" in the search. Make sure the specifications do not mention anything other than 3.3 volts.

Connecting to Serial

You will need to connect the following pins from the converter to the pins on the device.

  • Ground (GND)
  • Serial Out (Transmit / TX)
  • Serial In (Receive / RX)

Begin by connecting the Ground of the converter to the Ground of the device. Next connect the Transmit/TX of the converter to the Receive/RX of the device, then connect the Receive/RX of the converter to the Transmit/TX of the device.

KEDSUM® CP2102 Module STC Download Cable USB 2.0 to TTL 6PIN Serial Converter For STC

Ubiquiti Nanostation NSM5 - Serial pins with connections

Serial Communications Program

You need to install a serial communication program. Linux users can use Minicom.

 sudo apt-get install minicom

By default the Minicom program will attempt to use /dev/tty8, and will also attempt to initialize the device (expecting a modem) by default.

 $ minicom
 minicom: cannot open /dev/tty8: Permission denied

Run the program so that it starts the program on the USB converter that is connected by adding `-D /dev/ttyUSB0`, and specify that it should skip initialization by adding `-o`.

You can also specify from the command line that it use the baud rate and '8N1' settings specified below by including `-b 115200 -8`.

 sudo minicom -D /dev/ttyUSB0 -o -b 115200 -8

In Minicom, CTRL-A to get settings, then Press O, to access settings

Go to Serial Port Setup, use these settings:

  • Set the serial device (should be /dev/tty/USB0)
  • Baud Rate (Bits Per Second): 115200
  • Settings '8N1' (short hand for 8 bits, no parity, 1 stop bit)
  • Turn off hardware and software flow control

Reboot the device, and it will let you drop into a command line. You will then have to figure out how to enable the network from the boot loader (Uboot or Redboot) and transfer the firmware to the device to flash it.

Interupting Boot

The device will not detect the key you press unless Minicom is configured properly.

  • To access the Help screen, Press CTRL-A, then press Z.
  • To access the configuration/settings, press CTRL-A, then press O.

From the configuration window, select to view the 'Serial port setup'

 $ sudo minicom -D /dev/ttyUSB0 -o -b 115200 -8
 Welcome to minicom 2.7
 
 OPTIONS: I18n 
 Compiled on Jan  1 2014, 17:13:19.
 Port /dev/ttyUSB0, 21:47:56
 
 Press CTRL-A Z for help on special keys
 
             +-----[configuration]------+
             | Filenames and paths      |
             | File transfer protocols  |
             | Serial port setup        |
             | Modem and dialing        |
             | Screen and keyboard      |
             | Save setup as dfl        |
             | Save setup as..          |
             | Exit                     |
             +--------------------------+
 
 +-----------------------------------------------------------------------+
 | A -    Serial Device      : /dev/ttyUSB0                              |
 | B - Lockfile Location     : /var/lock                                 |
 | C -   Callin Program      :                                           |
 | D -  Callout Program      :                                           |
 | E -    Bps/Par/Bits       : 115200 8N1                                |
 | F - Hardware Flow Control : Yes                                       |
 | G - Software Flow Control : No                                        |
 |                                                                       |
 |    Change which setting?                                              |
 +-----------------------------------------------------------------------+

By default the Hardware Flow Control will be enabled. Press 'F' to disable Hardware Flow Control. Press ENTER to exit the Serial port setup window, and then select EXIT to go back to the program.

At this point plug in the Ethernet cable to the 'Main' Ethernet port, with the other end connected to the 'POE' port on the Power Over Ethernet adapter that came with the device. As the device boots up, you'll see output similar to the following.

You'll need to make sure to press a key before it boots the default image.

 U-Boot 1.1.4-s958 (Jun 10 2015 - 10:56:20)
 
 DRAM:  64 MB
 Flash:  8 MB (0xc2, 0x20, 0x17)
 Net:   AR8236
 eth0, eth1
 Board: Ubiquiti Networks AR9342 board (e855-22585.1122.0030)
 Radio: 0777:e855
 Reset: Normal
 Hit any key to stop autoboot:  0
 Hit any key to stop autoboot:  0 
 ar7240> 

This will cause the U-Boot bootloader to drop into a command line.

Transfering file to U-Boot over Serial

U-Boot supports two protocols for transfering files: kermit or y-modem. Minicom does not support the kermit protocol, however it does support the y-modem protocol.