Fonera: Unterschied zwischen den Versionen

aus Metalab, dem offenen Zentrum für meta-disziplinäre Magier und technisch-kreative Enthusiasten.
Wechseln zu: Navigation, Suche
(Installing Packages)
Zeile 280: Zeile 280:
;software zum flashen + packages ..
software zum flashen + packages ..
:<code>svn co</code>
;Fettes ipkg repository
svn co
Fettes ipkg repository

Version vom 10. Juli 2008, 21:35 Uhr


Mac OS X

Since EasyFlash isn't available for Max OS X, we do this manually (FON2200 + ethernet only):

1. Set IP address of your Mac:

sudo ifconfig en0

antifuchs says: this does not work reliably on Leopard. What does work is: In Network.prefpane, Make a new network location, make inactive every device except ethernet; set ethernet config to "Manual", configure IP address Then select that location as your current location.

2. Enable tftp

Get TFTPServer, point it to the directory that contains the firmware; it needs to be world-read/writable; you can let that program fix permissions for you.

3. Copy OpenWRT files to tftp dir:

These files are typically what you want to use:

  • openwrt-atheros-2.6-vmlinux.lzma
  • openwrt-atheros-2.6-root.squashfs

4. Upload the firmware

Two methods here: The lazy approach, and flashing it manually. I recommend doing it by hand at least once to be able to debug the lazy approach if it goes wrong.

Flashing manually

Get access to RedBoot

See also

echo -e "\003" > break

fonera an den strom, wenn das 2te led zu blinken beginnt:

nc -vvv 9000 < break;

danach ctrl+c

telnet 9000

-> You should now have a "RedBoot>" prompt. If not, rinse and repeat.

Flash new kernel and filesystem images in RedBoot:

