OpenWrt Forum Archive

Topic: wrt400n, all atheros design, is this interesting?

The content of this topic has been archived between 16 Jan 2014 and 20 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

ath9k is actually rather promising even for 11n (at least on the ap81 based routers). With a few minor hacks I can run it for days with my MacBook. smile

Performace is not very good though. Only single stream bitrates seem fully supported (up to 65 Mbps in 20 Mhz mode). Also, there seems to be some software/hardware interaction problem that stops the packet flow periodically. The stops are short enough to not trigger TCP backoff, but long enough to make performance suffer (approx 20 Mbps user level throughput)... But it should only be a mater of time before somebody solves this.

A wrt400n with 2x ath9k I think could be very very nice! smile

I'm not having much luck with ath9k, but its new to me, so perhaps someone can help.  It seems to not be detecting the wireless devices.  I've been trying to figure out how to make the module spit out debug information...

base-files-ar71xx - 19-r15827 -
bmon - 2.1.0-1 -
bridge - 1.4-1 -
busybox - 1.11.3-6 -
bwm - 1.1.0-1 -
cutter - 1.03-1 -
dnsmasq - 2.47-3 -
dropbear - 0.52-2 -
ebtables - 2.0.8-2-2 -
empty-bgp - 0.6.15b-2 -
firewall - 1-3 -
hotplug2 - 0.9+r102-3 -
httpd-endless - 0.1-3 -
iftop - 0.17-1 -
ip-bgp - 2.6.25-1 -
iptables - 1.4.3.2-1 -
iptables-mod-conntrack - 1.4.3.2-1 -
iptables-mod-conntrack-extra - 1.4.3.2-1 -
iptables-mod-extra - 1.4.3.2-1 -
iptables-mod-filter - 1.4.3.2-1 -
iptables-mod-imq - 1.4.3.2-1 -
iptables-mod-ipopt - 1.4.3.2-1 -
iptables-mod-nat - 1.4.3.2-1 -
iptables-mod-nat-extra - 1.4.3.2-1 -
kernel - 2.6.28.10-ar71xx-1 -
kmod-ath - 2.6.28.10+2009-05-08-ar71xx-1 -
kmod-ath9k - 2.6.28.10+2009-05-08-ar71xx-1 -
kmod-crc-ccitt - 2.6.28.10-ar71xx-1 -
kmod-crypto-aes - 2.6.28.10-ar71xx-1 -
kmod-crypto-arc4 - 2.6.28.10-ar71xx-1 -
kmod-crypto-core - 2.6.28.10-ar71xx-1 -
kmod-crypto-sha1 - 2.6.28.10-ar71xx-1 -
kmod-ebtables - 2.6.28.10-ar71xx-1 -
kmod-gre - 2.6.28.10-ar71xx-1 -
kmod-input-core - 2.6.28.10-ar71xx-1 -
kmod-input-gpio-buttons - 2.6.28.10-ar71xx-1 -
kmod-input-polldev - 2.6.28.10-ar71xx-1 -
kmod-ipt-conntrack - 2.6.28.10-ar71xx-1 -
kmod-ipt-conntrack-extra - 2.6.28.10-ar71xx-1 -
kmod-ipt-core - 2.6.28.10-ar71xx-1 -
kmod-ipt-extra - 2.6.28.10-ar71xx-1 -
kmod-ipt-filter - 2.6.28.10-ar71xx-1 -
kmod-ipt-imq - 2.6.28.10-ar71xx-1 -
kmod-ipt-ipopt - 2.6.28.10-ar71xx-1 -
kmod-ipt-nat - 2.6.28.10-ar71xx-1 -
kmod-ipt-nat-extra - 2.6.28.10-ar71xx-1 -
kmod-ipt-nathelper - 2.6.28.10-ar71xx-1 -
kmod-ipt-nathelper-extra - 2.6.28.10-ar71xx-1 -
kmod-leds-gpio - 2.6.28.10-ar71xx-1 -
kmod-mac80211 - 2.6.28.10+2009-05-08-ar71xx-1 -
kmod-mppe - 2.6.28.10-ar71xx-1 -
kmod-ppp - 2.6.28.10-ar71xx-1 -
kmod-pppoe - 2.6.28.10-ar71xx-1 -
kmod-sched - 2.6.28.10-ar71xx-1 -
kmod-textsearch - 2.6.28.10-ar71xx-1 -
kmod-tun - 2.6.28.10-ar71xx-1 -
libc - 0.9.29-19 -
libgcc - 4.1.2-19 -
libiptc - 1.4.3.2-1 -
libltdl - 1.5.24-1 -
liblzo - 2.03-1 -
libncurses - 5.7-1 -
libopenssl - 0.9.8k-2 -
libpcap - 1.0.0-1 -
libpthread - 0.9.29-19 -
librrd1-bgp - 1.0.50-1 -
librt - 0.9.29-19 -
libuci - 0.7.5-1 -
libxtables - 1.4.3.2-1 -
microperl - 5.10.0-1 -
mtd - 8 -
openssl-util - 0.9.8k-2 -
openvpn - 2.1_rc15-1 -
opkg - 4564-3 -
ppp - 2.4.3-11 -
ppp-mod-pppoe - 2.4.3-11 -
pptp - 1.6.0-6 -
pptpd-bgp - 1.2.3-1 -
qos-scripts - 1.2.1-2 -
rrdcgi1-bgp - 1.0.50-1 -
rrdcollect-bgp - 0.2.3-3 -
rrdtool1-bgp - 1.0.50-1 -
ssmtp-bgp - 2.61-2 -
tc-bgp - 2.6.25-1 -
tcpdump - 3.9.8-1 -
uci - 0.7.5-1 -
uclibcxx - 0.2.2-1 -
udevtrigger - 106-1 -
vsftpd - 2.1.0-2 -
wget - 1.11.4-1 -
wireless-tools - 29-3 -
wol - 0.7.1-2 -
wput-bgp - 0.5-1 -
zlib - 1.2.3-5 -

