Differences between revisions 1 and 4 (spanning 3 versions)
Revision 1 as of 2006-10-04 00:44:11
Size: 6580
Comment: initial whack, not yet complete
Revision 4 as of 2006-10-04 12:02:35
Size: 7583
Comment:
Deletions are marked like this. Additions are marked like this.
Line 7: Line 7:
 * Netgear WGT634u4902  * Netgear WGT634u
Line 156: Line 156:
== Configuration ==

To get a console prompt, wait until the bootup has finished, and press enter to wake up a shell. You can configure your ethernet network as follows (assuming you have a DHCP server available):

{{{
udhcpc -i eth0
}}}

In order to take advantage of your buildroot-ng ipkg's, you first need to modify /etc/ipkg.conf:

{{{
src snapshots http://www.personaltelco.net/~russell/buildroot-ng/r4902
#src snapshots http://openwrt.org/downloads/snapshots/brcm-2.6/packages
dest root /
dest ram /tmp
}}}

To update your WGT634U using this package archive:

{{{
ipkg update
}}}

Now, start adding packages:

{{{
ipkg install <foo>
}}}

where foo is:
 * kmod-usb2
 * kmod-usb-storage
 * kmod-usb-serial-pl2303
 * kmod-fs-vfat
 * kmod-alsa
 * kmod-soundcore
 * kmod-usb-audio (this package seems to be missing!)
 * gpsd-old (this is an older version of gpsd that works better than new versions, i should go back and add how I built this above)
 *
 * <etc>

Netgear WGT634U-based Network Stumbler

This is a description of how RussellSenior goes about building a stumbler device based on the NetgearWgt643u and OpenWrt. This is experimental software. Follow these instructions at your own risk.

Hardware

  • Netgear WGT634u
  • USB2 hub
  • USB storage device
  • USB GPS device (such as the GlobalSat BU-353)

  • 3.3V serial console cable for WGT634U
  • random, compact USB device (optional, used as an enable-key)

Building OpenWrt Software

Currently, I am using the buildroot-ng svn tree. This description is based on the already obsolete r4902.

cd /src/openwrt
svn co https://svn.openwrt.org/openwrt/branches/buildroot-ng 
svn co https://svn.openwrt.org/openwrt/packages 
cd /src/openwrt/buildroot-ng/openwrt/package 
for i in $(find ../../../packages -type d | grep -v .svn | awk -F/ 'NF==6') ; do echo $i ; ln -s $i $(echo $i | awk -F/ '{ print $6 }') ; done
cd /src/openwrt/buildroot-ng/openwrt
make menuconfig
make

