WRT54GS project: Difference between revisions

From Wildsong
Jump to navigationJump to search
Brian Wilson (talk | contribs)
Brian Wilson (talk | contribs)
mNo edit summary
Line 1: Line 1:
[[Category: Electronics]]
[[Category: WiFi]]
==Log==
==Log==



Revision as of 23:20, 8 February 2009


Log

05-Mar-2006 Got the WRT54GS out and dusted it off and set it up to test network configurations. I think I need 5 more of these, they are so small and so handy.

23-Aug-2005 -- I just checked in on the uClibc site and discovered the new buildroot project. This is the best thing since sliced cheese. I set it up to use subversion and built a complete embeddable Linux system from scratch in just a few hours, including the entire gcc tool chain. I have it booting up a VMWARE machine.

Next I will make it boot an old PC using a 32MB compact flash in an IDE adapter.


2004 - So far, I have gotten my WRT54GS (from www.redzuco.com) and flashed it with OpenWRT thereby voiding the waranty.

Someelses photos http://wiki.version6.net/WRT54GS

Potential projects

Install serial port header. Install one MAX chip and a DB9 to use as a console port. http://www.rwhitby.net/wrt54gs/serial.html

The pinout of JP1 on the Linksys PCB is as follows:

Pin  1: 3.3V        Pin  2: 3.3V
Pin  3: Tx (ttyS1)  Pin  4: Tx (ttyS0)
Pin  5: Rx (ttyS1)  Pin  6: Rx (ttyS0)
Pin  7: NC          Pin  8: NC
Pin  9: GND         Pin 10: GND


Install a JTAG header

Connect the second serial port (at TTL signal levels) to the Garmin GPS-25.

Stream NMEA data from the GPS to clients

Parse NMEA data and make it a NTP server

Play with bandwidth management

Build a weather station

Alternative hardware

WRT54GL is a recent variant of the WRT54G but with Linux software on it and 4MB Flash / 16 MB RAM. The current WRT54G (version 4 and higher) cannot be reflashed. Version 5 has only 2 MB of flash anyway. Same for the WRT54GS. If buying another WRT54GS get one that is version 3 or lower.

Soekris hardware (which board)?

Linux Router Board?

Which is the current top contender for a miniPCI or CF radio card?

What's happening down in SF these days?

OpenWRT Packages

I don't have the latest OpenWRT installed but I know that if they are not included, to the standard distribution I would add these:

dhcpd

openssh (and configure it as both a client and server)

tcpdump and traceroute

Notes

You can telnet into the router and it gives you a root prompt. It uses a bridged configuration.

/dev/eth0 is the wired ports; vlan0 is LAN and vlan1 is WAN port

/dev/eth1 is wireless

LAN (vlan0) and WiFI are bridged together on /dev/br0

  1. ifconfig br0

br0 Link encap:Ethernet HWaddr 00:12:17:0C:CB:37

         inet addr:192.168.123.252  Bcast:192.168.123.255  Mask:255.255.255.0
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:29539 errors:0 dropped:0 overruns:0 frame:0
         TX packets:241 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:0
         RX bytes:3257198 (3.1 MiB)  TX bytes:22167 (21.6 KiB)


# ifconfig
lo       Link encap:Local Loopback
         inet addr:127.0.0.1  Mask:255.0.0.0
         UP LOOPBACK RUNNING  MTU:16436  Metric:1
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0
         TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:0
         RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

vlan0    Link encap:Ethernet  HWaddr 00:12:17:0C:CB:37
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:102747 errors:0 dropped:0 overruns:0 frame:0
         TX packets:479 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:0
         RX bytes:7878788 (7.5 MiB)  TX bytes:75863 (74.0 KiB)

vlan1    Link encap:Ethernet  HWaddr 00:12:17:0C:CB:38
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0
         TX packets:63201 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:0
         RX bytes:0 (0.0 B)  TX bytes:37541394 (35.8 MiB)

To enable the WAN port you have to give it an IP address, either in the /etc files or via command line eg ifconfig vlan1 new address up

# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.123.0   *               255.255.255.0   U     0      0        0 br0


# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
DROP       all  --  anywhere             anywhere            state INVALID
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     icmp --  anywhere             anywhere
REJECT     tcp  --  anywhere             anywhere            reject-with tcp-reset
REJECT     all  --  anywhere             anywhere            reject-with icmp-port-unreachable

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
DROP       all  --  anywhere             anywhere            state INVALID
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
DROP       all  --  anywhere             anywhere            state INVALID,NEW
TCPMSS     tcp  --  anywhere             anywhere            tcp flags:SYN,RST/SYN TCPMSS clamp to PMTU

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
# nvram show
wl_radius_port=1812
wl_mac_deny=
filter_dport_grp3=
filter_dport_grp4=
filter_dport_grp5=
filter=on
wan_unit=0
wl0_net_mode=mixed
filter_dport_grp6=
os_ram_addr=80001000
filter_dport_grp7=
wl0_frameburst=on
filter_dport_grp8=
filter_dport_grp9=
ddns_username_2=
log_ipaddr=0
boardrev=0x10
il0macaddr=00:12:17:0c:cb:39
ppp_idletime=5
ppp_passwd=
ddns_enable=0
et0macaddr=00:12:17:0C:CB:37
skip_intel_check=0
wl0_wep_buf=
ddns_hostname_buf=
d11g_mode=0
wan_get_dns=
boot_wait=on
watchdog=5000
wl0_macmode1=disabled
wl_phytypes=
filter_web_host1=
action_service_arg1=
wl0_infra=1
filter_web_host2=
wl0_country_code=AU
filter_web_host3=
fw_disable=0
et0mdcport=0
router_name=WRT54GS
pppoe_keepalive=0
filter_web_host4=
artemis_HB_DB=
filter_web_host5=
Intel_firmware_version=v1.41.8
filter_web_host6=
wl_infra=1
filter_web_host7=
filter_web_host8=
filter_web_host9=
pptp_server_ip=
ppp_get_ac=
pmon_ver=CFE 2004.1.30.0
restore_defaults=0
ppp_username=
wan_lease=0
filter_port=
ddns_enable_buf=
d11g_dtim=1
ddns_hostname=
wl_radius_ipaddr=
http_wanport=8080
filter_ip_grp1=
filter_ip_grp2=
wl0_ifname=eth1
filter_ip_grp3=
dr_lan_rx=0
filter_ip_grp4=
lan_domain=
filter_ip_grp5=
timer_interval=3600
filter_ip_grp6=
gpio2=adm_eecs
pppoe_ac=
filter_ip_grp7=
filter_rule1=
gpio3=adm_eesk
hb_server_ip=
ipsec_pass=1
filter_ip_grp8=
filter_rule2=
filter_ip_grp9=
filter_rule3=
gpio5=adm_eedi
vlan0ports=1 2 3 4 5*
filter_rule4=
gpio6=adm_rc
filter_rule5=
filter_ip_grp10=
filter_rule6=
wl0_mode=ap
filter_rule7=
wan_gateway=0.0.0.0
dhcp_start=100
filter_rule8=
filter_rule9=
os_flash_addr=bfc40000
wl0_gmode=0
dhcp_lease=0
sromrev=2
boardtype=0x0101
wl_active_add_mac=0
wl_gmode=0
ping_ip=
stats_server=
static_route=
d11g_rate=0
wl0_wep_last=
lan_netmask=255.255.255.0
dmz_enable=0
wl0_dtim=1
wl0_ssid=wildsong
http_username=
port_trigger=
filter_web_host10=
os_date=Feb 26 2004
http_lanport=80
wl_plcphdr=long
filter_mac_grp1=
wl_macmode=disabled
ppp_service=
ppp_redialperiod=30
filter_mac_grp2=
filter_mac_grp3=
wan_domain=wildsong.biz
wan_hwname=
wl0_key1=
wl_phytype=g
filter_mac_grp4=
wan_netmask=0.0.0.0
lan_lease=86400
wl0id=0x4320
wl0_key2=
pppoe_static_ip=
filter_mac_grp5=
wl_lazywds=1
wl0_key3=
filter_mac_grp6=
wl0_key4=
filter_mac_grp7=
filter_mac_grp8=
filter_client0=
filter_mac_grp9=
filter_maclist=
pptp_pass=1
pptp_get_ip=
wl_auth_mode=disabled
ppp_demand=0
mtu_enable=0
ppp_keepalive=0
block_activex=0
d11g_rts=2347
remote_mgt_https=0
wl_wpa_psk=
http_passwd=admin
ag0=255
block_wan=1
lan_stp=0
skip_amd_check=0
wl_mode=ap
artemis_enable=0
wl0_plcphdr=long
wl0_rate=0
wl0_closed=0
wl_wpa_gtk_rekey=3600
wl_afterburner_override=-1
d11g_rateset=default
wl0_macmode=disabled
wl0_radioids=BCM2050
wl0_phytype=g
wl0gpio2=0
dr_wan_rx=0
filter_tod_buf1=
wl0_lazywds=1
wl0gpio3=0
block_proxy=0
filter_tod_buf2=
filter_tod_buf3=
filter_tod_buf4=
boardflags2=0
filter_tod_buf5=
http_client_ip=192.168.123.249
dr_lan_tx=0
filter_tod_buf6=
wl0_antdiv=-1
filter_tod_buf7=
filter_tod10=
lan_hwaddr=00:12:17:0C:CB:37
filter_tod_buf8=
wan_dns=
http_client_mac=00:10:C6:10:74:5C
filter_tod_buf9=
action_service=
wl_dtim=1
wl_ssid=wildsong
wl0_wpa_psk=
artemis_provisioned=0
d11g_bcn=100
wl0_mac_list=
wl_passphrase=
daylight_time=1
flash_type=Intel 28F640J3 4Mx16
security_mode=disabled
dhcp_wins=wan
bcm4712_firmware_version=v1.50.0
multicast_pass=1
filter_tod_buf10=
os_server=
pppoe_static=0
hb_server_domain=
wl_key1=
wan_proto=dhcp
wl_key2=
wl0_unit=0
wl_key3=
wl_country_code=AU
wl_key4=
ddns_cache=
wl_hwaddr=
aol_block_traffic1=0
static_route_name=
aol_block_traffic2=0
wl_active_mac=
wl_net_mode=b-only
pa0itssit=62
forward_port=
d11g_frag=2346
wl0_wds=
filter_mac_grp10=
wl_rate=0
ppp_static_ip=
artemis_SVCGLOB=
block_java=0
log_level=0
cctl=0
ntp_server=
ct_modules=
wan_hwaddr=00:12:17:0C:CB:38
lan_ifnames=vlan0 eth1 eth2 eth3
wl_macmode1=disabled
pppoe_ifname=
wl0_mac_deny=
wl0_radius_port=1812
wl0_auth=0
wl0_radius_ipaddr=
pppoe_service=
wl_country=Worldwide
pa0maxpwr=0x48
traceroute_ip=
ddns_change=
remote_management=0
wan_ifnames=vlan1
block_loopback=0
wl_rateset=default
wl_wep_bit=64
ppp_mru=1500
wl_radius_key=
filter_port_grp1=
lan_proto=static
os_name=linux
clkfreq=200
lan_ipaddr=192.168.123.252
filter_port_grp2=
vlan1hwname=et0
aa0=3
ddns_passwd_2=
filter_port_grp10=
filter_port_grp3=
dr_wan_tx=0
wl_unit=0
filter_port_grp4=
filter_id=1
wl0_phytypes=g
firmware_version=v2.07.1
filter_port_grp5=
wl0_frag=2346
d11g_channel=6
wl0_wep=off
filter_port_grp6=
router_disable=0
ddns_username=
filter_port_grp7=
ddns_passwd=
pppoe_passwd=
filter_port_grp8=
filter_port_grp9=
ppp_ac=
log_enable=0
sdram_config=0x0022
filter_web_url10=
wl0_country=Worldwide
dmz_ipaddr=0
vlan1ports=0 5
security_mode_last=
wl_wds=
ddns_hostname_2=
scratch=a0180000
ccode=0
wl0_rateset=default
wl0_wep_bit=64
pppoe_idletime=5
ping_times=
wan_primary=1
lan_ifname=br0
filter_services=$NAME:003:DNS$PROT:003:udp$PORT:005:53:53< >$NAME:004:Ping$PROT:004:icmp$PORT:003:0:0< >$NAME:004:HTTP$PROT:003:tcp$PORT:005:80:80< >$NAME:005:HTTPS$PROT:003:tcp$PORT:007:443:443< >$NAME:003:FTP$PROT:003:tcp$PORT:005:21:21< >$NAME:004:POP3$PROT:003:tcp$PORT:007:110:110< >$NAME:004:IMAP$PROT:003:tcp$PORT:007:143:143< >$NAME:004:SMTP$PROT:003:tcp$PORT:005:25:25< >$NAME:004:NNTP$PROT:003:tcp$PORT:007:119:119< >$NAME:006:Telnet$PROT:003:tcp$PORT:005:23:23< >$NAME:004:SNMP$PROT:003:udp$PORT:007:161:161< >$NAME:004:TFTP$PROT:003:udp$PORT:005:69:69< >$NAME:003:IKE$PROT:003:udp$PORT:007:500:500< >
boardflags=0x0388
wl0_afterburner_override=-1
sdram_refresh=0x0000
dhcp_domain=wan
wl_auth=0
wl_wep_last=
sdram_ncdl=0x20524
block_cookie=0
wl_frameburst=on
dhcp_num=50
filter_web_url1=
wan_ipaddr=0.0.0.0
wl0_passphrase=
filter_web_url2=
filter_web_url3=
wl0_rts=2347
filter_web_url4=
filter_web_url5=
wl_ifname=
filter_web_url6=
wan_wins=
ntp_mode=auto
wl_wep=off
filter_web_url7=
l2tp_pass=1
filter_web_url8=
pppoe_username=
filter_web_url9=
os_version=3.50.21.10
wl_gmode_protection=auto
wl0_wpa_gtk_rekey=3600
mac_clone_enable=0
ppp_get_srv=
wl_frag=2346
wan_mtu=1500
wl_wep_gen=
wl0_key=1
wl0_active_mac=
wl_maclist=
filter_macmode=deny
console_loglevel=1
et0phyaddr=30
time_zone=-08 1 1
wan_ifname=vlan1
wl_radioids=
wan_hostname=WiFi
wl0_radio=1
wl_corerev=
ppp_mtu=1500
ddns_interval=60
wl_channel=6
wl0_bcn=100
wl_radio=1
ppp_static=0
filter_tod1=
wl0_hwaddr=00:12:17:0C:CB:39
filter_tod2=
filter_tod3=
wl0_wep_gen=
filter_tod4=
ddns_passwd_buf=
wk_mode=gateway
wl0_gmode_protection=auto
filter_tod5=
pa0b0=0x170c
wl0_maclist=
filter_tod6=
pa0b1=0xfa24
filter_tod7=
pa0b2=0xfe70
wl_rts=2347
filter_tod8=
sdram_init=0x0008
filter_tod9=
lan_wins=
aol_block_traffic=0
vlan0hwname=et0
wl_mac_list=
lan_hwnames=
dl_ram_addr=a0001000
pppoe_demand=0
wl0_radius_key=
filter_dport_grp10=
ddns_username_buf=
wl0_corerev=7
wl_key=1
wl0_channel=6
dr_setting=0
upnp_enable=1
ddns_status=
filter_rule10=
wl0_auth_mode=disabled
wl_closed=0
boot_ver=v3.1
autofw_port0=
boardnum=42
def_hwaddr=00:00:00:00:00:00
wl_bcn=100
wl_wep_buf=
filter_dport_grp1=
wl_antdiv=-1
filter_dport_grp2=
size: 7144 bytes (25624 left)
# dmesg
CPU revision is: 00029007
Primary instruction cache 8kb, linesize 16 bytes (2 ways)
Primary data cache 4kb, linesize 16 bytes (2 ways)
Linux version 2.4.20 ([email protected]) (gcc version 3.3.3) #1 Mon Dec 6 04:13:50 EST 2004
Determined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
On node 0 totalpages: 8192
zone(0): 8192 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs init=/etc/preinit noinitrd console=ttyS0,115200
CPU: BCM4712 rev 1 at 200 MHz
Calibrating delay loop... 199.47 BogoMIPS
Memory: 30396k/32768k available (1408k kernel code, 2372k reserved, 100k data, 68k init, 0k highmem)
Dentry cache hash table entries: 4096 (order: 3, 32768 bytes)
Inode cache hash table entries: 2048 (order: 2, 16384 bytes)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 8192 (order: 3, 32768 bytes)
Checking for 'wait' instruction...  unavailable.
POSIX conformance testing by UNIFIX
PCI: Disabled
PCI: Fixing up bus 0
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
devfs: v1.12c (20020818) Richard Gooch ([email protected])
devfs: boot_options: 0x1
JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB.
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled
'''ttyS00 at 0xb8000300 (irq = 3) is a 16550A
ttyS01 at 0xb8000400 (irq = 0) is a 16550A'''    two serial ports internally!
Software Watchdog Timer: 0.05, timer margin: 60 sec
loop: loaded (max 8 devices)
PPP generic driver version 2.4.2
Physically mapped flash: Found an alias at 0x800000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1000000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1800000 for the chip at 0x0
number of CFI chips: 1
0: offset=0x0,size=0x20000,blocks=64
Flash device: 0x800000 at 0x1c000000
Physically mapped flash: squashfs filesystem found at block 913
Creating 5 MTD partitions on "Physically mapped flash":
0x00000000-0x00040000 : "pmon"
0x00040000-0x007e0000 : "linux"
0x000e4480-0x001b6435 : "rootfs"
mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only
0x007e0000-0x00800000 : "nvram"
0x001c0000-0x007e0000 : "OpenWrt"
sflash: found no supported devices
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 2048 bind 4096)
ip_conntrack version 2.1 (256 buckets, 2048 max) - 352 bytes per conntrack
ip_conntrack_pptp version 1.9 loaded
ip_nat_pptp version 1.5 loaded
ip_tables: (C) 2000-2002 Netfilter core team
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
NET4: Ethernet Bridge 008 for NET4.0
Bridge firewalling registered
802.1Q VLAN Support v1.7 Ben Greear <[email protected]>
All bugs added by David S. Miller <[email protected]>
VFS: Mounted root (squashfs filesystem) readonly.
Mounted devfs on /dev
Freeing unused kernel memory: 68k freed
Algorithmics/MIPS FPU Emulator v1.5
diag boardtype: 00000101
using v2 hardware
led -> 00
led -> 01
jffs2.bbc: SIZE compression mode activated.
eth0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.50.21.10
eth1: Broadcom BCM43XX 802.11 Wireless Controller  3.50.21.10 (Compiled in . at 20:53:00 on Jan 21 2004)
device eth0 entered promiscuous mode
vlan0: add 01:00:5e:00:00:01 mcast address to master interface
device eth1 entered promiscuous mode
br0: port 2(eth1) entering learning state
br0: port 1(vlan0) entering learning state
br0: port 2(eth1) entering forwarding state
br0: topology change detected, propagating
br0: port 1(vlan0) entering forwarding state
br0: topology change detected, propagating
vlan1: Setting MAC address to  00 12 17 0c cb 38.
vlan1: add 01:00:5e:00:00:01 mcast address to master interface
led -> 00

Reflashing

Get latest version from http://downloads.openwrt.org/


Reflashing:
   To reflash from openwrt you will need a TRX file, generally the
   "openwrt-brcm-2.4-squashfs.trx" file. Copy or wget this file into
   /tmp/ and run the following command to reflash --
     mtd -r write openwrt-brcm-2.4-squashfs.trx linux
   After the command finishes, the router will automatically restart.
   If you switch between squashfs and jffs2 based openwrt installations
   please use mtd -e linux -r write openwrt-brcm-2.4-squashfs.trx linux,
   so that the flash is erased before writing.


Links

OpenWRT

Lud's Linux Corner (WRT54GS page) Kismet, SNMPd

BatBox Linux Installs into a ramdisk, to allow exploring and experimenting with a stock WRT.

Mesh networks

http://www.oreillynet.com/pub/a/wireless/2004/01/22/wirelessmesh.html