1 (edited by RoundSparrow 2009-01-29 21:21:04)

Topic: Netgear WNR2000 OpenWRT (Atheros AP81, AR9103 chip, u-boot)

thought this device needed own thread here, it has experimental support in current OpenWRT.

Some facts:
* The factory firmware is based on a fork of OpenWRT WhiteRussian with kernel 2.6.15.  There is a way to get root telnet on the device with the factory firmware if you wish.
* u-boot is wide open on this router, you can connect a rs232 serial port and u-boot has a 5 second countdown to take control.
* Atheros AP81 hardware platform.  I have removed the RF shield and visually confirmed the radio is an AR9103 chip, which is 3x3 MIMO.
* Router has a tftp recovery mode if you corrupt the firmware.  details below.

Right now there is no firmware that you can flash, I have been using u-boot tftpboot and ramdisk image of OpenWRT.  Testing the newer AR91xx support in ATH9K driver.

Photos of the router hardware: http://www.smallnetbuilder.com/content/view/30615/96/


PROBLEMS and Status OpenWRT
======================
1) NO WAY TO FLASH OpenWRT.  The bootloader does a checksum of the flash contents so we have to overcome that to flash OpenWRT onto the router.  If flash filesystem modifies contents, will be different each boot.  Solution may be to modify the u-boot on this router.
2) Current build of OpenWRT doesn't enable the Ethernet ports, so you only get WiFi.
3) ath9k driver slow.  See the Trendnet TEW-652BRP thread for other details about current issues with the AP81 platform and performance with ath9k driver.


Firmware Recovery
================
Experimenting with flashing, I've managed to mess up the firware a few times.  Good news is you can recover it.  If you hold down reset (for like 30 seconds) while you turn on power to unit... it goes into tftp recover mode.

U-Boot 1.1.4.16-g04e9b8bf (May 14 2008 - 17:04:28)

AP81 (ar7100) U-boot
sri
32 MB
Top of RAM usable for U-Boot at: 82000000
Reserving 245k for U-Boot at: 81fc0000
Reserving 192k for malloc() at: 81f90000
Reserving 44 Bytes for Board Info at: 81f8ffd4
Reserving 36 Bytes for Global Data at: 81f8ffb0
Reserving 128k for boot params() at: 81f6ffb0
Stack Pointer at: 81f6ff98
Now running in RAM - U-Boot at: 81fc0000
id read 0x100000ff
flash size 4MB, sector count = 64
Flash: 4MB
In:    serial
Out:   serial
Err:   serial
Net:   ag7100_enet_initialize...
Fetching MAC Address from 0x81fea7b0
: cfg1 0xf cfg2 0x7114
eth0: 00:22:3f:0b:c5:9c
dup 1 speed 100
eth0 up
eth0
Factory Reset Mode
The Router is in TFTP Server Firmware Recovery mode NOW!
Listening on Port : 69, IP Address: 192.168.1.1...

I got the factory firmware back on by using tftp tips from this page: http://cyberstorm.altervista.org/wag354g/guides/howto_unbricking_wag354g_en.txt

2 (edited by RoundSparrow 2009-01-05 01:46:45)

Re: Netgear WNR2000 OpenWRT (Atheros AP81, AR9103 chip, u-boot)

In recent builds of OpenWRT, the cabled ethernet ports stop working for me.  OpenWRT SVN 13658 I had working ethernet ports.  Output:

U-Boot 1.1.4.16-g04e9b8bf (May 14 2008 - 17:04:28)

