Instructions for setting up a WRT54x router with OpenWRT and B.A.T.M.A.N.

Reflashing OpenWRT

1/ root@bunny:/tftpboot# ifconfig eth0 192.168.1.2 netmask 255.255.255.0 root@bunny:/tftpboot# echo -e "binary\nrexmt 1\ntimeout 60\ntrace\nput openwrt-g-freifunk-1.6.36-en.bin\n" | tftp 192.168.1.1

2/ Failsafe mode: power up WRT, wait for DMZ to light, hold down reset for 5 secs, this sets IP to 192.168.1.1, use web interface

3/ Change Password, set up IP on Lan interface.

4/ Reboot into normal mode, mv OLSR + firewall scripts in /etc/init.d to disable and reboot, e.g.:

root@Freifunk:/etc/init.d mkdir old root@Freifunk:/etc/init.d# mv S45firewall S53olsrd S90olsr-prio old

5/ Plug cable into WAN connector to get DCHP connection to Internet.

5a/ Use Wireless part of Web GUI to set:

WLAN Protocol..: Static WLAN-IP Address: 10.130.1.4 WLAN Netmask...: 255.0.0.0 WLAN Mode......: Ad Hoc ESSID..........: potato BSSID..........: 02:CA:FF:EE:BA:BE Channel........: 10

6/ BATMAN install:

root@Freifunk:~# ipkg install http://downloads.open-mesh.net/batman/stable/binaries/wrt-freifunk/batmand_0.3.1-current_mipsel-wr-elf-32-lsb-dynamic.ipk Downloading http://downloads.open-mesh.net/batman/stable/binaries/wrt-freifunk/batmand_0.3.1-current_mipsel-wr-elf-32-lsb-dynamic.ipk

root@Freifunk:/etc/init.d# ipkg update root@Freifunk:/etc/init.d# ipkg install kmod-tun libpthread

7/ Create this file to start batman

root@Freifunk:/etc/init.d# cat > S95meshnetwork sleep 2 ip addr add dev br0 10.30.4.1/24 brd 10.30.4.255 label br0:1 batmand -a 10.30.4.0/24 eth1 CTRL-D CTRL-D is the keyboard sequence to close the file. Don't type C-T-R-L---D. :-)