In RedBoot (assuming you configured the machine with the tftp server to

fis init
load -r -b 0x80041000 openwrt-atheros-2.6-vmlinux.lzma
fis create -e 0x80041000 -r 0x80041000 vmlinux.bin.l7
load -r -b 0x80041000 openwrt-atheros-2.6-root.squashfs
fis create -l 0x06F0000 rootfs


You are now where EasyFlash ends. Wait for the boot to finish and telnet to and set a root password.

Flashing automatically (the lazy approach)

Get this expect script (written by Antifuchs and Marius):

1. Start script: ./flashit.expect
Optionally, you can give kernel and squashfs files as parameters if they don't have the default filenames 2. Connect and power up the Fonera
3. When you see stuff happening, go for lunch.<br/

When the script exits (and you see no error message), you can safely reboot the box and telnet to

Windows/Linux (easyflash):

Flashing Utility

Passendes Tool runterladen.

System Images

die beiden runterladen.

Jetzt kommts..

  1. Linux/Unix
      sudo ifconfig eth0
      netsh interface ipv4 set address "LAN-Verbindung" static
  2. Fonera mit Ethernet-Patchkabel an eth0 anstecken.
  3. Linux/Unix
      ./ap51-flash-fonera-1.0-38 eth0 openwrt-atheros-2.6-root.jffs2-64k  openwrt-atheros-2.6-vmlinux.lzma
    unter Windows ap51-flash-fonera-gui-1.0-38.exe als Administrator ausführen
  4. Strom an den Fonera anstecken

Der Fonera schickt nun beim hochfahren einen ARP request raus, das Flashtool wartet darauf und tut dann seine Magie. Der ganze Flashvorgang dauert rund _15_ Minuten. Zuerst sieht man die IP vom Router Dann steht da was von

Loading RootFS ..
Writing RootFS..  (10 Minuten)
Loading Kernel ..
Writing Kernel.. 
Rebooting Device..


Danach hat der Fonero die IP und ist über TELNET erreichbar. Happy hacking.

set password after flashing

ssh root@

note: after flashing, the fingerprint of the router changes. in that case you can delete the known-hosts file from ssh:

rm ~/.ssh/known_hosts
ssh root@

On Windows you can use PuTTY for the SSH connection.


default network configuration files

file description
/etc/ethers specifying static IP addresses via DHCP
/etc/dnsmasq.conf configures DNS masquerading
/etc/hosts maps IP-address to hostname
/etc/networks maps network addresses to network name
/etc/protocols maps protocol to port number; see IANA for a complete list
/etc/config/dhcp configures dhcp server
/etc/config/dropbear configures ssh
/etc/config/firewall configures firewall
/etc/config/network configures network interfaces
/etc/config/wireless configures wireless lan adapter


This file maps a given MAC-address to an IPv4-Address via DHCP. Example:

# desktop
# another desktop
# laptop
xx:xx:xx:xx:xx:xx # LAN
xx:xx:xx:xx:xx:xx # WLAN

Hint: You get the MAC-address using ipconfig -all on Windows or by using ifconfig on Linux/Unix.


maps IP address to full domain names, local domain names, and local hostnames. Example:   localhost.lan   www.lan   localhost   www   ftp.lan   ftp

Hint: you can also use a hosts file to block bad sites; see also custom hosts files


configures the names and addresses of networks. this file is used by the route command. Example:

default       # default route    - mandatory
loopnet     # loopback network - mandatory
wlan   # local wireless network
lan   # local wired network


Usually you don't touch that.


See OpenWRT Kamikaze Manual for setting up basic network configuration

Example 0:
Bridging Ethernet and WLAN
config interface loopback
   option ifname lo
   option proto static
   option ipaddr
   option netmask

config interface bridge
   option ifname eth0 wifi0       # which interfaces to bridge
   option type bridge
   option proto static
   option ipaddr        # bridge
   option netmask   # network subnet mask
   option gateway      # dsl/cable router
   option dns          # dns server


See OpenWRT Kamikaze Manual for setting up basic wireless network configuration

Example 0:
Bridging Ethernet and WLAN
config wifi-device wifi0
   option type      atheros
   option channel   11   # select best channel between 1 and 11
   option country   at   # austria
   option disabled  0    # wlan enabled
                         # you can also use the reset button to enable/disable
   option agmode    11bg # 802.11bg
   option distance  20   # maximum wlan reach in meters

config wifi-iface
   option device    wifi0       # 2nd interface is called "ath0"
   option network   bridge      # which settings from /etc/config/network
   option mode      ap          # access point mode
   option ssid      "My Fonera" # name of the router
   option hidden    1           # disables ssid broadcast
   option encyption psk2        # wpa2-psk
   option key       *********** # google 'wep key generator' to get a key


After you have successfully configured a connection with the internet, you can load additional software packages using ipkg.

FIXME: If you compiled OpenWRT yourself, you can register your computer as the package repository

install packages
ipkg update
ipkg list | more
ipkg install <packagename>

uninstall packages
ipkg list_installed
ipkg remove <packagename>


How to clone (or backup) a Fonera:

1. Get this expect script (written by Marius):

2. Set up your fonera so you can ssh in without a password:

  • Copy your computer's ~/.ssh/ (or equivalent) to the Fonera
  • On the Fonera:
  # cp /etc/dropbear/authorized_keys
  # chmod og-r /etc/dropbear/authorized_keys

3. Run the script on your computer

4. The backup is now made to the files clone.lzma and clone.squashfs. These can be used to reflash another fonera to become an identical copy.

Assumptions: The fonera lives at, the root prompt contains a "#", a normal openwrt is flashed on it.

NB! This has not been tested very well, so use with caution until it's been more quality assured. Bugreports are welcome :)


software zum flashen + packages ..
svn co
Fettes ipkg repository


LCD am fonera?

I2C bus?

SD card am fonera?

GPIO kernel modul

Fertig compiliertes GPIO kernelmodul im feschen .ipk + src Media:Kamikaze_7.09_GPIOkmod.tar.gz