AP81 (ar7100) U-boot
sri
32 MB
Top of RAM usable for U-Boot at: 82000000
Reserving 245k for U-Boot at: 81fc0000
Reserving 192k for malloc() at: 81f90000
Reserving 44 Bytes for Board Info at: 81f8ffd4
Reserving 36 Bytes for Global Data at: 81f8ffb0
Reserving 128k for boot params() at: 81f6ffb0
Stack Pointer at: 81f6ff98
Now running in RAM - U-Boot at: 81fc0000
id read 0x100000ff
flash size 4MB, sector count = 64
Flash: 4MB
In:    serial
Out:   serial
Err:   serial
Net:   ag7100_enet_initialize...
Fetching MAC Address from 0x81fea7b0
: cfg1 0xf cfg2 0x7114
eth0: 00:22:3f:0b:c5:9c
dup 1 speed 100
eth0 up
eth0
### main_loop entered: bootdelay=4

### main_loop: bootcmd="bootm 0xbf2a0000"
Hit any key to stop autoboot:  0
ar7100> tftpboot 0x81000000 openwrt-ar71xx-uImage-gzip.bin
Using eth0 device
TFTP from server 192.168.2.28; our IP address is 192.168.2.126
Filename 'openwrt-ar71xx-uImage-gzip.bin'.
Load address: 0x81000000
Loading:          ##################################
done
Bytes transferred = 2501382 (262b06 hex)
ar7100> bootm
## Booting image at 81000000 ...
   Image Name:   MIPS OpenWrt Linux-2.6.26.8
   Created:      2008-12-16   2:55:58 UTC
   Image Type:   MIPS Linux Kernel Image (gzip compressed)
   Data Size:    2501318 Bytes =  2.4 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 ...

Linux version 2.6.26.8 (root@stephen-desktop) (gcc version 4.1.2) #3 Mon Dec 15 18:55:46 PST 2008
console [early0] enabled
CPU revision is: 00019374 (MIPS 24K)
Determined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
  Normal          0 ->     8192
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0:        0 ->     8192
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: 28336k/32768k available (1764k kernel code, 4432k reserved, 318k data, 1576k init, 0k highmem)
SLUB: Genslabs=6, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Mount-cache hash table entries: 512
net_namespace: 484 bytes
NET: Registered protocol family 16
MIPS: machine is Generic AR71xx board
registering PCI controller with io_map_base unset
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 3.0 (2006/03/15) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY)  þþ 2001-2006 Red Hat, Inc.
yaffs Dec 14 2008 22:59:50 Installing.
msgmni has been set to 55
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver $Revision: 1.90 $ 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
eth0: invalid speed specified
ag71xx: probe of ag71xx.0 failed with error -22
eth0: Atheros AG71xx at 0xba000000, irq 5
Atheros AR71xx SPI Controller driver version 0.2.2
m25p80 spi0.0: unrecognized JEDEC id c22016
Atheros AR71xx hardware watchdog driver version 0.1.0
TCP vegas registered
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
Freeing unused kernel memory: 1576k freed
Algorithmics/MIPS FPU Emulator v1.5
[sighandler]: No more events to be processed, quitting.
[cleanup]: Waiting for children.
[cleanup]: All children terminated.
- preinit -
Press CTRL-C for failsafe

Please press Enter to activate this console. br-lan: Dropping NETIF_F_UFO since no NETIF_F_HW_CSUM feature.
device eth0 entered promiscuous mode
PPP generic driver version 2.4.2
ip_tables: (C) 2000-2006 Netfilter Core Team
nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
wlan: trunk
ath_hal: module license 'Proprietary' taints kernel.
ath_hal: 2008-10-02 (AR5210, AR5211, AR5212, AR5416, RF5111, RF5112, RF2413, RF5413, RF2133, RF2425, REGOPS_FUNC, DFS, XR)
ath_rate_minstrel: Minstrel automatic rate control algorithm 1.2 (trunk)
ath_rate_minstrel: look around rate set to 10%
ath_rate_minstrel: EWMA rolloff level set to 75%
ath_rate_minstrel: max segment size in the mrr set to 6000 us
wlan: mac acl policy registered
ath_pci: trunk
eth0: link up (1000Mbps/Full duplex)
br-lan: port 1(eth0) entering learning state
br-lan: topology change detected, propagating
br-lan: port 1(eth0) entering forwarding state
br-lan: port 1(eth0) entering disabled state
br-lan: port 1(eth0) entering learning state
br-lan: topology change detected, propagating
br-lan: port 1(eth0) entering forwarding state



