Zum Inhalt springen

Fonera: Unterschied zwischen den Versionen

MovGP0 (Diskussion | Beiträge)
AndiS (Diskussion | Beiträge)
 
(72 dazwischenliegende Versionen von 5 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
= Fonera =
== FLASHING ==


=== NEW: Gargoyle Flash Fon Utility ===


== FLASHING ==
Gargoyle project includes a [http://www.gargoyle-router.com/download.php Flash Fon utility] that works similarly as EasyFlash, but works on MacOSX, Linux and Windows


=== Mac OS X ===
=== Mac OS X ===
Zeile 17: Zeile 18:
'''2. Enable tftp'''
'''2. Enable tftp'''


Alternative 1:
Get [http://ww2.unime.it/flr/tftpserver/ 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.
Get [http://ww2.unime.it/flr/tftpserver/ 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.
Altenative 2: Use the tftp server which comes with Mac OS X:
<pre>
sudo launchctl load -F /System/Library/LaunchDaemons/tftp.plist
</pre>


'''3. Copy OpenWRT files to tftp dir:'''
'''3. Copy OpenWRT files to tftp dir:'''
Zeile 73: Zeile 80:
Usage:<br/>
Usage:<br/>
1. Start script: ./flashit.expect<br/>
1. Start script: ./flashit.expect<br/>
Optionally, you can give kernel and squashfs files as parameters if they don't have the default filenames
Optionally, you can give kernel and squashfs files as parameters if they don't have the default filenames<br/>
2. Connect and power up the Fonera<br/>
2. Connect and power up the Fonera<br/>
3. When you see stuff happening, go for lunch.<br/
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 192.168.1.1
When the script exits (and you see no error message), you can safely reboot the box and telnet to 192.168.1.1


=== Windows/Linux (easyflash): ===
=== Windows/Linux (easyflash): ===
<pre>
; Flashing Utility
http://downloads.berlin.freifunk.net/fonera/
http://download.berlin.freifunk.net/fonera/
 
* Linux/Unix: [http://download.berlin.freifunk.net/fonera/ap51-flash-fonera-1.0-42 ap51-flash-fonera-1.0-42]
[ ] ap51-flash-fonera-1.0-38 18-Dec-2007 19:10 3.3M
* Windows: [http://download.berlin.freifunk.net/fonera/ap51-flash-fonera-gui-1.0-42.exe ap51-flash-fonera-gui-1.0-42.exe]
[ ] ap51-flash-fonera-gui-1.0-38.exe 18-Dec-2007 19:12 3.3M
 
Passendes Tool runterladen.
Passendes Tool runterladen.


 
;System Images
http://downloads.openwrt.org/kamikaze/7.09/atheros-2.6/
http://downloads.openwrt.org/kamikaze/7.09/atheros-2.6/
[   ] openwrt-atheros-2.6-root.jffs2-64k                 30-Sep-2007 20:16  1.6M 
* [http://downloads.openwrt.org/kamikaze/7.09/atheros-2.6/openwrt-atheros-2.6-root.jffs2-64k openwrt-atheros-2.6-root.jffs2-64k]
[   ] openwrt-atheros-2.6-vmlinux.lzma                   30-Sep-2007 20:16  768K 
* [http://downloads.openwrt.org/kamikaze/7.09/atheros-2.6/openwrt-atheros-2.6-vmlinux.lzma openwrt-atheros-2.6-vmlinux.lzma]
 
die beiden runterladen.
die beiden runterladen.




Jetzt kommts..
Jetzt kommts..
0. sudo ifconfig eth0 192.168.1.254
# Linux/Unix <pre>  sudo ifconfig eth0 192.168.1.254</pre> Vista <pre>  netsh interface ipv4 set address "LAN-Verbindung" static 192.168.1.254 255.255.255.0 192.168.1.1</pre>
1. Fonera mit ETHERNETKABEL an eth0 anstecken.
# Fonera mit Ethernet-Patchkabel an eth0 anstecken.
2. ./ap51-flash-fonera-1.0-38 eth0 openwrt-atheros-2.6-root.jffs2-64k  openwrt-atheros-2.6-vmlinux.lzma  
# Linux/Unix <pre>  ./ap51-flash-fonera-1.0-38 eth0 openwrt-atheros-2.6-root.jffs2-64k  openwrt-atheros-2.6-vmlinux.lzma</pre> unter Windows <code>ap51-flash-fonera-gui-1.0-38.exe</code> als Administrator ausführen
3. Strom an den Fonera anstecken  
# Strom an den Fonera anstecken  




Zeile 108: Zeile 111:
Zuerst sieht man die IP vom Router  
Zuerst sieht man die IP vom Router  
Dann steht da was von  
Dann steht da was von  
<pre>
Loading RootFS ..
Loading RootFS ..
Writing RootFS..  (10 Minuten)
Writing RootFS..  (10 Minuten)
Zeile 113: Zeile 117:
Writing Kernel..  
Writing Kernel..  
Rebooting Device..
Rebooting Device..
 
</pre>


Fertig.
Fertig.
Zeile 121: Zeile 125:




=== Flashen direkt aus laufendem OpenWRT ===
Wenn OpenWRT bereits läuft kann man auch direkt auf eine neue Version updaten bzw. diese über die grade laufende Version drüber flashen.
'''ABER VORSICHT!''' Das geht nur wenn die neuen Kernel- und Dateisystemimages gleich groß oder kleiner sind als die die aktuell installiert sind, sonst ist nicht genug Platz frei! In dem Fall müssen die Partitionen ohnehin neu angelegt werden - also eine der anderen hier beschriebenen Updateroutinen verwenden!!
Zuerst per SSH einloggen, dann:
<pre>
cd /tmp
scp user@host:/path/to/openwrt-atheros-vmlinux.lzma .
scp user@host:/path/to/openwrt-atheros-root.squashfs .
mtd -e vmlinux.bin.l7 write openwrt-atheros-vmlinux.lzma vmlinux.bin.l7
mtd -e rootfs write openwrt-atheros-root.squashfs rootfs
</pre>
</pre>
Danach einfach neu starten (Stecker ziehen), per Telnet einloggen und den SSH Zugang neu aktivieren (siehe unten)


=== set password after flashing ===
=== set password after flashing ===
Zeile 134: Zeile 151:
  *****
  *****


note: after flashing, the fingerprint of the router changes. in that case you can delete the known-hosts file from ssh:  
note: after flashing, the fingerprint of the router changes. in that case delete the old entry for 192.168.1.1 from your ssh known_hosts file:  
  rm ~/.ssh/known_hosts
  [open ~/.ssh/known_hosts with your favourite editor]
[remove the line starting with 192.168.1.1]
  ssh root@192.168.1.1
  ssh root@192.168.1.1
  yes
  yes
Zeile 143: Zeile 161:


== CONFIGURATION ==
== CONFIGURATION ==
=== network configuration files ===
=== default network configuration files ===
{|
{|
! file !! description
! file !! description
Zeile 168: Zeile 186:
|-
|-
| /etc/config/wireless || configures wireless lan adapter
| /etc/config/wireless || configures wireless lan adapter
|-
|}
|}


=== /etc/ethers ===
=== /etc/ethers ===
This file maps a given MAC-address to an IPv4-Address via DHCP. Example:
This file maps a given MAC-address to an IPv4-Address via DHCP. Example:
 
<pre>
# desktop
# desktop
xx:xx:xx:xx:xx:xx 192.168.1.2
xx:xx:xx:xx:xx:xx 192.168.1.10
# laptop
# another desktop
xx:xx:xx:xx:xx:xx 192.168.1.3
xx:xx:xx:xx:xx:xx 192.168.1.20
# another desktop
# laptop
xx:xx:xx:xx:xx:xx 192.168.1.4
xx:xx:xx:xx:xx:xx 192.168.1.30 # LAN
 
xx:xx:xx:xx:xx:xx 192.168.1.31 # WLAN
</pre>
Hint: You get the MAC-address using <code>ipconfig -all</code> on Windows or by using <code>ifconfig</code> on Linux/Unix.
Hint: You get the MAC-address using <code>ipconfig -all</code> on Windows or by using <code>ifconfig</code> on Linux/Unix.


Zeile 187: Zeile 205:
  127.0.0.1  www.mydomain.com  localhost.lan  www.lan  localhost  www
  127.0.0.1  www.mydomain.com  localhost.lan  www.lan  localhost  www
  192.168.1.4  ftp.mydomain.com  ftp.lan  ftp
  192.168.1.4  ftp.mydomain.com  ftp.lan  ftp
Hint: you can also use a hosts file to block bad sites; see also [http://en.wikipedia.org/wiki/Hosts_file#Custom_hosts_files custom hosts files]
=== /etc/networks ===
configures the names and addresses of networks. this file is used by the route command. Example:
<pre>
default  0.0.0.0      # default route    - mandatory
loopnet  127.0.0.0    # loopback network - mandatory
wlan      192.168.0.0  # local wireless network
lan      192.168.1.0  # local wired network
</pre>
=== /etc/protocols ===
Usually you [http://www.albinoblacksheep.com/flash/dont don't touch that].


=== /etc/config/network ===
=== /etc/config/network ===
See [http://downloads.openwrt.org/kamikaze/docs/openwrt.html#x1-80001.2.1 OpenWRT Kamikaze Manual] for setting up basic network configuration
See [http://downloads.openwrt.org/kamikaze/docs/openwrt.html#x1-80001.2.1 OpenWRT Kamikaze Manual] for setting up basic network configuration
; Example 0<nowiki>:</nowiki><br/>Routing between Ethernet and WLAN
<pre>
config interface loopback
  option ifname lo
  option proto static
  option ipaddr 127.0.0.1
  option netmask 255.0.0.0
config interface eth0
  option proto static
  option ipaddr 10.0.0.10        # bridge
  option netmask 255.255.255.0  # network subnet mask
  option gateway 10.0.0.138      # dsl/cable router
  option dns 10.0.0.138          # dns server
</pre>
''Note:'' Routing is enabled by default, so you usually don't have to configure routing tables.
; Example 1<nowiki>:</nowiki><br/>Bridging Ethernet and WLAN
<pre>
config interface loopback
  option ifname lo
  option proto static
  option ipaddr 127.0.0.1
  option netmask 255.0.0.0
config interface bridge
  option ifname eth0 wifi0      # which interfaces to bridge
  option type bridge
  option proto static
  option ipaddr 10.0.0.10        # bridge
  option netmask 255.255.255.0  # network subnet mask
  option gateway 10.0.0.138      # dsl/cable router
  option dns 10.0.0.138          # dns server
</pre>
; Example 2<nowiki>:</nowiki><br/>Bridging multiple Ethernet ports
<pre>
config interface loopback
  option ifname  lo
  option proto  static
  option ipaddr  127.0.0.1
  option netmask 255.0.0.0
config interface lan
  option ifname  'eth0 eth1 eth2'
  option type    bridge
  option proto  static
  option ipaddr  10.0.0.10      # bridge
  option netmask 255.255.255.0  # network subnet mask
  option gateway 10.0.0.138      # dsl/cable router
  option dns    10.0.0.138      # dns server
</pre>


=== /etc/config/wireless ===
=== /etc/config/wireless ===
See [http://downloads.openwrt.org/kamikaze/docs/openwrt.html#x1-80001.2.2 OpenWRT Kamikaze Manual] for setting up basic wireless network configuration
See [http://downloads.openwrt.org/kamikaze/docs/openwrt.html#x1-110001.2.2 OpenWRT Kamikaze Manual] for setting up basic wireless network configuration
 
 
; Example 0<nowiki>:</nowiki><br/>Routing Ethernet and WLAN without encryption
<pre>
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    0          # ssid broadcast
  option encryption "none"      # no encryption
</pre>
''Note:'' Routing is enabled by default, so you usually don't have to configure routing tables.
 
 
; Example 1<nowiki>:</nowiki><br/>Bridging Ethernet and WLAN with WPA2-PSK-encryption
<pre>
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    ath0      # 2nd interface is called "wifi0"
  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
</pre>
 
 
; Example 2<nowiki>:</nowiki><br/>Configure WDS
 
 
:WDS Access Point (WDS-AP; first node)
<pre>
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    ath0              # 2nd interface is called "wifi0"
  option network  bridge            # which settings from /etc/config/network
  option mode      ap                # access point mode
  option ssid      'My Fonera'        # name of the WDS-AP
  option bssid    '00:xx:xx:xx:xx:xx' # MAC-Address of the WDS-AP
  option hidden    0                  # enables ssid broadcast
  option encyption psk2              # wpa2-psk
  option key      ***********        # google 'wep key generator' to get a key
</pre>
 
 
:WDS-Station (WDS-STA; all other nodes)
<pre>
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    ath0              # 2nd interface is called "wifi0"
  option network  bridge            # which settings from /etc/config/network
  option mode      ap                # access point mode
  option ssid      'My Fonera'        # name of the WDS-AP
  option bssid    '00:xx:xx:xx:xx:xx' # MAC-Address of the WDS-AP
  option hidden    0                  # enables ssid broadcast
  option encyption psk2              # wpa2-psk
  option key      ***********        # google 'wep key generator' to get a key
</pre>
 
 
;Notes on WPA2-Encryption
For WPA2-Encryption you must install hostapd on Access Points
<pre>
ipkg install hostapd
</pre>
as well as wpa-supplicant on WDS-Stations
<pre>
ipkg install wpa-supplicant
</pre>
 
''FIXME:'' Encryption also may only work on interface <code>ath0</code>. Please share your experience here.
 
== INSTALLING PACKAGES ==
<u>After you have successfully configured a connection with the internet</u>, you can load additional software packages using [http://wiki.openwrt.org/OpenWrtDocs/Using#head-4e336635f25edc3d0a099d43120719ba4dfe3fbe ipkg].
 
FIXME: If you compiled OpenWRT yourself, you can register your computer as the package repository
 
; install packages
<pre>
ipkg update
ipkg list | more
ipkg install <packagename>
</pre>
 
 
; uninstall packages
<pre>
ipkg list_installed
ipkg remove <packagename>
</pre>
 
 
;Fette ipkg repositories
:http://downloads.openwrt.org/kamikaze/packages/mips/
:http://ipkg.k1k2.de/packages/


== Installing Packages ==
== MESH NETWORKS ==
After you have successfully configured a connection with the internet, you can load additional software packages using [http://wiki.openwrt.org/OpenWrtDocs/Using#head-4e336635f25edc3d0a099d43120719ba4dfe3fbe ipkg].
For Mesh Networks you have to install one of
* olsrd (may produce routing loops, but standardized and most widely deployed)
* batman (also included in the [http://www.blogin.it/ robin firmware]; does not scale for big networks; beta)
* babel (also works with wired connections; beta)
on all your nodes.  
 
''FIXME:'' write a howto


== CLONING ==
== CLONING ==
Zeile 220: Zeile 443:
<b>NB! This has not been tested very well, so use with caution until it's been more quality assured.</b>
<b>NB! This has not been tested very well, so use with caution until it's been more quality assured.</b>
Bugreports are welcome :)
Bugreports are welcome :)
''kyrah says:'' I've tried cloning my Fonera (running OpenWrt) using these instructions, resulting in #fail:
Looks like the rootfs_data partition is overwritten when firstboot is run. Must investigate further.


==SOFTWARE==
==SOFTWARE==
;software zum flashen + packages ..
:http://download.berlin.freifunk.net/fonera/


software zum flashen + packages ..
;Buildchain
http://download.berlin.freifunk.net/fonera/
:http://wiki.openwrt.org/BuildingPackagesHowTo
 
:<code>svn co https://svn.openwrt.org/openwrt/tags/kamikaze_7.09</code>
 
:http://forum.openwrt.org/viewtopic.php?pid=31794#p31794
Buildchain
http://wiki.openwrt.org/BuildingPackagesHowTo
 
svn co https://svn.openwrt.org/openwrt/tags/kamikaze_7.09
 
http://forum.openwrt.org/viewtopic.php?pid=31794#p31794
 


Fettes ipkg repository
;Fette ipkg repositories
http://downloads.openwrt.org/kamikaze/packages/mips/
:http://downloads.openwrt.org/kamikaze/packages/mips/
:http://ipkg.k1k2.de/packages/


==HARDWARE==
==HARDWARE==
;LCD am fonera?
:http://www.lefinnois.net/wpen/index.php/2007/11/11/lcd-screen-for-la-fonera/


;I2C bus?
:http://www.lefinnois.net/wpen/index.php/2007/05/13/i2c-bus-for-la-fonera/


LCD am fonera?
;SD card am fonera?
http://www.lefinnois.net/wpen/index.php/2007/11/11/lcd-screen-for-la-fonera/
:http://www.larsen-b.com/Article/262.html
 
:http://phrozen.org/fonera.html
I2C bus?
http://www.lefinnois.net/wpen/index.php/2007/05/13/i2c-bus-for-la-fonera/
 
SD card am fonera?
http://www.larsen-b.com/Article/262.html
http://phrozen.org/fonera.html
 
 
 
GPIO kernel modul
http://mobileaccess.de/fonera/gpio/
http://daubau.net/proc_gpio/
 
Fertig compiliertes GPIO kernelmodul im feschen .ipk + src
[[Media:Kamikaze_7.09_GPIOkmod.tar.gz]]


;GPIO kernel modul
:http://mobileaccess.de/fonera/gpio/
:http://daubau.net/proc_gpio/


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


[[Kategorie:0xFF]]
[[Kategorie:0xFF]]