dmesg

root@OpenWrt:/# dmesg
Linux version 2.6.28.10 (psycadmin@psycadmin-desktop) (gcc version 4.1.2) #1 Wed May 13 20:27:25 EDT 2009
prom: fw_arg0=00000002, fw_arg1=8006040c, fw_arg2=00000000, fw_arg3=00000000
MyLoader: sysp=aaaa5554, boardp=aaaa5554, parts=aaaa5554
console [early0] enabled
CPU revision is: 00019374 (MIPS 24Kc)
Atheros AR7161 rev 2 (id:0xaa), CPU:680.000 MHz, AHB:170.000 MHz, DDR:340.000 MHz
Determined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
  Normal   0x00000000 -> 0x00002000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00002000
On node 0 totalpages: 8192
free_area_init_node: node 0, pgdat 802a1d70, node_mem_map 81000000
  Normal zone: 64 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 8128 pages, LIFO batch:0
  Movable zone: 0 pages used for memmap
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
Kernel command line: rootfstype=squashfs,yaffs,jffs2 noinitrd console=ttyS0,115200 init=/etc/preinit
Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
Writing ErrCtl register=00000000
Readback ErrCtl register=00000000
PID hash table entries: 128 (order: 7, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 29532k/32768k available (1984k kernel code, 3236k reserved, 334k data, 140k init, 0k highmem)
SLUB: Genslabs=6, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Calibrating delay loop... 452.19 BogoMIPS (lpj=2260992)
Mount-cache hash table entries: 512
net_namespace: 480 bytes
NET: Registered protocol family 16
MIPS: machine is Linksys WRT400N
ar71xx: using random MAC address for eth0
ar71xx: using random MAC address for eth1
NET: Registered protocol family 2
Switched to high resolution mode on CPU 0
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
NET: Registered protocol family 1
squashfs: version 3.0 (2006/03/15) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
yaffs May 13 2009 20:25:05 Installing.
msgmni has been set to 57
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver1 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
console handover: boot [early0] -> real [ttyS0]
ag71xx_mdio: probed
eth0: Atheros AG71xx at 0xb9000000, irq 4
eth0: connected to 4 PHYs
eth1: Atheros AG71xx at 0xba000000, irq 5
eth1: connected to PHY at 0:04 [uid=004dd042, driver=Generic PHY]
Atheros AR71xx SPI Controller driver version 0.2.2
m25p80 spi0.0: m25p64 (8192 Kbytes)
spi0.0: searching for MyLoader partition table at offset 0x10000
spi0.0: searching for MyLoader partition table at offset 0x20000
spi0.0: searching for MyLoader partition table at offset 0x30000
spi0.0: searching for MyLoader partition table at offset 0x40000
spi0.0: no MyLoader partition table found
Searching for RedBoot partition table in spi0.0 at offset 0x7e0000
Searching for RedBoot partition table in spi0.0 at offset 0x7f0000
No RedBoot partition table detected in spi0.0
Creating 9 MTD partitions on "spi0.0":
0x00000000-0x00030000 : "uboot"
0x00030000-0x00040000 : "env"
0x00040000-0x00180000 : "linux"
0x00180000-0x007b0000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
mtd: partition "rootfs_data" created automatically, ofs=4D0000, len=2E0000
0x004d0000-0x007b0000 : "rootfs_data"
0x007b0000-0x007c0000 : "nvram"
0x007c0000-0x007d0000 : "factory"
0x007d0000-0x007f0000 : "language"
0x007f0000-0x00800000 : "caldata"
0x00040000-0x007b0000 : "firmware"
Atheros AR71xx hardware watchdog driver version 0.1.0
ar71xx-wdt: timeout=15 secs (max=25)
TCP vegas registered
NET: Registered protocol family 17
Bridge firewalling registered
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
VFS: Mounted root (squashfs filesystem) readonly.
Freeing unused kernel memory: 140k freed
Please be patient, while OpenWrt loads ...
Algorithmics/MIPS FPU Emulator v1.5
mini_fo: using base directory: /
mini_fo: using storage directory: /jffs
ar71xx: pll_reg 0xb8050010: 0x1099
eth0: link up (100Mbps/Full duplex)
device eth0 entered promiscuous mode
br-lan: topology change detected, propagating
br-lan: port 1(eth0) entering forwarding state
br-lan: port 1(eth0) entering disabled state
br-lan: topology change detected, propagating
br-lan: port 1(eth0) entering forwarding state
cfg80211: Using static regulatory domain info
cfg80211: Regulatory domain: US
        (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
        (2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm)
        (5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm)
cfg80211: Calling CRDA for country: US
ar71xx: pll_reg 0xb8050014: 0x1099
eth1: link up (100Mbps/Full duplex)
PPP generic driver version 2.4.2
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
PPP MPPE Compression module registered
ip_tables: (C) 2000-2006 Netfilter Core Team
nf_conntrack version 0.5.0 (512 buckets, 2048 max)
CONFIG_NF_CT_ACCT is deprecated and will be removed soon. Please use
nf_conntrack.acct=1 kernel paramater, acct=1 nf_conntrack module option or
sysctl net.netfilter.nf_conntrack_acct=1 to enable it.
IMQ driver loaded successfully.
        Hooking IMQ after NAT on PREROUTING.
        Hooking IMQ before NAT on POSTROUTING.
nf_conntrack_rtsp v0.6.21 loading
nf_nat_rtsp v0.6.21 loading
Registered led device: wrt400n:green:status
Registered led device: wrt400n:amber:aoss
Registered led device: wrt400n:green:wlan
Registered led device: wrt400n:green:power
gpio-buttons driver version 0.1.1
input: gpio-buttons as /devices/platform/gpio-buttons/input/input0
ar71xx-wdt: enabling watchdog timer

other info:

root@OpenWrt:/# dmesg | grep "ath"
root@OpenWrt:/# logread | grep "ath"
root@OpenWrt:/# lsmod | grep "ath"
ath9k                 262944  0
ath                     6464  1 ath9k
mac80211              205648  1 ath9k
cfg80211               72288  3 ath9k,ath,mac80211
root@OpenWrt:/# ifconfig -a
br-lan    Link encap:Ethernet  HWaddr 12:9C:E1:21:C9:8E
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:402 (402.0 B)

eth0      Link encap:Ethernet  HWaddr 12:9C:E1:21:C9:8E
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:88 errors:0 dropped:55 overruns:0 frame:0
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:8623 (8.4 KiB)  TX bytes:404 (404.0 B)
          Interrupt:4

eth1      Link encap:Ethernet  HWaddr 42:9B:26:8A:21:33
          inet addr:192.168.87.133  Bcast:192.168.87.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:5
          RX bytes:872 (872.0 B)  TX bytes:854 (854.0 B)
          Interrupt:5

imq0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          UP RUNNING NOARP  MTU:16000  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:5
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

imq1      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          NOARP  MTU:16000  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:11000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

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)

This router has a PCI bus, right? In that case maybe you should check so that ath9k is built for PCI (not AHB which is the bus on ap81/ap83 based routers).

cat /proc/bus/pci/devices is empty.  I think this one may have an AHB bus like the ap81/ap83.  I'm not sure exactly what that means for device support though...

I appreciate the work you all are putting into this.  Any news on updates now? 
Thanks!

I was unable to get ath9k to detect the wireless parts, but other than that it seems to work ok.  Sometimes the switch doesn't quite init right, I suppose its because the switch driver is not quite ready yet.  Power cycling a few times usually gets it to init.

Hi All,

I've been playing around with OpenWrt for a while, but this is my first post.


I bought a wrt400n last week, and managed to figure out the Firmware header format from looking at the GPL tar ball found here: http://downloads.linksysbycisco.com/downloads/WRT400N_1.0.01.19_US.tar,0.gz

The file "WRT400N_1.0.01.19_US/FW_WRT400N_1.0.01.19_US_20081229/GTK/user/include/fw_upgrade.h" had the most hints:

typedef struct
{
    UINT32        checksum;        /* CRC32 */
    UINT8        magic[11];        /* The value of GTIMG_MAGIC */
    UINT32        kernel_length;        /* The length of the kernel image */
    //UINT32        kernel_entry_point;    /* Kernel's entry point for RedBoot's information */
    UINT32        kernel_upgrade_flag;    /* Set to 1 if we need to upgrade the kernel parition of the Flash */
    UINT32        rootfs_length;        /* The length of the rootfs image */
    //UINT32        rootfs_entry_point;    /* Not in use */
    UINT32        rootfs_upgrade_flag;    /* Set to 1 if we need to upgrade the rootfs parition of the Flash */

    // Add 3 items by Vic Yu, 2006-05/10
    UINT32        kernel_checksum;
    UINT32        rootfs_checksum;
    UINT32        fw_totalsize;
    UINT32        reserved[4];
}imghdr_t , *pLinuxFWHeader_T;

Here's what I've learned about the header:

- magic:                GMTKRT400N
- kernel_length:                kernel length in bytes
- kernel_upgrade_flag:    should we upgrade the kernel - set to 1
- rootfs_length:                root fs length in byte
- rootfs_upgrade_flag:    should we upgrade the root fs - set to 1
- kernel_checksum:         Gary S. Brown's 32 bit CRC algorithm for kernel, with remaining bits
                        set to 0xFF upto 0x100000 bytes (total length)
- rootfs_checksum:        Gary S. Brown's 32 bit CRC algorithm for root fs, with remaining bits
                        set to 0xFF upto 0x2FFFC4 bytes    (total length)
- fw_totalsize:            total firmware image file length (header length + kernel length + root fs length)
- reserved[4]:            reserved ??? - set to all 0xFF


The tough part was using objdump on the source code less FW-Generator binary, to figure out what it did for the kernel_checksum and rootfs_checksum fields. The kernel is expected to be a lzma uImage (max. size of 0x100000 = 1048576 bytes), while the root fs. is squashfs (max. size of 0x2FFFC4 = 3145668 bytes).

Also, wrote up a C program which you can grab the source code from here: http://sandeepmistry.ca/openwrt/mkimage-wrt400n.c


Hope this helps.


How would I go about adding this to the OpenWrt SVN repo?

I was taking a look at the SVN tree, couldn't find a spot to add the image creation tool.

I noticed the current version uses "mkimage".

Any suggestions?

I just built svn revision 16549, selecting "Atheros AR71xx/AR913x [2.6]" for the target system and "Linksys WRT400N" for the profile with all other options at their defaults.  Using smistry's firmware-tool I created an image:

$ ./mkimage-wrt400n openwrt-ar71xx-uImage-lzma.bin openwrt-ar71xx-root.squashfs wrt400.bin
openwrt-ar71xx-uImage-lzma.bin: size 772982 (0xbcb76), crc32 = 0x843fe796
openwrt-ar71xx-root.squashfs: size 1703936 (0x1a0000), crc32 = 0xf0bec361
crc = 0x1cf9a729, total size = 2476978 (0x25cbb2)

The good news is that mkimage-wrt400n creates a firmware image that the router accepts.  The bad news is that the router is now bricked with the power light flashing sad  It was a spare router anyway and I expected the chances of this happening were > 80% going into this endeavour.  Perhaps the install CD has something I can use to recover it, or maybe I'll tear it apart and solder a JTAG cable to debug.

Wow, that sucks, can you access u-boot via a serial console?

I had some issues with the firmware I flashed a few days a go. U-boot was not passing down the correct board name, so it did not start the flash driver and ethernet driver - until I hard coded the board type to be WRT400N.

Now, the switch is not being setup correctly, also I don't see any kernel logs for the AR8216 switch driver.

Yha, i suggest serial console and u-boot to reflash.

I've never done any sort of hardware hackery before.  I have minimal experience with solder, probably just enough to be dangerous, so I'd prefer not to use it unless I have to.  Is there some sort of clip-on I can purchase?  How about info for this board on the correct pinouts?

I got a wrt400n board, after download the image of kamikaze 8.09.1 from http://downloads.openwrt.org/kamikaze/8.09.1/ar71xx/ , burned it into this board, but, found it hang up at begining. I'm new to kamikaze, can anyone tell me why? thanks.
The log:

U-Boot 1.1.4 (Jun 25 2009 - 15:52:35)

AP94 (ar7100) U-boot 0.0.12
DRAM:  b8050000: 0xc0140180
32 MB
Top of RAM usable for U-Boot at: 82000000
Reserving 203k for U-Boot at: 81fcc000
Reserving 192k for malloc() at: 81f9c000
Reserving 44 Bytes for Board Info at: 81f9bfd4
Reserving 36 Bytes for Global Data at: 81f9bfb0
Reserving 128k for boot params() at: 81f7bfb0
Stack Pointer at: 81f7bf98
Now running in RAM - U-Boot at: 81fcc000
id read 0x100000ff
flash size 8MB, sector count = 128
Flash:  8 MB
BOARD IS NOT CALIBRATED!!!
In:    serial
Out:   serial
Err:   serial
Net:   ag7100_enet_initialize...
eth0: 00:00:00:01:00:00
eth0 up
eth1: 00:00:00:00:00:00
eth1 up
eth0, eth1
Hit any key to stop autoboot:  0 
## Booting image at bf550000 ...
   Image Name:   MIPS OpenWrt Linux-2.6.26.8
   Created:      2009-06-01  20:32:29 UTC
   Image Type:   MIPS Linux Kernel Image (gzip compressed)
   Data Size:    1056242 Bytes =  1 MB
   Load Address: 80060000
   Entry Point:  80060000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80060000) ...