In the menuconfig, I set the Target System to (Broadcom BCM47xx/53xx [2.6]), and for kicks I also "Select all packages by default" and enable a few things (which I am currently forgetting) that don't automatically get configured in. Often, you will find packages that won't build for some reason or another. In those cases, open a ticket, deconfigure the package in menuconfig and try again. Run make alone to see abbreviated messages, or make V=99 to get lots of information. The configuration I used for r4902 can be found [http://www.personaltelco.net/~russell/buildroot-ng/config-r4902 here].

When the build is complete, the resulting files will be found thusly:

  • /src/openwrt/buildroot-ng/openwrt/bin contains the flashable images

  • /src/openwrt/buildroot-ng/openwrt/bin/packages contains the .ipk files

Additionally, as of my recent attempts, the Packages file that is needed for the ipkg utility to function properly later on is apparently not constructed (maybe I missed it), but I developed a script that does it for me:

TOPDIR="/src/openwrt/buildroot-ng/openwrt"

CTRLDIR="${TOPDIR}/build_mipsel"
PKGSDIR="${TOPDIR}/bin/packages"
PKGSFIL="${PKGSDIR}/Packages"

rm -f ${PKGSFIL}

for i in $(find ${CTRLDIR} -name 'control' | grep CONTROL) ; 
  do echo $i ; 
  PACKAGE=$(grep ^Package: $i | cut -d' ' -f2) ; 
  VERSION=$(grep ^Version: $i | cut -d' ' -f2) ; 
  ARCH=$(grep ^Architecture: $i | cut -d' ' -f2) ; 
  FILENAME="${PACKAGE}_${VERSION}_${ARCH}.ipk" ;
  IPKG="${PKGSDIR}/${FILENAME}"
  if [ -f ${IPKG} ] ; then
      SIZE=$(wc -c ${IPKG} | cut -d' ' -f1) ; 
      MD5=$(md5sum ${IPKG} | cut -d' ' -f1) ; 
      cat $i >> ${PKGSFIL} ; 
      echo "Filename: ${FILENAME}" >> ${PKGSFIL} ; 
      echo "Size: ${SIZE}" >> ${PKGSFIL} ; 
      echo "MD5Sum: ${MD5}" >> ${PKGSFIL} ; 
      echo "" >> ${PKGSFIL} ; 
  else
      echo "${FILENAME} NOT FOUND!"
  fi
done

Now, you can copy the ipkg repository somewhere wget'able, e.g.:

rsync -v -a -H /src/openwrt/buildroot-ng/openwrt/bin/packages/ donk.personaltelco.net:public_html/buildroot-ng/r4902/

Checking out the WGT634U

If this is a new device, it is probably a good idea to check it out on the stock firmware first to make sure it functions.

  • apply power
  • use another computer to associate over the wireless

The Flash Environment

There is more than one way to flash the newly-built image onto the WGT634U.

CFE TFTP Flash-From-Console Method

This is the method I tend to use. For this, you will need a TFTP server and a serial console cable. On my debian/unstable box, I use the tftpd-hpa package.

  • copy the image file to the TFTP server directory.
    cp /src/openwrt/buildroot-ng/openwrt/bin/openwrt-wgt634u-2.6-jffs2.bin /var/lib/tftpboot/wgt634u/openwrt-wgt634u-2.6-jffs2-r4902.bin
  • open the WGT634U case by removing 4 screws from the bottom. These are either ordinary phillips (often seen on the refurbs) or T-8 torx screws.
  • connect the serial console to the WGT634U
  • connect a LAN network cable to the WAN port (nearest the USB port)
  • while holding Ctrl-C on the serial console, apply power:
    CFE version 1.0.34 for BCM95365R (32bit,SP,LE)
    Build Date: Tue Feb 24 03:21:41 CST 2004 (root@jackylinux)
    Copyright (C) 2000,2001,2002 Broadcom Corporation.
    
    Add MAC client version(DNI).
    Initializing Arena.
    Initializing Devices.
    et0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller
    CPU type 0x29007: 200MHz
    Total memory: 0x2000000 bytes (32MB)
    
    Total memory used by CFE:  0x81BB1280 - 0x82000000 (4517248)
    Initialized Data:          0x81BB1280 - 0x81BB3E90 (11280)
    BSS Area:                  0x81BB3E90 - 0x81BB45D0 (1856)
    Local Heap:                0x81BB45D0 - 0x81FB45D0 (4194304)
    Stack Area:                0x81FB45D0 - 0x81FB65D0 (8192)
    Text (code) segment:       0x81FB65E0 - 0x81FFFFB0 (301520)
    Boot area (physical):      0x01B70000 - 0x01BB0000
    Relocation Factor:         I:E23B65E0 - D:01BB0280
    
    configure vlans
    *****************************************************************
    *********************** VLAN Driver initial  ********************
    *****************************************************************
    Process LAN port(2-5) vlan Architecture...
    SUCCESS: trying to create VLAN 0 for switch
    SUCCESS: trying to add LAN port
    
    Process WAN port(2-5) vlan Architecture...
    SUCCESS: trying to create VLAN 0 for switch
    SUCCESS: trying to add WAN port
    SUCCESS: enable ports  success
    configure vlans...done
    Automatic startup canceled via Ctrl-C
    CFE> ^C
    CFE> 
  • Configure the network. This is easiest if there is a DHCP server on the network:
    CFE> ifconfig eth0 -auto
    Device eth0:  hwaddr 00-0F-B5-97-29-39, ipaddr 192.168.0.145, mask 255.255.255.0
            gateway 192.168.0.1, nameserver 192.168.0.1, domain personaltelco.net
    *** command status = 0
  • You can blank out the flash using specially prepared wipe images. Note that the file size that you can TFTP is limited so this must be done in two steps. This might in fact be unnecessary, but it works for me:
    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
  • Now, flash the image you want to use and reboot:
    CFE> flash -noheader 192.168.0.5:wgt634u/openwrt-wgt634u-2.6-jffs2-r4902.bin flash0.os
    CFE> reboot

Configuration

To get a console prompt, wait until the bootup has finished, and press enter to wake up a shell. You can configure your ethernet network as follows (assuming you have a DHCP server available):

udhcpc -i eth0

In order to take advantage of your buildroot-ng ipkg's, you first need to modify /etc/ipkg.conf:

src snapshots http://www.personaltelco.net/~russell/buildroot-ng/r4902
#src snapshots http://openwrt.org/downloads/snapshots/brcm-2.6/packages
dest root /
dest ram /tmp

To update your WGT634U using this package archive:

ipkg update

Now, start adding packages:

ipkg install <foo>

where foo is:

  • kmod-usb2
  • kmod-usb-storage
  • kmod-usb-serial-pl2303
  • kmod-fs-vfat
  • kmod-alsa
  • kmod-soundcore
  • kmod-usb-audio (this package seems to be missing!)
  • gpsd-old (this is an older version of gpsd that works better than new versions, i should go back and add how I built this above)
  • <etc>

REST OF INSTRUCTIONS, TO FOLLOW

WgtStumbler (last edited 2007-11-23 18:02:18 by localhost)