BusyBox v1.11.3 (2008-12-14 22:37:50 PST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 KAMIKAZE (bleeding edge, r13658) -------------------
  * 10 oz Vodka       Shake well with ice and strain
  * 10 oz Triple sec  mixture into 10 shot glasses.
  * 10 oz lime juice  Salute!
 ---------------------------------------------------
root@OpenWrt:/# cat /proc/meminfo
MemTotal:        29912 kB
MemFree:         21144 kB
Buffers:             0 kB
Cached:           4828 kB
SwapCached:          0 kB
Active:           2340 kB
Inactive:         3236 kB
SwapTotal:           0 kB
SwapFree:            0 kB
Dirty:               0 kB
Writeback:           0 kB
AnonPages:         764 kB
Mapped:            756 kB
Slab:             1432 kB
SReclaimable:      364 kB
SUnreclaim:       1068 kB
PageTables:        184 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
WritebackTmp:        0 kB
CommitLimit:     14956 kB
Committed_AS:     2564 kB
VmallocTotal:  1048404 kB
VmallocUsed:      1300 kB
VmallocChunk:  1046716 kB
root@OpenWrt:/# uname -a
Linux OpenWrt 2.6.26.8 #3 Mon Dec 15 18:55:46 PST 2008 mips unknown
root@OpenWrt:/#

However, today on a boot of OpenWRT SVN 13865 (modified to correct crypto issue) I do not get ethernet devices.

ar7100> setenv bootargs 'board=WNR2000'
ar7100> tftpboot 0x81000000 openwrt_13865mod1_2-6-27_try1-ar71xx-uImage-lzma.bin
Using eth0 device
TFTP from server 192.168.2.90; our IP address is 192.168.2.126
Filename 'openwrt_13865mod1_2-6-27_try1-ar71xx-uImage-lzma.bin'.
Load address: 0x81000000
Loading:          ###########
done
Bytes transferred = 2716217 (297239 hex)
ar7100> bootm
## Booting image at 81000000 ...
   Image Name:   MIPS OpenWrt Linux-2.6.27.10
   Created:      2009-01-05   0:08:41 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    2716153 Bytes =  2.6 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 ...

Linux version 2.6.27.10 (adminsag@ipcmedialinux1) (gcc version 4.1.2) #2 Sun Jan 4 18:08:34 CST 2009
console [early0] enabled
CPU revision is: 00019374 (MIPS 24K)
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 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: 27848k/32768k available (1788k kernel code, 4920k reserved, 318k data, 2040k init, 0k highmem)
SLUB: Genslabs=6, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Calibrating delay loop... 266.24 BogoMIPS (lpj=1331200)
Mount-cache hash table entries: 512
net_namespace: 592 bytes
NET: Registered protocol family 16
MIPS: machine is NETGEAR WNR2000
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 3.0 (2006/03/15) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY)  þþ 2001-2006 Red Hat, Inc.
yaffs Jan  4 2009 17:44:11 Installing.
msgmni has been set to 54
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]
Atheros AR71xx SPI Controller driver version 0.2.2
m25p80 spi0.0: mx25l32 (4096 Kbytes)
Searching for RedBoot partition table in spi0.0 at offset 0x3e0000
Searching for RedBoot partition table in spi0.0 at offset 0x3f0000
No RedBoot partition table detected in spi0.0
Creating 8 MTD partitions on "spi0.0":
0x00000000-0x00040000 : "u-boot"
0x00040000-0x00050000 : "u-boot-env"
0x00050000-0x00290000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
0x00290000-0x002a0000 : "user-config"
0x002a0000-0x003c0000 : "uImage"
0x003c0000-0x003e0000 : "language_table"
0x003e0000-0x003f0000 : "rootfs_checksum"
0x003f0000-0x00400000 : "art"
Atheros AR71xx hardware watchdog driver version 0.1.0
TCP vegas registered
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
Freeing unused kernel memory: 2040k freed
Algorithmics/MIPS FPU Emulator v1.5
[sighandler]: No more events to be processed, quitting.
[cleanup]: Waiting for children.
[cleanup]: All children terminated.
- preinit -
Press CTRL-C for failsafe