## Giving linux memsize in bytes, 33554432

Starting kernel ...

Just an update on things:

1. I have submitted a patch for my firmware creation tool for the stock Linksys firmware web interface. Decided to add it in the "tools/firmware-utils/src" directory.

2. I was able to get the switch working on my router also, but I had to disable the AG71XX_AR8216_SUPPORT in the kernel for some reason. (Located in Device Drivers  ---> [*] Network device support  ---> [*]   Ethernet (1000 Mbit)  ---> <*>   Atheros AR71xx built-in ethernet mac support: [*]     special support for the Atheros AR8216 switch).

May I was uploading/flashing the wrong uImage file, but generally things are working.

Things that would be nice to haves are wifi, and VLANs on the switch (from the Atheros datasheet, the AR8216 chip can do this).

Sandeep - i saw your contribution on the 12th to the codebase.  does the latest contribution support wifi?

Thank you for your work!

The latest version unfortunately does not support wifi yet.

The patch I submitted, just creates a firmware file that can uploaded using the web interface.


Also, I had to modify "build_dir/linux-ar71xx/linux-2.6.28.10/arch/mips/ar71xx/mach-wrt400n.c" to get the LAN side working. The change is in the "wrt400n_setup" function:

    Replace:

        ar71xx_eth0_data.has_ar8216 = 1;

    With:

        ar71xx_eth0_data.has_ar8216 = 0;

