This page is designed to give you quick howtos to flash common type of hardware devices that we recommend.

Firmware downloads

Réseau Libre recommends the attitude adjustment release candidate series of the OpenWRT project.

Depending on your hardware, you must download the correct firmware version onto your computer, which we will use to flash the router in the next step. We recommend the "Commotion RL" firmware for use on Réseau Libre in Montreal. This is a custom firmware based on Commotion, which simplifies greatly the configuration to join the network.

Bullet M2
Commotion RL
attitude adjustment 12.09
Nanostation M2
Commotion RL
attitude adjustment 12.09

For more information on other devices, see the table of hardware on the OpenWRT site, each device page will list which firmware you should use in the full list.

Fully automatic installation

We are also building our own openwrt images, that include all necessary packages to run Reseau Libre, as well as some utilities developed by the Reseau Libre members to help manage the mesh. See: simple and graphical procedure to install those images.

(!) If you feel like lending a hand with the work on those images, see firmware.

Flashing methods

You can flash your devices in many ways. The web interface is the easiest.

Web interface

If your router is still functional, the easiest way is to flash the device through the web interface. This works on most firmware, even the proprietary ones shipped with the device.

During the upload, pay attention to the following:

  • do not disconnect the network cable
  • do not close your browser
  • look at the LEDs pattern to see if they settle down
  • keep a ping to the router running

(!) The default user/password of ubiquity devices is ubnt/ubnt.

TFTP upload

This works by turning off the device and rebooting it while repeatedly sending it the file over the network.

  1. make sure network-manager is disabled: ''right click on the network icon and uncheck Enable networking'' or:

    sudo service network-manager stop
    

[!] Warning: this could disable your internet access, so download the above images before you do this.

  1. connect the router with a network wire to your computer
  2. configure an IP on your computer

    ifconfig eth0 192.168.1.2 up
    
  3. send the new firmware through tftp repeatedly

    • with atftp (prefered):

      atftp --trace --option "timeout 1" --tftp-timeout 1 --option "mode octet" --put --local-file openwrt-xxx-x.x-xxx.bin 192.168.1.1
      
    • with netkit-tftp:

      $ tftp 192.168.1.1x
      tftp> binary
      tftp> rexmt 1
      tftp> timeout 1
      tftp> trace
      tftp> put openwrt.bin
      
  4. reboot the router with the reset button pressed

If everything goes well, the screen should scroll fast and the device should reboot. Sometimes it doesn't reboot however, in that case you should yank the power cable out and plug it back again.

IP may vary according to the hardware, here are the known IPs:

Ubiquity Bullet M2 / Nanostation M2
192.168.1.20 (or 192.168.1.10!!)
Linksys WRT54G
192.168.1.1

For other platforms (Mac, Windows, etc), see: http://wiki.openwrt.org/doc/howto/generic.flashing.tftp

Upgrade d'une version précédente de OpenWRT

Si vous avez déjà OpenWRT, mais que vous voulez le flasher avec une autre version, vous pouvez utiliser la commande sysupgrade:

ssh 192.168.1.1
sysupgrade http:// ... /openwrt-blah-squashfs.trx

[!] Attention!! Il est très important de prendre l'image marquée -sysupgrade ou, si elle n'est pas disponible, le .trx.

[!] Attention! Si vous faites une mise à jour d'un routeur qui avait déjà babel, arrêter le service avant de lancer la mise à jour (/etc/init.d/babel stop). Sinon sysupgrade va arrêter babel avant de lancer la mise à jour, ce qui cause une interruption du réseau pendant 1-2 minutes.

[!] Attention! Ceci ne fonctionne pas bien sur les Linksys WRT54GLv1.1 (au moins). Essayer avec ceci la prochaine fois:

mtd write /tmp/openwrt-brcm47xx-squashfs.trx firmware && reboot

Si votre routeur n'a pas accès à internet, vous pouvez installer un petit serveur web sur votre ordinateur:

sudo apt-get install nginx
sudo cp openwrt-blah-squashfs.trx /usr/share/nginx/www/
sudo /etc/init.d/nginx start

Puis vous spécifiez l'addresse de votre serveur sur votre PC connecté par ethernet sur un port LAN:

sysupgrade http://192.168.1.2/openwrt-blah-squashfs.trx

Ceci assume que vous avez un serveur web local roulant sur l'adresse 192.168.1.2. Si vous n'êtes pas trop familiers avec la configuration d'un serveur web, sachez que vous pouvez rapidement en lancer un avec la commande suivante:

cd Downloads/ # ou peu import où se trouve l'image
python -m SimpleHTTPServer

Notez que cette commande va exposer tous les fichiers dans le répertoire actuel au public, ce qui peut révéler des fichiers que vous ne désirez pas partager! Donc attention avant de lancer cette commande. Utilisez controle-c pour arrêter le serveur web.

Voir aussi le guide complet.

After flashing the device

Set a password!!

[!] Important: after you flash your device, the password will be reset and the device will be wide open!!! You NEED TO CHANGE THE PASSWORD! Use pwgen or another tool to generate a random password and set one over telnet using:

passwd

Keep the password in a safe place, your password manager or your head, if the latter: train using it regularly otherwise you will forget and will have to do a password reset (see below).

(!) Note that this will DISABLE telnet and you will have to use SSH instead.

You can also paste your ssh public key to login without a password by doing:

cat >> /etc/dropbear/authorized_keys

and pasting your key followed by CTRL-d

Set the date

This is kind of useful, but not mandatory:

root@easternblock:/etc/config# date 201211260235.15
Mon Nov 26 02:35:15 UTC 2012

Notice how the time is UTC.

Set a different hostname

If you have multiple AP and don't want to confuse them on the command line, you can set different hostname by doing:

uci set system.@system[0].hostname=newname
uci commit

After the next reboot OpenWrt should have been replaced by your newname:

root@newname:~#

Set a default ip, gateway and dns

See IPv4 and IPv6 documentation.

Other configuration

Password reset

In general, try to connect on the web interface at http://192.168.1.1 (a commonly used default IP), that may give you an idea of the firmware that is running.

OpenWRT firmwares

If you are lucky enough to have a ?OpenWRT device, you may be able to reset the password using this simpler procedure:

  1. Unplug the router's power cord.
  2. Connect the router's WAN port directly to your PC.
  3. Configure your PC with a static IP address

    ifconfig eth0:flash 192.168.1.2
    
  4. Plug the power on and wait for the DMZ LED to light up.

  5. While the DMZ LED is on immediately press any button (Reset and Secure Easy Setup will work) a few times .

If done right the DMZ LED will quickly flash 3 times every second.

You should be able to telnet to the router at 192.168.1.1 now.

The root file system in failsafe mode is the SquashFS partition mounted in readonly mode. To switch to the normal writable root file system run:

mount_root

To set a new password:

passwd

Find the router's IP address:

uci get network.lan.ipaddr

You accidentally run 'ipkg upgrade' or filled up the flash by installing to big packages (clean the JFFS2 partition and start over)

mtd -r erase rootfs_data

If you are done with failsafe mode power cycle the router and boot in normal mode.

Full resets

To reset your machine to its factory setting, you must first enter failsafe mode (see the "OpenWRT firmwares" section above). Then you can perform a complete reset with:

firstboot
reboot -f

The router will reboot to its factory configuration and firmware. This is documented in the failsafe mode OpenWRT documentation.

Other guides