Firmware Update Instructions
From FON Wiki Beta
The Fonera 2.0 comes with an early stage firmware, you will have to upgrade it to the latest version. When upgrading all previous settings are lost. No matter what, do not disconnect the power while updating, the process takes around 30 minutes.
Contents |
Web interface
You can update your Fonera 2.0 via WiFi(connected to the private signal), or over Ethernet:
- Download the tar.gz file from http://download.fonosfera.org/LATEST/
- Connect to your Fonera 2.0
- Browse to http://fonera or http://192.168.10.1
- If you connect for the first time the configuration wizard appears, skip it by clicking on Abort.
- Click on "Settings" then "Advanced"
- Login with the username admin and your password. The default is admin.
- Click on "Firmware Upgrade"
- Browse to the tar.gz file you downloaded, do not uncompress it.
- Click on "Upgrade" No matter what, do not disconnect the power while updating, the process takes around 30 minutes.
SSH access with developer Image After flashing with a new developer image your Fonera 2.0, you will need to reboot it, then wait until the Wireless LEDs light up, and reboot it a second time. Approximately 10 minutes after the second reboot the SSH keys will be generated and you will be able to connect to your Fonera 2.0 through SSH.
SSH interface
- Connect to Private WiFi signal or Computer Ethernet port (black) where SSH is open.
- Windows users : Get putty.exe and connect to 192.168.10.1 (Fonera 2's IP) with "ssh"
- Other user (Linux or Mac OS X) :
$ ssh root@192.168.10.1
- Login with the username root and your password. The default is admin.
- cd /tmp
- wget http://.....file.image, where the URL is the binary release. Note that your router must be connected to the internet.
- Execute mtd -r write file.image image
- Wait approx 20 minutes, the router will reboot automatically.
SSH access with developer Image After flashing with a new developer image your Fonera 2.0, you will need to reboot it, then wait until the Wireless LEDs light up, and reboot it a second time. Approximately 10 minutes after the second reboot the SSH keys will be generated and you will be able to connect to your Fonera 2.0 through SSH.
Failsafe mode
If for some reason, the main firmware does no longer boot, a Fonera 2 contains a second failsafe firmware. This firmware is smaller then the normal firmware, and is meant only to allow you to reflash the main firmware.
For more info on how to get into failsafe mode and reflash the firmware, see Failsafe_Mode.
Changing the failsafe firmware
The failsafe firmware is stored inside the "image2" partition on the flash (whereas the normal firmware is stored in the "image" partition.
- These are the steps to flash it using ssh, with the standard failsafe image.
- Connect to the Fonera using ssh.
- root@Fonera:/# cd /tmp
- root@Fonera:/# wget http://download.fonosfera.org/failsafe/20090206_FON2202_failsafe.image
- mtd -r write 20090206_FON2202_failsafe.image image2
- The process might show some errors while flashing but they are probably not critical. Just MAKE SURE you don’t make any activity during this process.
- The file is located here, if you want to download it and use a different method. The md5sum of the file is: d29e07bdcb6df04209cafafce8f3bc5f
Add valid Failsafe image to the Fonera 2.0 Beta version
It seems that the failsafe images on some or all of the Fonera 2.0 beta versions are broken. If you have a beta version, you'd do well to replace the broken failsafe firmware with a working one, using the instructions above.
Non-beta Fonera's should have a working failsafe out of the box (though it might be useful to doublecheck if you can boot into failsafe before experimenting with custom firmwares).
Redboot interface
Only valid for Fonera 2200, 2201, 2202 (October 2008 "beta" developer version). (Some) non-beta versions of the 2202 have the redboot interface disabled accidentally. You would do well to doublecheck that redboot is working before tinkering with your firmware.
If Redboot is not working, it can be enabled by changing the Redboot configuration. However, if this goes wrong YOU MIGHT BRICK YOUR FONERA! This procedure is entirely at your own risk. There are some (Italian) instructions here, but they are neither tested nor confirmed by Fon developers. Use with care.
Flash Tool
- on flash.fonera.be you can find a tool that can flash the original FON firmware (image/failsafe image2/bootloader) on your Fonera, including 2.0.
- It makes the "redboot" update process much easier.
- There is an edition for Windows, MacOSX and Linux users (and the source is available as well).
- You can also find a zip file that contains the 3 files you need to flash as well.
- Remarks
- Currently FON-NG firmware is not supported for the Fonera Classic & Fonera Plus.
- Fonera 2100 does not have RedBoot active on it's network port and requires a serial cable or camicacia-hack to fix this.
- The Fonera 2 (2202) sold since January 2009 has RedBoot disabled on the network port as well.
SSH access with developer Image After flashing with a new developer image your Fonera 2.0, you will need to reboot it, then wait until the Wireless LEDs light up, and reboot it a second time. Approximately 10 minutes after the second reboot the SSH keys will be generated and you will be able to connect to your Fonera 2.0 through SSH.
Manual Redboot flash
Windows
- Download everything you will need:
- The firmware image (file_name.image) and the loader: loader.bin 64KB (MD5: 48B471511907E582ECC0A3B40A174F64)
- If you are running windows get putty.exe to connect to the Fonera using telnet.
- Get a TFTP server (tftpd for windows) and configure it to listen & share the path that contains the firmware image (and the loader.bin if you need it)
- Deactivate your firewall (including windows one)
- Set your ethernet network card to ip: 192.168.1.254; netmask 255.255.255.0
- Connect a network cable from your computer to the Internet port (white) of Fonera
- Unplug the power cable of your Fonera 2.0
- Send a ping -t 192.168.1.1
- Plug the power cable of Fonera
- As soon as the Fonera 2.0 respond to ping connect to 192.168.1.1 on telnet port 9000 You have 2 second time window. So you better have your command or putty window ready.
Linux (Ubuntu)
- Make sure your pc has the ip 192.168.1.254 and tftp is running.
sudo apt-get install atftpd sudo gedit /etc/default/atftpd
Change the following line USE_INETD=true to USE_INETD=false save and exit the file Now you need to run the following command
sudo invoke-rc.d atftpd start
Configuring atftpd First you need to create a directory where you can place the files
sudo mkdir -p /srv/tftpd sudo chmod -R 777 /srv/tftpd sudo chown -R nobody /srv/tftpd sudo /etc/init.d/atftpd restart
Now place the image file in this directory (/srv/tftpd)
- Before using the router, try to load the tftp file locally on your pc to make sure tftp is running correctly
sudo su ;ifconfig eth0 192.168.1.254;while true; do fping -t 200 192.168.1.1 && break; done; telnet 192.168.1.1 9000
To make CTRL-C work, you need to switch telnet to line mode. To do this, create the file .telnetrc in your homedir, and add:
192.168.1.1
mode line
Alternatively, you can use putty, which works out of the box. Instructions for Debian / Ubuntu:
sudo apt-get install putty sudo su ;ifconfig eth0 192.168.1.254;while true; do fping -t 200 192.168.1.1 && break; done; putty -P 9000 -telnet 192.168.1.1
- This should show something like:
== Executing boot script in 1.000 seconds - enter ^C to abort
- You have to press CTRL-C to cancel the boot and get the redboot prompt. Then, move on to next section
Mac OS X
- Add this two lines in your ~/.telnetrc
192.168.1.1 mode line
- Download everything you will need:
- The firmware image (file_name.image) and the loader: loader.bin 64KB (MD5: 48B471511907E582ECC0A3B40A174F64)
- Set your ethernet network card to ip: 192.168.1.254
- Connect a network cable from your computer to the WAN port of the Fonera (white)
- Get a TFTP server (for mac) and configure it to listen & share the path that contains the firmware image (and the loader.bin if you need it)
- Plug the power cable of the Fonera
connect to 192.168.1.1 on telnet port 9000 as soon as you get a ping result back (you have 2second time window?)
- run this command and if nothing repat 4 or 5 times:
echo -e "\0377\0364\0377\0375\0006" >break.bin; sudo nc -vvv 192.168.1.1 9000 < break.bin; telnet 192.168.1.1 9000
thanks to Wolf Paulus Web Journal
- you should able to get RedBoot> prompt.
- now follows redboot steps:
RedBoot partition table
RedBoot has a partition table with different parts on it: the first stage loader (Redboot), the second stage loader (loader), the main firmware image (image) and the secondary or rescue image (image2) This is the way the partition table of a 'sane' fonera looks (you can see yours with "fis list" from the Redboot prompt:
RedBoot> fis list Name FLASH addr Mem addr Length Entry point RedBoot 0xA8000000 0xA8000000 0x00030000 0x00000000 loader 0xA8030000 0x80100000 0x00010000 0x80100000 image 0xA8040000 0x80040400 0x00420004 0x80040400 image2 0xA8660000 0xA8660000 0x00140000 0x80040400 FIS directory 0xA87E0000 0xA87E0000 0x0000F000 0x00000000 RedBoot config 0xA87EF000 0xA87EF000 0x00001000 0x00000000
I only want to flash the new firmware
- Then you don't need to touch anything else but the image.
- when you get into redboot:
RedBoot> load -r -b %{FREEMEMLO} openwrt-fonera.image
Raw file loaded 0x80040400-0x80380403, assumed entry at 0x80040400
RedBoot> fis delete image
..........................................
RedBoot> fis create image
..........................................
Note that the image creation command can take about 20 minutes.
My partition table is different!
In that case, you need to erase the partition table:
RedBoot> fis init
And reflash 3 parts of it: the loader (loader.bin), the image (*.image) and the rescue image (*_failsafe.image). The loader can be found here, the image is the one you like better (we recommend using the latest stable release) and the image2 for the Fonera 2.0 can be found here
Do as follows (please, don't skip any steps or modify anything - bear in mind that FON2202_image is the generic name we're using for the example, you need to put the name of the file you want to load from the PC to your Fonera)
RedBoot> fis init
RedBoot> load -r -b %{FREEMEMLO} loader.bin
RedBoot> fis create -e 0x80100000 -r 0x80100000 loader
..
RedBoot> load -r -b %{FREEMEMLO} FON2202.image2
RedBoot> fis create -f 0xA8660000 image2
.............................................
RedBoot> load -r -b %{FREEMEMLO} FON2202.image
RedBoot> fis create image
..................................................................................................................
SSH access with developer Image After flashing with a new developer image your Fonera 2.0, you will need to reboot it, then wait until the Wireless LEDs light up, and reboot it a second time. Approximately 10 minutes after the second reboot the SSH keys will be generated and you will be able to connect to your Fonera 2.0 through SSH.