I built a newer image and flashed using mtd from within openwrt, seems to have worked.  Still dont see anything helpful from ath9k though.

boot log

## Booting image at bf040000 ...
   Image Name:   MIPS OpenWrt Linux-2.6.30.7
   Created:      2009-09-18   0:38:50 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    844680 Bytes = 824.9 kB
   Load Address: 80060000
   Entry Point:  80060000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80060000) ...
## Giving linux memsize in bytes, 33554432

Starting kernel ...

Linux version 2.6.30.7 (psycadmin@psycadmin-desktop) (gcc version 4.1.2) #1 Thu Sep 17 20:38:26 EDT 2009
console [early0] enabled
CPU revision is: 00019374 (MIPS 24Kc)
Atheros AR7161 rev 2, CPU:680.000 MHz, AHB:170.000 MHz, DDR:340.000 MHz
Determined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
  Normal   0x00000000 -> 0x00002000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00002000
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
Kernel command line: rootfstype=squashfs,yaffs,jffs2 noinitrd console=ttyS0,115200 board=WRT400N
Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
Writing ErrCtl register=00000000
Readback ErrCtl register=00000000
NR_IRQS:56
PID hash table entries: 128 (order: 7, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 29532k/32768k available (1920k kernel code, 3236k reserved, 418k data, 136k init, 0k highmem)
SLUB: Genslabs=7, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Calibrating delay loop... 452.19 BogoMIPS (lpj=2260992)
Mount-cache hash table entries: 512
net_namespace: 528 bytes
NET: Registered protocol family 16
MIPS: machine is Linksys WRT400N
bio: create slab <bio-0> at 0
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
NET: Registered protocol family 1
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
yaffs Sep 17 2009 20:35:38 Installing.
msgmni has been set to 57
alg: No test for lzma (lzma-generic)
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
console handover: boot [early0] -> real [ttyS0]
ag71xx_mdio: probed
eth0: Atheros AG71xx at 0xb9000000, irq 4
eth1: Atheros AG71xx at 0xba000000, irq 5
Atheros AR71xx SPI Controller driver version 0.2.4
m25p80 spi0.0: m25p64 (8192 Kbytes)
Searching for RedBoot partition table in spi0.0 at offset 0x7e0000
Searching for RedBoot partition table in spi0.0 at offset 0x7f0000
No RedBoot partition table detected in spi0.0
spi0.0: no WRT160NL signature found
Creating 9 MTD partitions on "spi0.0":
0x000000000000-0x000000030000 : "uboot"
0x000000030000-0x000000040000 : "env"
0x000000040000-0x000000180000 : "linux"
0x000000180000-0x0000007b0000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
mtd: partition "rootfs_data" created automatically, ofs=4C0000, len=2F0000
0x0000004c0000-0x0000007b0000 : "rootfs_data"
0x0000007b0000-0x0000007c0000 : "nvram"
0x0000007c0000-0x0000007d0000 : "factory"
0x0000007d0000-0x0000007f0000 : "language"
0x0000007f0000-0x000000800000 : "caldata"
0x000000040000-0x0000007b0000 : "firmware"
Atheros AR71xx hardware watchdog driver version 0.1.0
TCP westwood registered
NET: Registered protocol family 17
Bridge firewalling registered
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
Freeing unused kernel memory: 136k freed
Please be patient, while OpenWrt loads ...
- preinit -
Registered led device: wrt400n:green:status
Registered led device: wrt400n:amber:aoss
Registered led device: wrt400n:green:wlan
Registered led device: wrt400n:green:power
Press CTRL-C for failsafe
gpio-buttons driver version 0.1.1
input: gpio-buttons as /devices/platform/gpio-buttons/input/input0
eth0: link up (100Mbps/Full duplex)
eth0: link down
jffs2 not ready yet; using ramdisk
mini_fo: using base directory: /
mini_fo: using storage directory: /tmp/root
- init -

Please press Enter to activate this console. eth0: link up (100Mbps/Full duplex)
device eth0 entered promiscuous mode
br-lan: port 1(eth0) entering forwarding state
PPP generic driver version 2.4.2
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
PPP MPPE Compression module registered
ip_tables: (C) 2000-2006 Netfilter Core Team
eth1: link up (100Mbps/Full duplex)
nf_conntrack version 0.5.0 (512 buckets, 2048 max)
CONFIG_NF_CT_ACCT is deprecated and will be removed soon. Please use
nf_conntrack.acct=1 kernel paramater, acct=1 nf_conntrack module option or
sysctl net.netfilter.nf_conntrack_acct=1 to enable it.
IMQ driver loaded successfully.
        Hooking IMQ after NAT on PREROUTING.
        Hooking IMQ before NAT on POSTROUTING.
xt_time: kernel timezone is -0000
nf_conntrack_rtsp v0.6.21 loading
nf_nat_rtsp v0.6.21 loading
IMQ driver unloaded successfully.
IMQ driver loaded successfully.
        Hooking IMQ after NAT on PREROUTING.
        Hooking IMQ before NAT on POSTROUTING.
jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
jffs2_build_filesystem(): unlocking the mtd device... done.
jffs2_build_filesystem(): erasing all blocks after the end marker... done.
mini_fo: using base directory: /
mini_fo: using storage directory: /jffs

cpuinfo

system type             : Atheros AR7161 rev 2
machine                 : Linksys WRT400N
processor               : 0
cpu model               : MIPS 24Kc V7.4
BogoMIPS                : 452.19
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 16
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0000, 0x0ff8, 0x0ffb, 0x0ff8]
ASEs implemented        : mips16
shadow register sets    : 1
core                    : 0
VCED exceptions         : not available
VCEI exceptions         : not available

