Differences between revisions 11 and 12
Revision 11 as of 2006-09-23 14:45:59
Size: 5257
Comment: less pasting/typing is good
Revision 12 as of 2007-01-17 17:06:03
Size: 2631
Comment: sync up instructions with latest build, remove old stuff
Deletions are marked like this. Additions are marked like this.
Line 7: Line 7:
 * load OpenWrt Kamikaze in a normal fashion, via serial console:  * load OpenWrt Kamikaze (here r6007) in a normal fashion, via serial console:
Line 12: Line 12:
CFE> flash -noheader 192.168.0.5:wgt634u/openwrt-wgt634u-2.6-squashfs-r3794.bin flash0.os CFE> flash -noheader 192.168.0.5:wgt634u/openwrt-wgt634u-2.6-jffs2-r6007.bin flash0.os
Line 16: Line 16:
 * log into the AP  * log into the AP via serial console
Line 18: Line 18:
 * install USB modules:  * set root password:
Line 20: Line 20:
cd /tmp
scp 192.168.0.4:/src/kamikaze4/trunk/openwrt/bin/packages/kmod-usb-core_2.6.16.7-brcm-1_mipsel.ipk .
scp 192.168.0.4:/src/kamikaze4/trunk/openwrt/bin/packages/kmod-usb2_2.6.16.7-brcm-1_mipsel.ipk .
scp 192.168.0.4:/src/kamikaze4/trunk/openwrt/bin/packages/kmod-zd1211_2.6.16.7+r69-brcm-1_mipsel.ipk .
ipkg install kmod-usb-core_2.6.16.7-brcm-1_mipsel.ipk
ipkg install kmod-usb2_2.6.16.7-brcm-1_mipsel.ipk
ipkg install kmod-zd1211_2.6.16.7+r69-brcm-1_mipsel.ipk
passwd
Line 29: Line 23:
 * change root password  * configure /etc/ipkg.conf to point at a compatible package archive:
Line 31: Line 25:
passwd src snapshots http://www.personaltelco.net/~russell/openwrt/r6007/packages
dest root /
dest ram /tmp
Line 34: Line 30:
 * modify /etc/modules.d
  * remove encryption modules from 20-madwifi
    {{{
cd /etc/modules.d
rm 20-madwifi
cp /rom/etc/modules.d/20-madwifi .
vi 20-madwifi
 * install zd1211 packages:
   {{{
ipkg install kmod-usb2
ipkg install kmod-zd1211
Line 43: Line 36:
  * add a file for zd1211:
    {{{
cat > /etc/modules.d/70-zd1211 <<EOF
zd1211
EOF
 * install iproute2 tools because I like them:
   {{{
ipkg install ip
Line 50: Line 41:
 * modify /etc/init.d
  * add some lines to S20madwifi:
    {{{
cd /etc/init.d
rm S20madwifi
cp /rom/etc/init.d/S20madwifi .
cat >> S20madwifi <<EOF
 * configure /etc/config/wireless:
   {{{
config wifi-device wifi0
        option type atheros
        option channel 11
Line 58: Line 47:
iwconfig ath0 essid www.personaltelco.net/repeater
iwconfig ath0 channel 11
EOF
config wifi-iface
        option device wifi0
# option network lan
        option mode ap
        option ssid www.personaltelco.net/repeater
        option hidden 0
        option encryption none
Line 63: Line 56:
  * remove S45firewall  * disable firewall script:
   {{{
rm /etc/rc.d/S45firewall
}}}

 * modify the lan stanza in /etc/config/network:
   {{{
#### LAN configuration
config interface lan
        option type bridge
        option ifname "eth0.0 ath0"
        option proto static
        option ipaddr 192.168.3.1
        option netmask 255.255.255.0
}}}

 * add a file /etc/init.d/repeater:
Line 65: Line 74:
rm /etc/init.d/S45firewall
}}}
  * add a file S90repeater:
    {{{
cat > /etc/init.d/S90repeater <<EOF
cat > /etc/init.d/repeater <<EOF
Line 80: Line 85:
chmod 755 /etc/init.d/S90repeater chmod 755 /etc/init.d/repeater
Line 83: Line 88:
 * Modify /etc/config/network to:  * create a link in /etc/rc.d:
Line 85: Line 90:
lan_ipaddr="192.168.3.1"
wan_proto=none
cd /etc/rc.d
ln -s /etc/init.d/repeater S90repeater
Line 89: Line 94:

== Experimenting with OpenWrt buildroot-ng ==

 * load OpenWrt buildroot-ng in a normal fashion, via serial console:
 * turn of wan stanza's dhcp in /etc/config/network:
Line 94: Line 96:
CFE> ifconfig eth0 -auto
CFE> flash -noheader 192.168.0.5:wgt634u/wipe-1.img flash0.os
CFE> flash -noheader -offset=3932160 192.168.0.5:wgt634u/wipe-2.img flash0.os
CFE> flash -noheader 192.168.0.5:wgt634u/openwrt-wgt634u-2.6-jffs2-r4778.bin flash0.os
CFE> reboot
#### WAN configuration
config interface wan
        option ifname "eth0.1"
        option proto none
Line 100: Line 101:

 * log into the AP
  * with serial console, just press enter

 * configure network
  * WAN port defaults to 192.168.1.1, but can get a local address by running
    {{{
udhcpc -i eth0
}}}

 * install USB modules:
   {{{
cd /tmp
scp 192.168.0.4:/src/kamikaze6/buildroot-ng/openwrt/bin/packages/kmod-usb-core_2.6.17-brcm-1_mipsel.ipk .
scp 192.168.0.4:/src/kamikaze6/buildroot-ng/openwrt/bin/packages/kmod-usb2_2.6.17-brcm-1_mipsel.ipk .
scp 192.168.0.4:/src/kamikaze6/buildroot-ng/openwrt/bin/packages/kmod-zd1211_2.6.17+r69-brcm-1_mipsel.ipk .
ipkg install kmod-usb-core_2.6.17-brcm-1_mipsel.ipk
ipkg install kmod-usb2_2.6.17-brcm-1_mipsel.ipk
ipkg install kmod-zd1211_2.6.17+r69-brcm-1_mipsel.ipk
}}}

 or more succinctly:
  {{{
cd /tmp
scp 192.168.0.4:/src/kamikaze6/buildroot-ng/openwrt/bin/packages/kmod-{usb-core_2.6.17,usb2_2.6.17,zd1211_2.6.17+r69}-brcm-1_mipsel.ipk .
ipkg install *.ipk
}}}

 * change root password
   {{{
passwd
}}}

 * modify /etc/modules.d
  * remove encryption modules from 20-madwifi
    {{{
cd /etc/modules.d
vi 20-madwifi
}}}

  * add a file for zd1211:
    {{{
cat > /etc/modules.d/70-zd1211 <<EOF
zd1211
EOF
}}}

 * modify /etc/init.d

  * add some lines to S20madwifi:
    {{{
cd /etc/init.d
cat >> S20madwifi <<EOF

iwconfig ath0 essid www.personaltelco.net/repeater
iwconfig ath0 channel 11
EOF
}}}

  * remove S45firewall
    {{{
rm /etc/init.d/S45firewall
}}}
  * add a file S90repeater:
    {{{
cat > /etc/init.d/S90repeater <<EOF
#!/bin/sh

echo "Initializing Repeater"

/sbin/ifconfig wlan0 up
/usr/sbin/iwconfig wlan0 essid www.personaltelco.net
while /usr/sbin/iwconfig wlan0 2>/dev/null | grep Access | awk '{ print $5 }' | grep 00:00:00:00:00:00 ; do sleep 1 ; done
/sbin/udhcpc -i wlan0
/usr/sbin/iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
EOF
chmod 755 /etc/init.d/S90repeater
}}}

 * Modify /etc/config/network to:

   {{{
cat > /etc/config/network <<EOF
config interface wan
        option ifname eth0
        option proto static
        option ipaddr 192.168.1.1
        option netmask 255.255.255.0

config interface lan
        option type "bridge"
        option ifname "ath0 eth0.1 eth0.2 eth0.3 eth0.4"
        option proto "static"
        option ipaddr "192.168.3.1"
        option netmask "255.255.255.0"

config interface wlan
        option ifname wlan0
        option proto "none"
EOF
}}}

The MississippiNetworkRepeater is a NetgearWgt634u loaded with OpenWRT. It uses a HawkingHwu54g USB 802.11g radio as a client to any nearby www.personaltelco.net network and operates its native radio as a local coverage access point.

Building

To build one of the devices:

  • load OpenWrt Kamikaze (here r6007) in a normal fashion, via serial console:

    • CFE> ifconfig eth0 -auto
      CFE> flash -noheader 192.168.0.5:wgt634u/wipe-1.img flash0.os
      CFE> flash -noheader -offset=3932160 192.168.0.5:wgt634u/wipe-2.img flash0.os
      CFE> flash -noheader 192.168.0.5:wgt634u/openwrt-wgt634u-2.6-jffs2-r6007.bin flash0.os
      CFE> reboot
  • log into the AP via serial console
  • set root password:
    • passwd                                                          
  • configure /etc/ipkg.conf to point at a compatible package archive:
    • src snapshots http://www.personaltelco.net/~russell/openwrt/r6007/packages
      dest root /
      dest ram /tmp
  • install zd1211 packages:
    • ipkg install kmod-usb2
      ipkg install kmod-zd1211
  • install iproute2 tools because I like them:
    • ipkg install ip
  • configure /etc/config/wireless:
    • config wifi-device  wifi0
              option type     atheros
              option channel  11
      
      config wifi-iface
              option device   wifi0
      #       option network  lan
              option mode     ap
              option ssid     www.personaltelco.net/repeater
              option hidden   0
              option encryption none
  • disable firewall script:
    • rm /etc/rc.d/S45firewall
  • modify the lan stanza in /etc/config/network:
    • #### LAN configuration
      config interface lan
              option type     bridge
              option ifname   "eth0.0 ath0"
              option proto    static
              option ipaddr   192.168.3.1
              option netmask  255.255.255.0
  • add a file /etc/init.d/repeater:
    • cat > /etc/init.d/repeater <<EOF
      #!/bin/sh
      
      echo "Initializing Repeater"
      
      /sbin/ifconfig wlan0 up
      /usr/sbin/iwconfig wlan0 essid www.personaltelco.net
      while /usr/sbin/iwconfig wlan0 2>/dev/null | grep Access | awk '{ print $5 }' | grep 00:00:00:00:00:00 ; do sleep 1 ; done
      /sbin/udhcpc -i wlan0
      /usr/sbin/iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
      EOF
      chmod 755 /etc/init.d/repeater
  • create a link in /etc/rc.d:
    • cd /etc/rc.d
      ln -s /etc/init.d/repeater S90repeater
  • turn of wan stanza's dhcp in /etc/config/network:
    • #### WAN configuration
      config interface        wan
              option ifname   "eth0.1"
              option proto    none

MississippiNetworkRepeater (last edited 2007-11-23 18:03:15 by localhost)