Please press Enter to activate this console. 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
ath9k: 0.1
Registered led device: ath9k-phy0:radio
Registered led device: ath9k-phy0:assoc
Registered led device: ath9k-phy0:tx
Registered led device: ath9k-phy0:rx
phy0: Atheros AR9100 MAC/BB Rev:0, AR2133 RF Rev:a1, mem=0xb80c0000, irq=2
PPP generic driver version 2.4.2
ip_tables: (C) 2000-2006 Netfilter Core Team
nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
wlan: trunk
ath_hal: module license 'Proprietary' taints kernel.
ath_hal: 2008-10-02 (AR5210, AR5211, AR5212, AR5416, RF5111, RF5112, RF2413, RF5413, RF2133, RF2425, REGOPS_FUNC, DFS, XR)
ath_rate_minstrel: Minstrel automatic rate control algorithm 1.2 (trunk)
ath_rate_minstrel: look around rate set to 10%
ath_rate_minstrel: EWMA rolloff level set to 75%
ath_rate_minstrel: max segment size in the mrr set to 6000 us
wlan: mac acl policy registered
ath_pci: trunk



BusyBox v1.11.3 (2009-01-04 17:30:43 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 KAMIKAZE (bleeding edge, r13865) -------------------
  * 10 oz Vodka       Shake well with ice and strain
  * 10 oz Triple sec  mixture into 10 shot glasses.
  * 10 oz lime juice  Salute!
 ---------------------------------------------------
root@OpenWrt:/# uci set wireless.wlan0.disabled=0
root@OpenWrt:/# wifi up
device wlan0 entered promiscuous mode
Configuration file: /var/run/hostapd-wlan0.conf
br-lan: port 1(wlan0) entering disabled state
br-lan: topology change detected, propagating
br-lan: port 1(wlan0) entering forwarding state
Mode: IEEE 802.11g  Channel: 5  Frequency: 2432 MHz
Using interface wlan0 with hwaddr 00:22:3f:0b:c5:9c and ssid 'OpenWrt'
br-lan: port 1(wlan0) entering disabled state
br-lan: topology change detected, propagating
br-lan: port 1(wlan0) entering forwarding state

root@OpenWrt:/#
root@OpenWrt:/# ifconfig
br-lan    Link encap:Ethernet  HWaddr 00:22:3F:0B:C5:9C
          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: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)

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)

mon.wlan0 Link encap:UNSPEC  HWaddr 00-22-3F-0B-C5-9C-00-4C-00-00-00-00-00-00-00-00
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:254 (254.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr 00:22:3F:0B:C5:9C
          UP BROADCAST RUNNING MULTICAST  MTU:1500  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:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wmaster0  Link encap:UNSPEC  HWaddr 00-22-3F-0B-C5-9C-00-4C-00-00-00-00-00-00-00-00
          UP BROADCAST RUNNING MULTICAST  MTU:1500  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:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Good news is the ATH9K driver is working!  I was able to connect a client and ping the router.

Re: Netgear WNR2000 OpenWRT (Atheros AP81, AR9103 chip, u-boot)

The ATH9K driver is confirmed WORKING on this router with AR9103 chip!  I had to reverse out the recent crypto change (SVN 13850) to resolve error I was having, but after that - SVN 13865 works!

1) LAN ports are not working as noted above, they were working in SVN 13658 but not in 13865.  Any ideas?
2) Currently no way I know to flash this router with OpenWRT, only able to boot via u-boot tftpboot

Thanks again Gabor for the ath9k driver work!