cmdline

rootfstype=squashfs,yaffs,jffs2 noinitrd console=ttyS0,115200 board=WRT400N

I understand that the ar9220 could be making progress in ath9k svn??
http://www.mail-archive.com/ath9k-devel@lists.ath9k.org/msg02020.html

Not much going on in development on this router..

Just wanted to let you know, that the WNDR3700 is basically the same hardware with a different switch.

And my guess is, that the ath9k will recognize the wifi as soon as it lits up int the pci device list.

Hey - I picked a couple of these up today.  I'm going to try to refocus on ATH9k testing and encouragement.  Fry's electronics in USA (Austin location) had them refurbished for $99.99 but they rang up at the register for $59.99!

ath9k detects the wireless and mac addresses are assigned now in trunk, we may have working wireless now...  I haven't had time to check yet...

https://dev.openwrt.org/changeset/19047

Does dual radio potentially mean dual client?

More precisely, since this router has both an AR9220 and an AR9223, could they both potentially join separate networks as clients?

This is pretty attractive to me since I've been considering more of the "router board" type models with multiple Mini PCI cards to accomplish this.  It would at least be somewhat cheaper to take an off the shelf model and add a few antenna jacks.

Any thoughts or suggestions on how to implement this would be appreciated.

I just haven't had time to test the dual radios.  I managed to get wifi working on the 2.4ghz radio with open and with wpa2 encryption.  Only had 5 minutes though, couldn't do anything more than just see if it worked.  (worked in N mode too, pretty speedy)

I wouldn't go spending money on one of these just yet...  Wait and see how it works for others...

Ok, I don't have a serial cable... flashed mine, but doesn't boot.

I tried the WNDR3700 tftp recovery mode, but doesn't seem to work.  reference: https://forum.openwrt.org/viewtopic.php?pid=100275#p100275

Anyone done recovery mode on the WRT400N?  Can someone with a serial port post the message you get when booting with the reset button held down?  Are there flashing lights while in recovery mode?

(Last edited by RoundSparrow on 15 Jan 2010, 07:08)

FYI... In USA, check your local Fry's Electronics for a refurbished one for $49.99: http://www.frys.com/product/6084298 - I picked up a couple in Austin today.