Re: Netgear WNR2000 OpenWRT (Atheros AP81, AR9103 chip, u-boot)

RoundSparrow wrote:

The ATH9K driver is confirmed WORKING on this router with AR9103 chip!  I had to reverse out the recent crypto change (SVN 13850) to resolve error I was having, but after that - SVN 13865 works!

Fixed in trunk already.

1) LAN ports are not working as noted above, they were working in SVN 13658 but not in 13865.  Any ideas?

Without the 'board=WNR2000' bootarg you have used the 'Generic AR71xx' code previously, and the WNR2000 specific setup code don't register ethernet devices yet. I will copy it from the generic code tomorrow. I have no ideas about the WAN port yet.

2) Currently no way I know to flash this router with OpenWRT, only able to boot via u-boot tftpboot

This requires some work yet.

Thanks again Gabor for the ath9k driver work!

You are welcome, however you will owe me with the bounty ;-)

-Gabor

Re: Netgear WNR2000 OpenWRT (Atheros AP81, AR9103 chip, u-boot)

juhosg wrote:
RoundSparrow wrote:

Thanks again Gabor for the ath9k driver work!

You are welcome, however you will owe me with the bounty ;-)

-Gabor

what do you want, let me know which:  1) hardware (routers you don't have i can perhaps find in USA), 2) pizza/beer, 3) cash (PayPal)?  Anyone else pitching in?

6 (edited by RoundSparrow 2009-01-10 21:24:49)

Re: Netgear WNR2000 OpenWRT (Atheros AP81, AR9103 chip, u-boot)

Photos of the internals of this route (Netgear WNR2000)r: http://www.smallnetbuilder.com/content/view/30615/96/

Re: Netgear WNR2000 OpenWRT (Atheros AP81, AR9103 chip, u-boot)

Do you know of any AP81 board that has a JTAG header? Because of the way Netgear tweaked u-boot on this device we are going to need to reflash the bootloader when storing a writable filesystem in flash. I'd like to have a similar device with JTAG to test the tweaked u-boot on before I reflash the bootloader on my WNR2000, since I will likely only have one shot if it didn't build properly.

Re: Netgear WNR2000 OpenWRT (Atheros AP81, AR9103 chip, u-boot)

You are in luck!  The TP-Link WR941N / WR941ND appears to have a JTAG interface on J9 position on the motherboard.  It also has USB headers.  I've started a thread here: http://forum.openwrt.org/viewtopic.php?id=18354

Lark on dd-wrt forum says: "jtag: top left, J9 / Serial: top left, P1 / USB: top right, J10 (the case has a hole for USB socket)":  here: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=40041

9 (edited by RoundSparrow 2009-01-09 04:46:52)

Re: Netgear WNR2000 OpenWRT (Atheros AP81, AR9103 chip, u-boot)

Although our famous Trendnet 632/652 and D-Link DIR-615 C1 also have a 14 pin JTAG interface: http://wiki.x-wrt.org/index.php/Trendnet_TEW-632BRP#JTAG - I bricked one (flash 4.6MB into 4MB of FLASH, DOH) - so I would like to see how JTAG works wink -- perhaps I donate my unit to you?

Info on Atheros JTAG: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=28714

Re: Netgear WNR2000 OpenWRT (Atheros AP81, AR9103 chip, u-boot)

RoundSparrow wrote:

what do you want, let me know which:  1) hardware (routers you don't have i can perhaps find in USA), 2) pizza/beer, 3) cash (PayPal)?  Anyone else pitching in?

Well, some AR913x based boards would be nice.

Regards,
Gabor

Re: Netgear WNR2000 OpenWRT (Atheros AP81, AR9103 chip, u-boot)

juhosg wrote:
RoundSparrow wrote:

what do you want, let me know which:  1) hardware (routers you don't have i can perhaps find in USA), 2) pizza/beer, 3) cash (PayPal)?  Anyone else pitching in?

Well, some AR913x based boards would be nice.

Regards,
Gabor

Does anybody know of any reasonably priced (i.e. high volume consumer grade) concurrent dual radio (2.4 / 5 Ghz) AR913x based boards? I would donate one of those in a second if there was a chance to see OpenWrt on such a beast. smile

Re: Netgear WNR2000 OpenWRT (Atheros AP81, AR9103 chip, u-boot)

_bbb_ wrote:

Does anybody know of any reasonably priced (i.e. high volume consumer grade) concurrent dual radio (2.4 / 5 Ghz) AR913x based boards? I would donate one of those in a second if there was a chance to see OpenWrt on such a beast. smile

The Atheros AP83 reference board uses the AR9132 SoC and the AR9106 RF chip (Dual Band, 3x3MIMO), and OpenWrt runs on it already:

Linux version 2.6.27.10 (juhosg@idared) (gcc version 4.1.2) #39 Fri Jan 9 12:04:50 CET 2009
console [early0] enabled
CPU revision is: 00019374 (MIPS 24K)
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 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: 27356k/32768k available (1788k kernel code, 5412k reserved, 318k data, 2532k init, 0k highmem)
SLUB: Genslabs=6, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Calibrating delay loop... 266.24 BogoMIPS (lpj=1331200)
Mount-cache hash table entries: 512
net_namespace: 592 bytes
NET: Registered protocol family 16
MIPS: machine is Atheros AP83
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 3.0 (2006/03/15) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
yaffs Jan  4 2009 20:34:33 Installing.
msgmni has been set to 53
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
eth1: Atheros AG71xx at 0xba000000, irq 5
Atheros AR71xx SPI Controller driver version 0.2.2
Atheros AR71xx hardware watchdog driver version 0.1.0
TCP vegas registered
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
Freeing unused kernel memory: 2532k freed
Algorithmics/MIPS FPU Emulator v1.5
[sighandler]: No more events to be processed, quitting.
[cleanup]: Waiting for children.
[cleanup]: All children terminated.
- preinit -
Press CTRL-C for failsafe

Please press Enter to activate this console. device eth0 entered promiscuous mode
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
ath9k: 0.1
Registered led device: ath9k-phy0:radio
Registered led device: ath9k-phy0:assoc
Registered led device: ath9k-phy0:tx
Registered led device: ath9k-phy0:rx
phy0: Atheros AR9100 MAC/BB Rev:0, AR5133 RF Rev:a2, mem=0xb80c0000, irq=2
PPP generic driver version 2.4.2
ip_tables: (C) 2000-2006 Netfilter Core Team
nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
CONFIG_NF_CT_ACCT is deprecated and will be removed soon. Plase use
nf_conntrack.acct=1 kernel paramater, acct=1 nf_conntrack module option or
sysctl net.netfilter.nf_conntrack_acct=1 to enable it.
eth0: link up (1000Mbps/Full duplex)
br-lan: topology change detected, propagating
br-lan: port 1(eth0) entering forwarding state



BusyBox v1.11.3 (2008-12-08 17:12:18 CET) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 KAMIKAZE (bleeding edge, r13930) -------------------
  * 10 oz Vodka       Shake well with ice and strain
  * 10 oz Triple sec  mixture into 10 shot glasses.
  * 10 oz lime juice  Salute!
 ---------------------------------------------------
root@OpenWrt:/# cat /proc/cpuinfo
system type             : Atheros AR9132 rev 2 (id:0xb9)
processor               : 0
cpu model               : MIPS 24K V7.4
BogoMIPS                : 266.24
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 16
extra interrupt vector  : yes
hardware watchpoint     : yes
ASEs implemented        : mips16
shadow register sets    : 1
core                    : 0
VCED exceptions         : not available
VCEI exceptions         : not available

root@OpenWrt:/# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

eth1      no wireless extensions.

br-lan    no wireless extensions.

wmaster0  no wireless extensions.

wlan0     IEEE 802.11abgn  ESSID:""
          Mode:Managed  Frequency:2.412 GHz  Access Point: Not-Associated
          Tx-Power=0 dBm
          Retry min limit:7   RTS thr:off   Fragment thr=2352 B
          Encryption key:off
          Power Management:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

root@OpenWrt:/#

Although i don't know about any consumer devices with AR9104/AR9106 RF chips yet, but if anyone find one, we will support it sooner or later. :-p

Regards,
Gabor

Re: Netgear WNR2000 OpenWRT (Atheros AP81, AR9103 chip, u-boot)

juhosg wrote:
_bbb_ wrote:

Does anybody know of any reasonably priced (i.e. high volume consumer grade) concurrent dual radio (2.4 / 5 Ghz) AR913x based boards? I would donate one of those in a second if there was a chance to see OpenWrt on such a beast. smile

The Atheros AP83 reference board uses the AR9132 SoC and the AR9106 RF chip (Dual Band, 3x3MIMO), and OpenWrt runs on it already.

Although i don't know about any consumer devices with AR9104/AR9106 RF chips yet, but if anyone find one, we will support it sooner or later. :-p

Regards,
Gabor

The AP83 sure looks nice, but I was hoping for something AP94-like with two radios that can run concurrently. smile

And it seems TRENDNET have answered my prayers: http://trendnet.com/langen/press/view.asp?id=799 smile

The TRENDnet TEW-673GR employs Atheros’ XSPAN® AR9002AP platform, which consists of the AR9220 and AR9223 XSPAN dual-band radio chipset... The platform also features Atheros’ 680MHz AR7161 wireless network processor and Atheros’ AR8316 Gigabit Ethernet switch to support unsurpassed bandwidth to both wired and wireless clients.

Sounds like stuff that OpenWrt would like, no?

Maybe the Netgear WNDR3700 is similar?

Re: Netgear WNR2000 OpenWRT (Atheros AP81, AR9103 chip, u-boot)

_bbb_ wrote:

And it seems TRENDNET have answered my prayers: http://trendnet.com/langen/press/view.asp?id=799 smile

The TRENDnet TEW-673GR employs Atheros’ XSPAN® AR9002AP platform, which consists of the AR9220 and AR9223 XSPAN dual-band radio chipset... The platform also features Atheros’ 680MHz AR7161 wireless network processor and Atheros’ AR8316 Gigabit Ethernet switch to support unsurpassed bandwidth to both wired and wireless clients.

Sounds like stuff that OpenWrt would like, no?

yep indeed. Is there a linux-driver for the switch available?

Re: Netgear WNR2000 OpenWRT (Atheros AP81, AR9103 chip, u-boot)

I've updated the first post in this thread with info on recovery mode.

Re: Netgear WNR2000 OpenWRT (Atheros AP81, AR9103 chip, u-boot)

This router has a way to recover if we do a bad flash - so somebody with experience want to help out in figuring the flash format?  It runs White Russion and root telnet is available, what would I flash on it?

The hardware is similar to the flashable Trendnet TEW-632BRP, TEW-652BRP, D-Link DIR-615 C1. However, has different method of recovery boot and u-boot is modified.

Re: Netgear WNR2000 OpenWRT (Atheros AP81, AR9103 chip, u-boot)

gabor,

I noticed you mentioned that the openwrt is working on the AP83 reference platform.

I'm a newbie, could you give me a couple of quick pointers on how to get this up and running.
I have an AP83 ref platform here.

I'm trying to understand the board/cpu initialization code.

TIA

18 (edited by RoundSparrow 2009-02-12 19:13:00)

Re: Netgear WNR2000 OpenWRT (Atheros AP81, AR9103 chip, u-boot)

WNR2000 - I had previously overlooked that we have source code for the u-boot for this router.  So the checksum feature that is preventing us from flashing OpenWRT could be replaced.  Anyone wanting to hack on u-boot wink ?

Also I've looked over the software and such for the Netgear WN802Tv2 (WN802T-200) http://www.netgear.com/Products/APsWire … ifications  - this is an access point.  The firmware clearly has references to AP81 name.  I also notice the the firmware is over 5MB in size, does this Access Point have 8MB of FLASH?

The GPL download for the WN802Tv2 are at: ftp://downloads.netgear.com/files/GPL/

Re: Netgear WNR2000 OpenWRT (Atheros AP81, AR9103 chip, u-boot)

I've downloaded the WNR2000 GPL package from netgear.  It is version V1.2.0.8.  Unpacked it, followed the instruction, but can't compile it.  Turns out, it's missing a lot of packages such as router-gui, dropbear, kmod-ar91xx, and many others.  If I took them out, it builds fine, but the new compiled firmware won't boot.  So you can't just take their GPL offering and make your own firmware.

Were you able to get telnet enabled?  Looking at the code, they use simpleinit.  In order to enable telnet, you have to comment out the part of the code that disables it, build a new simpleinit.

I see there is a wnr2000/stock-rootfs.squash.img on openwrt's download.  I suppose you can extract it from the stock firmware.  How does one do that?

Re: Netgear WNR2000 OpenWRT (Atheros AP81, AR9103 chip, u-boot)

Yes, Netgear telnetenable works fine on this router.

Re: Netgear WNR2000 OpenWRT (Atheros AP81, AR9103 chip, u-boot)

how do you enable telnet (stock firmware)?

Re: Netgear WNR2000 OpenWRT (Atheros AP81, AR9103 chip, u-boot)

http://wiki.openwrt.org/OpenWrtDocs/Hardware/Netgear/TelnetConsole

I can personally vouch for it working on the WNR2000.

Re: Netgear WNR2000 OpenWRT (Atheros AP81, AR9103 chip, u-boot)

I tried that on my wnr2000 but it doesn't work. I notice that my modpkt.pkt file is empty.  My wnr2000 has version V1.2.0.8.  Which version is yours?  Perhaps Netgear has closed this loophole in their latest firmware?

Re: Netgear WNR2000 OpenWRT (Atheros AP81, AR9103 chip, u-boot)

Is anybody know how to make Ethernet work on WNR2000 with SVN 14548 (This is the one I tried)?
I checked out the code in target/linux/ar71xx/files/arch/mips/ar71xx/mach-wnr2000.c, there is no code to setup Ethernet. (There is some code in mach-ap83.c, mach-pb42.c, ..., etc, to setup Ethernet).

Or what type of board should I use which can make Ethernet work on wnr2000 board?

Thanks.

Re: Netgear WNR2000 OpenWRT (Atheros AP81, AR9103 chip, u-boot)

yjchang wrote:

Is anybody know how to make Ethernet work on WNR2000 with SVN 14548 (This is the one I tried)?
I checked out the code in target/linux/ar71xx/files/arch/mips/ar71xx/mach-wnr2000.c, there is no code to setup Ethernet. (There is some code in mach-ap83.c, mach-pb42.c, ..., etc, to setup Ethernet).

Or what type of board should I use which can make Ethernet work on wnr2000 board?

Juhosg has been pretty busy, I think he may have forgotten to copy generic in as he said in the earlier message of this thread.  I understand this uses the same Atheros LAN/Switch chips as the Trendnet and the Planex AP81 routers.  the ar8216 switch chip. Although on the Planex we got WAN working but no LAN ports, as we lack technical details on how to initialize the chips.  No such problem on the Trendnet ones... as Juhosg explained it to me, there are two methods of initializing the chips...

If you aren't afraid to program a little, the file /target/linux/ar71xx/files/arch/mips/ar71xx/mach-wnr2000.c is where these get set.

I assume you are doing tftpboot?  If so, you could skip changing the file and try various setenv bootargs 'board=WNR2000' values and see what works.  possible values I see in prom.c:  TEW-632BRP, MZK-W04NU

Hope this helps.