修改水星 MW310R

这台机器是 50 块钱淘来的二手货,修改后在家服役,勉强能解决边边角角的覆盖问题。主要特征有当时最先进的 AR9341 SoC ( AR9344 一类的明显搞不起),发射功率大约 19dBm ,三天线设计(其中两个天线在同一路上)。

P1130589

外观。刚到手时比较脏,擦了很久才这样。

P1130590

都已经擦不见了。

P1130591

上盖。卡扣有点不好对付,尤其是前面的部分。

P1130592

内部全貌。

很多人看到这样简单明了的板子就觉得机器差。这机器是不给力,但是主要是 VxWorks 的问题,从硬件上讲这机器还是非常不错的(当然不要跟那些天价机器比了)。

P1130594

作为一个便宜货色,射频线居然还有固定设计(真是亮瞎狗眼)。

P1130595

网线变压器五合一了,集成度很高。顺便说一下,网口都是 4 芯的,有的时候还容易没插好接触不良。

P1130596

AR9341 SoC ,集成 CPU ,千兆交换机 MAC 和百兆 PHY (所以最终还是没有千兆可以用,不过至少 LAN to WAN 转发可以跑满线速了),无线以及所有的射频部分。SoC 本身支持 USB 2.0 host 但是板子上连线都没引出来。

AR9341 的 CPU 是 533MHz 的 MIPS74K ,支持乱序执行,同频整数性能和 ARM Cortex-A9 几乎不分上下,约为 MIPS24K 的 1.2 ~ 1.3 倍。因此这玩意的性能实际上非常接近于 680MHz 的 AR7161 ,后者是当年的神器,基于 MIPS24K 。同理,这货比 600MHz 的 MT7620 快。淘宝上有些 JS 鼓吹 MT7620 比 BCM5358 快,其实都是扯淡的,一个道理。当然,这点性能和最近出现的各种x路由相比都不值一提。

AR9341 的发热不明显,虽然感觉比 AR9331 温暖一些。

P1130601

SoC 旁边有一只功率电感以及几个 MLCC ,功率电感两端直连 SoC ,不难看出 SoC 内部带了一路 PWM 以及功率 MOSFET 。AR9331 上的情况类似。

P1130610

整机的时钟由 25MHz 的晶体提供。

P1130609

射频部分有三个天线切换开关,左下方那个把两路天线连接到了同一路上,但是接法比较奇怪,没想清楚。

P1130597

抠了吧唧的 16MB DDR ,待会果断换掉。

P1130599

2MB 的 Flash ,同样处置。

P1130600

TTL UART 接口乖乖地放在那里,电阻都已经接好了,焊个排针就能用。

P1130608

电源部分用的是广为人知的 34063 。

P1130604

B772 作为扩流管。

P1130606

SK24 肖特基二极管作为续流管。

P1130615

一只 LDO 。

P1130612

背面非常空旷。SoC 背部设计了散热。

P1130614

底壳。

P1130617

改造的内容无非是焊上 UART 排针,换上 64MB 的 DDR 内存和 8MB 的 Flash ,然后把天线改成了 SMA ,在侧面开了三个洞。目前在家用的是两个 5dBi 船桨和一个 6dBi 全向天线(不是图中那三个)。如果觉得不给力可以换别的。电源部分的电解电容全部换成了 nichicon UD ,反正手残买了一条不用白不用。

散热片后来又被我拧下来了,一是觉得用不着,二是机器竖着挂着怕散热片黏性不好掉下来。

mw310r

软件方面刷了稍加修改的 OpenWRT (这玩意好 port ),稳定性不错。截止我离家出走出国留学前已经连续无故障运行 37 天。为了刷 OpenWRT 需要先把 WR841N V8 的 art 区拿过来用,VxWorks 的貌似有点不一样。

自带 VxWorks 的启动输出:

         ________  ________             __      __  ____   _  __   ___
        |________||   ___  |           |  |    |  ||    \ | ||  | /  /
           |  |   |  |___| |   __ __   |  |    |  ||     \| ||  |/  /
           |  |   |   _____|  |__ __|  |  |___ |  || |\     ||      \
           |__|   |__|                 |______||__||_| \____||__|\___\

                            Software Platform for MIPS
Creation date: Jul  5 2011, 09:13:06 (huangqingjia@tp-link.net)
Copyright(C) 2001-2012 by TP-LINK TECHNOLOGIES CO., LTD.
CPU: AR9341: AP123 Board
CPU freq: 500 MHZ
SDRAM size: 16 MB
ipaddr:192.168.1.1
serverip:192.168.1.100
file:vxWorks.img

Press Ctrl+C to stop auto-boot...
 0
auto-booting...
Uncompressing...done
Starting at 0x80001000...

Attaching interface lo0... done
Rx clbufs 512 each of size 1756 
eth_rx_netpool_init: allocated, pDmaBuf=0x80e4e3e0, buffend = 80f2abe4
ATHRS27: resetting s27
ATHRS27: s27 reset done
eth_rx_netpool_init: done already!
Attached IPv4 interface to mirror unit 0
usrAppInitEx: 112: GPIO_OE = 30300
usrAppInitEx: 113: CP0 CONFIG = 80208483
usrAppInitEx: 114: CP0 CONFIG1 = bee3519e

-->starting wireless...
APCFG task id 80c7d450
sysWlanInit ...
Create WLAN event task tWLANEventTask
Create mem partion 0x80c69c20 for size 28672
AH_CAL_IN_FLASH_AHB
Boostrap clock 25MHz
ar9300RadioAttach: Need analog access recipe!!
Restoring Cal data from Flash
ath_get_caps[4703] rx chainmask mismatch actual 3 sc_chainmak 0
ath_get_caps[4678] tx chainmask mismatch actual 3 sc_chainmak 0
Create OS_MESGQ Successfully at 0x80c58630
osifp->queue_head = 0x80c58930
ag7240MemInit: allocated, dmabuf=0x80ba3c10, buffend = 80c4be14
Entering Task Loop
Entering WLAN event Task Loop
ERROR:wireless OR ACL disable
sending message 80b7f3e0,24
sending message 80b7f3e0,24
TDDP: Now listening client request. 
tddp is running.
httpInit: System File Registry successfully initialized.
httpInit: System File Manager successfully initialized.
httpInit: File System RPM successfully initialized.
httpInit: RPM dispatcher successfully initialized.
httpInit: MIME type guessing RPM successfully initialized.
httpInit: http Password Checking successfully initialized.
httpInit: http Access Control successfully initialized.

                            Software Platform for MIPS
  Copyright(C) 2001-2010 by TP-LINK TECHNOLOGIES CO., LTD.
Starting  Creation date:  WLJul  5 2011, 10:13:42AN !!!! 

# AP_STARTMODE=standard
AP_ENABLE=1
ATH_COUNTRYCODE=156
wlan_vap_create : enter. devhandle=0x8043ef60, opmode=IEEE80211_M_HOSTAP, flags=0x1
wlan_vap_create : exit. devhandle=0x8043ef60, opmode=IEEE80211_M_HOSTAP, flags=0x1.
osif_ioctl_create_vap: vap 0x80ffe970 vap->iv_unit 0
ieee80211_end_load: load done
ath0 end flag = 0x00028802
default 
default 
default 
IEE80211-FREQ IOCTL vap 0x80ffe970 0,0,0
AP_CHMODE=11NGHT40PLUS

WLAN IOCTL AP_CHMODE=11NGHT40PLUS=11NGHT20=11NGHT40PLUS=1003
IEE80211-MODE IOCTL 1,11NGHT40PLUS,13
set mode 11,-2130709132,6
set mode retv 0

WLAN IOCTL AP_PRIMARY_CH=auto=6=auto=1002
IEE80211-FREQ IOCTL vap 0x80ffe970 0,0,11

WLAN IOCTL PUREG=0=0=0=1004
IEEE80211-SETPURGE IOCTL 0

WLAN IOCTL AP_HIDE_SSID=0=0=0=1005
IEEE80211-SETHIDESSIDIOCTL 0

WLAN IOCTL AP_ISOLATION=0=0=0=1034
IEE80211-setparam-nobridge 0

WLAN IOCTL AP_TX11NRATE==0x0=0x0=1041
set auto rate

WLAN IOCTL AP_11G_PROTECTION==0=0=1042

WLAN IOCTL AP_BEACON_INTERVAL=100=100=100=1043

WLAN IOCTL AP_FRAGMENT_THRESHOLD=2346=2346=2346=1044

WLAN IOCTL AP_RTS_THRESHOLD=2346=2347=2346=1046

WLAN IOCTL AP_DTIM_PERIOD=1=1=1=1045

WLAN IOCTL AP_WMM_ENABLE=1=1=1=1051

WLAN IOCTL AP_WMM_NOACK==0=0=1052
IOCTL set wmm noack 0

WLAN IOCTL AP_CYPHER_2==CCMP=CCMP=1000
Get EIOCGADDR

WLAN IOCTL AP_NO_EDGE_CH==0=0=1056

WLAN IOCTL AP_MCASTRATE==0=0=1018

WLAN IOCTL AP_MACFILTER_MODE==0=0=1038

WLAN IOCTL AP_MACFILTER_LIST====1000
Get EIOCGADDR

WLAN IOCTL AP_SHORT_GI=1=1=1=1055

WLAN IOCTL AP_DISABLECOEXT=1=0=1=1075

WLAN IOCTL AP_SSID=MERCURY_C674A0=Ath_AP123ng=MERCURY_C674A0=1001
IEE80211-ESSID IOCTL 1,MERCURY_C674A0,15
AP_CHMODE=11NGHT40PLUS
AP_CWMMODE=1
IEE80211-CWMMODE IOCTL 1
AP_AMPDU=0
AP_PURE_N=0
AP_TX_CHAINMASK=3
AP_RX_CHAINMASK=3
AP_SECMODE=None
WPS_ENABLE=1
AP_MACFILTER_MODE=0
ieee80211_open

WLAN IOCTL AP_BASICRATES==0=0=1039

WLAN IOCTL AP_DEBUG=0=0=0=1062

WLAN IOCTL AP_TX_POWER==0=0=1073
Starting Hostapd
AP_SSID=MERCURY_C674A0
AP_HOSTAPD_DEBUG=0
AP_IPADDR=192.168.1.2
AP_SECMODE=None
WPS BSS init
WPS_ENABLE=1
WPS_PIN=63325942
WPS_STATE=1
1136073605.416667: wps_led_init: LED state UNCONFIGURED
AP_SECMODE=None
WPS OPEN BSS init
starting hostapd ... 
Hostapd task Created 80ff5970
Task details [80ff5970,,64,80c7d1e8]
Adding ath0 in bridge ...
default 
Set EIOCGMIB2
default 
Entering Hostapd Main 
default 
Set EIOCGMIB2
attached backend socket .
Attached backend socket for eth0
Attached backend socket for eth1
Attached backend socket for mirror 0
@@@@ kris-hostapd @@@@@ wiface=ath0 @@@@
**** [0,1,0,0192.168.1.2,]****
Just before eloop_run()
 *** setup interface1 started ****
 Eapol sockfd=27 
Get EIOCGADDR
MAC address 14,ffffffe6,ffffffe4,ffffffc6,74,ffffffa0
link _ubind0,0,0,0,0,0
IEE80211-IWMODE IOCTL  3
IEE80211-setparam-privacy 0
1136073607.416667: Defaulted uuid based on mac addr 14:e6:e4:c6:74:a0
ieee80211_ioctl_setappiebuf
ieee80211_ioctl_setappiebuf
ieee80211_ioctl_setappiebuf
1136073607.416667: madwifi_start_receive_prob_req Enter

Madwifi init completed
1136073607.433333: ENTER eap_wps_disable, reason=7
 *** setup interface1 completed ****
 *** setup interface2 started ****
1136073607.433333: Flushing old station entries
IOCTL setmlme
[ieee80211_ioctl_setmlme:1887] data=0x80ff5490,data->pointer=0x80ff54e0, data->length=42
[ieee80211_ioctl_setmlme:1893] mlme->im_op=3
1136073607.450000: Deauthenticate all stations
IEE80211-setparam-privacy 0
ieee80211_ioctl_delkey : idk_keyix=0
ieee80211_ioctl_delkey : idk_keyix=1
ieee80211_ioctl_delkey : idk_keyix=2
ieee80211_ioctl_delkey : idk_keyix=3
Using interface ath0 with hwaddr 14:e6:e4:c6:74:a0 and ssid 'MERCURY_C674A0'
1136073607.483333: SSID - hexdump_ascii(len=14):
     4d 45 52 43 55 52 59 5f 43 36 37 34 41 30         MERCURY_C674A0  
1136073607.483333: PSK (ASCII passphrase) - hexdump_ascii(len=0):
1136073607.766667: PSK (from passphrase) - hexdump(len=32): f5 07 49 17 2a 0c aa af b7 b2 bd 9a bd db 45 4b 30 ee 93 84 38 fc 2f bf 60 a1 2b 33 52 87 f6 da
IEE80211-ESSID IOCTL 1,MERCURY_C674A0,15
osif_vap_init :vap up 
IEE80211-setparam-authmode 1
osif_vap_init :vap up 
osif_vap_init 0
hostapd_ctrl_iface_init
1136073607.833333: upnp_wps_device_init called
1136073607.833333: upnp_wps_device ssdp_listener_start failure!
1136073607.833333: upnp_wps_device_stop ENTER
1136073607.833333: upnp_wps_device_deinit called
1136073607.833333: upnp_wps_device_stop ENTER
1136073607.833333: Failed to initialize UPnP state machine
1136073607.833333: Continuing with WPS UPnP disabled.
 ****setup interface2 completed****
1136073607.833333: ath0: Setup of interface done.
 ****setup interface finalized ****

刷入 WR841N V8 编程器固件后的输出:

U-Boot 1.1.4 (May  6 2013 - 13:20:30)

U-boot AP123

DRAM:  64 MB
id read 0x100000ff
Flash:  4 MB
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   ag934x_enet_initialize...
wasp reset mask:c03300
WASP ----> S27 PHY
file: ag934x.c,line: 179==: set LAN&WAN SWAP. --debug by HouXB
GMAC: cfg1 0x5 cfg2 0x7114
eth0: ba:be:fa:ce:08:41
s27 reg init 
athrs27_phy_setup ATHR_PHY_CONTROL 4: 0x1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 4: 0x10
eth0 up
WASP ----> S27 PHY
file: ag934x.c,line: 179==: set LAN&WAN SWAP. --debug by HouXB
GMAC: cfg1 0xf cfg2 0x7214
eth1: ba:be:fa:ce:08:41
s27 reg init lan 
ATHRS27: resetting s27
ATHRS27: s27 reset done
athrs27_phy_setup ATHR_PHY_CONTROL 0: 0x1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 0: 0x10
athrs27_phy_setup ATHR_PHY_CONTROL 1: 0x1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 1: 0x10
athrs27_phy_setup ATHR_PHY_CONTROL 2: 0x1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 2: 0x10
athrs27_phy_setup ATHR_PHY_CONTROL 3: 0x1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 3: 0x10
eth1 up
eth0, eth1
Autobooting in 1 seconds
## Booting image at 9f020000 ...
   Uncompressing Kernel Image ... OK

Starting kernel ...

Booting Atheros AR934x
Linux version 2.6.31--LSDK-9.2.0_U5.508 (root@localhost.localdomain) (gcc version 4.3.3 (GCC) ) #4 Mon May 6 13:24:10 CST 2013
flash_size passed from bootloader = 4
Ram size passed from bootloader =67108864
CPU revision is: 0001974c (MIPS 74Kc)
ath_sys_frequency: cpu srif ddr srif cpu 535 ddr 400 ahb 200
Determined physical RAM map:
 memory: 04000000 @ 00000000 (usable)
Zone PFN ranges:
  Normal   0x00000000 -> 0x00004000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00004000
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: console=ttyS0,115200 root=31:2 rootfstype=squashfs init=/sbin/init mtdparts=ath-nor0:128k(u-boot),1024k(kernel),2816k(rootfs),64k(config),64k(art)M
PID hash table entries: 256 (order: 8, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
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
Memory: 62552k/65536k available (1724k kernel code, 2916k reserved, 424k data, 112k init, 0k highmem)
NR_IRQS:128
plat_time_init: plat time init done
Calibrating delay loop... 267.26 BogoMIPS (lpj=534528)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
bio: create slab  at 0
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
ATH GPIOC major 0
squashfs: version 4.0 (2009/01/31) Phillip Lougher
msgmni has been set to 122
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xb8020000 (irq = 19) is a 16550A
console [ttyS0] enabled
PPP generic driver version 2.4.2
NET: Registered protocol family 24
5 cmdlinepart partitions found on MTD device ath-nor0
Creating 5 MTD partitions on "ath-nor0":
0x000000000000-0x000000020000 : "u-boot"
0x000000020000-0x000000120000 : "kernel"
0x000000120000-0x0000003e0000 : "rootfs"
0x0000003e0000-0x0000003f0000 : "config"
0x0000003f0000-0x000000400000 : "art"
->Oops: flash id 0xef4017 . 
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
Port Status 1c000004 
ath-ehci ath-ehci.0: ATH EHCI
ath-ehci ath-ehci.0: new USB bus registered, assigned bus number 1
ehci_reset Intialize USB CONTROLLER in host mode: 13
ehci_reset Port Status 1c000000 
ath-ehci ath-ehci.0: irq 3, io mem 0x1b000000
ehci_reset Intialize USB CONTROLLER in host mode: 13
ehci_reset Port Status 1c000000 
ath-ehci ath-ehci.0: USB 2.0 started, EHCI 1.00
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
Ooops, why the devices couldn't been initialed?
TCP cubic 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>
athwdt_init: Registering WDT success
ath_otp_init: Registering OTP success
ath_clksw_init: Registering Clock Switch Interface success
VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
Freeing unused kernel memory: 112k freed
init started:  BusyBox v1.01 (2013.04.28-10:15+0000) multi-call binary
This Board use 2.6.31
xt_time: kernel timezone is -0000
nf_conntrack version 0.5.0 (1024 buckets, 5120 max)
ip_tables: (C) 2000-2006 Netfilter Core Team
insmod: cannot open module `/lib/modules/2.6.31/kernel/iptable_raw.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/flashid.ko': No such file or directory
PPPoL2TP kernel driver, V1.0
PPTP driver version 0.8.3
insmod: cannot open module `/lib/modules/2.6.31/kernel/harmony.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/af_key.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/xfrm_user.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/xt_mark.ko': No such file or directory

Now flash open!
Now flash open!
Now flash open!
Now flash open!
Now flash open!
Now flash open!
Now flash open!
Now flash open!
Now flash open!
Now flash open!
Now flash open!
Now flash open!
Erase from 0X3E0000 to 0X3EBBDC:.
Program from 0X3E0000 to 0X3EBBDC:
write successfully
 (none) mips #4 Mon May 6 13:24:10 CST 2013 (none)
(none) login: ATHR_GMAC: Length per segment 1536
ATHR_GMAC: fifo cfg 3 01f00140
ATHR_GMAC: RX TASKLET - Pkts per Intr:32
mac:1 Registering S27....
ATHR_GMAC: Max segments per packet :   1
ATHR_GMAC: Max tx descriptor count :   40
ATHR_GMAC: Max rx descriptor count :   128
ATHR_GMAC: Mac capability flags    :   2D82
ATHR_GMAC: RX TASKLET - Pkts per Intr:32
mac:0 Registering S27....
ATHR_GMAC: Max segments per packet :   1
ATHR_GMAC: Max tx descriptor count :   40
ATHR_GMAC: Max rx descriptor count :   128
ATHR_GMAC: Mac capability flags    :   2582
athr_gmac_ring_alloc Allocated 640 at 0x83a83c00
athr_gmac_ring_alloc Allocated 2048 at 0x838c3000
WASP ----> S27 PHY MDIO
Setting Drop CRC Errors, Pause Frames and Length Error frames 
Setting PHY...
athr_gmac_ring_alloc Allocated 640 at 0x83a83800
athr_gmac_ring_alloc Allocated 2048 at 0x83a84800
WASP ----> S27 PHY MDIO
Setting Drop CRC Errors, Pause Frames and Length Error frames 
ATHRS27: resetting s27
ATHRS27: s27 reset done
++++ athrs27_igmp_setup once
port0 vid is 0xb000b
port1 vid is 0x30003
port2 vid is 0x50005
port3 vid is 0x70007
port4 vid is 0x90009
++ PVID: 0x0000000b, bitmap: 0x0000001f
++ PVID: 0x00000003, bitmap: 0x0000001f
++ PVID: 0x00000005, bitmap: 0x0000001f
++ PVID: 0x00000007, bitmap: 0x0000001f
++ PVID: 0x00000009, bitmap: 0x0000001f
vtable vid: 0x00000002, bitmap 0x00000003
vtable vid: 0x00000004, bitmap 0x00000005
vtable vid: 0x00000006, bitmap 0x00000007
vtable vid: 0x00000008, bitmap 0x00000009
vtable vid: 0x0000000a, bitmap 0x0000000b
vtable vid: 0x0000000c, bitmap 0x0000000d
vtable vid: 0x0000000e, bitmap 0x0000000f
vtable vid: 0x00000010, bitmap 0x00000011
vtable vid: 0x00000012, bitmap 0x00000013
vtable vid: 0x00000014, bitmap 0x00000015
vtable vid: 0x00000016, bitmap 0x00000017
vtable vid: 0x00000018, bitmap 0x00000019
vtable vid: 0x0000001a, bitmap 0x0000001b
vtable vid: 0x0000001c, bitmap 0x0000001d
vtable vid: 0x0000001e, bitmap 0x0000001f
vtable vid: 0x00000020, bitmap 0x00000021
Setting PHY...
device eth0 entered promiscuous mode
athr_gmac_ring_free Freeing at 0x83a83c00
athr_gmac_ring_free Freeing at 0x838c3000
athr_gmac_ring_alloc Allocated 640 at 0x83a83c00
athr_gmac_ring_alloc Allocated 2048 at 0x83ab0800
WASP ----> S27 PHY MDIO
Setting Drop CRC Errors, Pause Frames and Length Error frames 
Setting PHY...
Now flash open!
athr_gmac_ring_free Freeing at 0x83a83800
athr_gmac_ring_free Freeing at 0x83a84800
athr_gmac_ring_alloc Allocated 640 at 0x83a83800
athr_gmac_ring_alloc Allocated 2048 at 0x83a84000
WASP ----> S27 PHY MDIO
Setting Drop CRC Errors, Pause Frames and Length Error frames 
Setting PHY...
====>>>>DHCP start.dhcpc.c,dhcpcStart,772 
====>>>>DHCP end.dhcpc.c,dhcpcStart,836 
nf_conntrack_rtsp v0.6.21 loading
nf_nat_rtsp v0.6.21 loading
asf: module license 'Proprietary' taints kernel.
Disabling lock debugging due to kernel taint
ath_hal: 0.9.17.1 (AR5416, AR9380, REGOPS_FUNC, WRITE_EEPROM, 11D)
ath_rate_atheros: Copyright (c) 2001-2005 Atheros Communications, Inc, All Rights Reserved
ath_dev: Copyright (c) 2001-2007 Atheros Communications, Inc, All Rights Reserved
ath_ahb: 9.2.0_U10.1020 (Atheros/multi-bss)
__ath_attach: Set global_scn[0]
ACBKMinfree = 48
ACBEMinfree = 32
ACVIMinfree = 16
ACVOMinfree = 0
CABMinfree = 48
UAPSDMinfree = 0
Restoring Cal data from Flash
ath_get_caps[5105] rx chainmask mismatch actual 3 sc_chainmak 0
ath_get_caps[5080] tx chainmask mismatch actual 3 sc_chainmak 0
wifi0: Atheros 9340: mem=0xb8100000, irq=2
====>>>>SystemMode : Normal Router 
wlan_vap_create : enter. devhandle=0x83bd42c0, opmode=IEEE80211_M_HOSTAP, flags=0x1
wlan_vap_create : exit. devhandle=0x83bd42c0, opmode=IEEE80211_M_HOSTAP, flags=0x1.
VAP device ath0 created 
====>>>>wlan: rand channel 9

 DES SSID SET=TP-LINK_137B00 
 ieee80211_ioctl_siwmode: imr.ifm_active=131712, new mode=3, valid=1 
 Free buffer count 256 

 *********************************** 
athr_gmac_ring_free Freeing at 0x83a83800
athr_gmac_ring_free Freeing at 0x83a84000
br0: port 1(eth0) entering disabled state
athr_gmac_ring_alloc Allocated 640 at 0x83a83800
athr_gmac_ring_alloc Allocated 2048 at 0x83b0a800
WASP ----> S27 PHY MDIO
Setting Drop CRC Errors, Pause Frames and Length Error frames 
Setting PHY...
 Free buffer count 256 

 *********************************** 
device ath0 entered promiscuous mode
br0: port 2(ath0) entering forwarding state
 ieee80211_ioctl_siwmode: imr.ifm_active=1442432, new mode=3, valid=1 
br0: port 2(ath0) entering disabled state

 DES SSID SET=TP-LINK_137B00 
 Free buffer count 256 

 *********************************** 
br0: port 2(ath0) entering forwarding state
====>>>>cmdCtrl open success 
====>>>>eventCtrl open success 
====>>>>eventCtrl attach success 
ATHR_GMAC: GE0 RX DMA ENABLE
Reset button pressed.
SC Pushbutton Notify on wifi0 for 0 sec(s) and the vap 8329e000 dev 83b62000:

由于前阵子改 uboot 上瘾了,这里加了个闪存自动识别(那个 8192MB 是笔误哈):

U-Boot 1.1.4 (Jun 29 2013 - 17:55:42)

U-boot AP123

DRAM:  64 MB
SPI FLASH: Winbond W25Q64xV (8192 MB)
Flash:  8 MB
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   ag934x_enet_initialize...
wasp reset mask:c03300
WASP ----> S27 PHY
GMAC: cfg1 0x5 cfg2 0x7114
eth0: ba:be:fa:ce:08:41
s27 reg init 
athrs27_phy_setup ATHR_PHY_CONTROL 4: 0x1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 4: 0x10
eth0 up
WASP ----> S27 PHY
GMAC: cfg1 0xf cfg2 0x7214
eth1: ba:be:fa:ce:08:41
s27 reg init lan 
ATHRS27: resetting s27
ATHRS27: s27 reset done
athrs27_phy_setup ATHR_PHY_CONTROL 0: 0x1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 0: 0x10
athrs27_phy_setup ATHR_PHY_CONTROL 1: 0x1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 1: 0x10
athrs27_phy_setup ATHR_PHY_CONTROL 2: 0x1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 2: 0x10
athrs27_phy_setup ATHR_PHY_CONTROL 3: 0x1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 3: 0x10
eth1 up
eth0, eth1
Autobooting in 1 seconds
## Booting image at 9f020000 ...
   Uncompressing Kernel Image ... OK

Starting kernel ...

最后刷 OpenWRT :

[    0.000000] Linux version 3.8.13 (dword@dword-as4741g) (gcc version 4.6.4 (OpenWrt/Linaro GCC 4.6-2012.12 r37008) ) #8 Tue Jun 25 01:25:53 CST 2013
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 0001974c (MIPS 74Kc)
[    0.000000] SoC: Atheros AR9341 rev 1
[    0.000000] Clocks: CPU:535.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:25.000MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x03ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x03ffffff]
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line:  board=TL-WR841N-v8 console=ttyS0,115200 rootfstype=squashfs,jffs2 noinitrd
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] __ex_table already sorted, skipping sort
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 61596k/65536k available (2144k kernel code, 3940k reserved, 375k data, 232k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:51
[    0.000000] Calibrating delay loop... 266.64 BogoMIPS (lpj=1333248)
[    0.080000] pid_max: default: 32768 minimum: 301
[    0.080000] Mount-cache hash table entries: 512
[    0.090000] NET: Registered protocol family 16
[    0.090000] MIPS: machine is TP-LINK TL-WR841N/ND v8
[    0.510000] bio: create slab  at 0
[    0.510000] Switching to clocksource MIPS
[    0.520000] NET: Registered protocol family 2
[    0.520000] TCP established hash table entries: 512 (order: 0, 4096 bytes)
[    0.530000] TCP bind hash table entries: 512 (order: -1, 2048 bytes)
[    0.540000] TCP: Hash tables configured (established 512 bind 512)
[    0.540000] TCP: reno registered
[    0.540000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.550000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.560000] NET: Registered protocol family 1
[    0.580000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.580000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.590000] msgmni has been set to 120
[    0.600000] io scheduler noop registered
[    0.600000] io scheduler deadline registered (default)
[    0.610000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.630000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
[    0.640000] console [ttyS0] enabled, bootconsole disabled
[    0.640000] console [ttyS0] enabled, bootconsole disabled
[    0.650000] ath79-spi ath79-spi: master is unqueued, this is deprecated
[    0.660000] m25p80 spi0.0: found s25fl064k, expected m25p80
[    0.670000] m25p80 spi0.0: s25fl064k (8192 Kbytes)
[    0.670000] 5 tp-link partitions found on MTD device spi0.0
[    0.680000] Creating 5 MTD partitions on "spi0.0":
[    0.680000] 0x000000000000-0x000000020000 : "u-boot"
[    0.690000] 0x000000020000-0x0000000fef98 : "kernel"
[    0.690000] mtd: partition "kernel" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    0.710000] 0x0000000fef98-0x0000007f0000 : "rootfs"
[    0.710000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    0.730000] mtd: partition "rootfs" set to be root filesystem
[    0.740000] mtd: partition "rootfs_data" created automatically, ofs=640000, len=1B0000 
[    0.740000] 0x000000640000-0x0000007f0000 : "rootfs_data"
[    0.750000] 0x0000007f0000-0x000000800000 : "art"
[    0.760000] 0x000000020000-0x0000007f0000 : "firmware"
[    0.780000] libphy: ag71xx_mdio: probed
[    0.790000] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:MII
[    1.340000] ag71xx ag71xx.0 eth0: connected to PHY at ag71xx-mdio.1:00 [uid=004dd042, driver=Generic PHY]
[    1.350000] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:GMII
[    1.910000] eth1: Found an AR934X built-in switch
[    2.950000] TCP: cubic registered
[    2.950000] NET: Registered protocol family 17
[    2.950000] 8021q: 802.1Q VLAN Support v1.8
[    2.970000] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    2.980000] Freeing unused kernel memory: 232k freed
procd: Console is alive
procd: - preinit -
Press the [f] key and hit [enter] to enter failsafe mode
mount_root: jffs2 is not ready - marker found
procd: - early -
procd: - init -
Please press Enter to activate this console.
[   11.040000] Loading modules backported from Linux version master-2013-06-13-0-g09fcdfb
[   11.050000] Backport generated by backports.git backports-20130531-13-g3d933eb
[   11.090000] cfg80211: Calling CRDA to update world regulatory domain
[   11.090000] cfg80211: World regulatory domain updated:
[   11.100000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   11.110000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   11.120000] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   11.120000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   11.130000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   11.140000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   11.360000] NET: Registered protocol family 10
[   12.050000] ieee80211 phy0: Atheros AR9340 Rev:0 mem=0xb8100000, irq=47
[   12.060000] cfg80211: Calling CRDA for country: US
[   12.060000] cfg80211: Regulatory domain changed to country: US
[   12.070000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   12.080000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
[   12.090000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
[   12.090000] cfg80211:   (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   12.100000] cfg80211:   (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   12.110000] cfg80211:   (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   12.120000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
[   12.220000] Initializing XFRM netlink socket
[   12.300000] NET: Registered protocol family 15
[   12.460000] PPP generic driver version 2.4.2
[   12.470000] tun: Universal TUN/TAP device driver, 1.6
[   12.470000] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[   12.550000] l2tp_core: L2TP core driver, V2.0
[   12.560000] l2tp_netlink: L2TP netlink interface
[   12.570000] gre: GRE over IPv4 demultiplexor driver
[   12.590000] ip_gre: GRE over IPv4 tunneling driver
[   12.770000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   12.810000] xt_time: kernel timezone is -0000
[   12.890000] NET: Registered protocol family 24
[   12.970000] nf_conntrack version 0.5.0 (966 buckets, 3864 max)
[   13.440000] l2tp_ppp: PPPoL2TP kernel driver, V2.0
[   14.300000] nf_conntrack_rtsp v0.6.21 loading
[   14.380000] nf_nat_rtsp v0.6.21 loading
[   14.460000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   14.910000] u32 classifier
[   14.910000]     Performance counters on
[   14.910000]     input device check on
[   14.920000]     Actions configured
[   15.070000] Mirror/redirect action on
[   21.150000] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   21.150000] device eth1 entered promiscuous mode
[   21.160000] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   21.170000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   22.270000] eth1: link up (1000Mbps/Full duplex)
[   22.270000] br-lan: port 1(eth1) entered forwarding state
[   22.280000] br-lan: port 1(eth1) entered forwarding state
[   22.280000] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   22.290000] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   24.280000] br-lan: port 1(eth1) entered forwarding state
[   37.150000] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   37.160000] jffs2_build_filesystem(): unlocking the mtd device... done.
[   37.160000] jffs2_build_filesystem(): erasing all blocks after the end marker... done.
[   41.150000] jffs2: notice: (1755) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orpha.
procd: - init complete -

BusyBox v1.19.4 (2013-06-22 17:49:07 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
 -----------------------------------------------------
 BARRIER BREAKER (Bleeding Edge, r37027)
 -----------------------------------------------------
  * 1/2 oz Galliano         Pour all ingredients into
  * 4 oz cold Coffee        an irish coffee mug filled
  * 1 1/2 oz Dark Rum       with crushed ice. Stir.
  * 2 tsp. Creme de Cacao
 -----------------------------------------------------
root@OpenWrt:/# cat /proc/meminfo 
MemTotal:          61828 kB
MemFree:           37096 kB
Buffers:            3084 kB
Cached:             8904 kB
SwapCached:            0 kB
Active:             5820 kB
Inactive:           7796 kB
Active(anon):       1772 kB
Inactive(anon):       36 kB
Active(file):       4048 kB
Inactive(file):     7760 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:          1648 kB
Mapped:             1420 kB
Shmem:               180 kB
Slab:               5944 kB
SReclaimable:       1156 kB
SUnreclaim:         4788 kB
KernelStack:         336 kB
PageTables:          284 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:       30912 kB
Committed_AS:      13040 kB
VmallocTotal:    1048372 kB
VmallocUsed:        1712 kB
VmallocChunk:    1037880 kB
root@OpenWrt:/# cat /proc/cpuinfo 
system type             : Atheros AR9341 rev 1
machine                 : TP-LINK TL-WR841N/ND v8
processor               : 0
cpu model               : MIPS 74Kc V4.12
BogoMIPS                : 266.64
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 32
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0000, 0x0690, 0x04c0, 0x0408]
ASEs implemented        : mips16
shadow register sets    : 1
kscratch registers      : 0
core                    : 0
VCED exceptions         : not available
VCEI exceptions         : not available

root@OpenWrt:/#

各种文件下载:

修改版 uboot

原厂 VxWorks 编程器固件

OpenWRT 8MB 闪存版

《修改水星 MW310R》上的12个想法

  1. 楼主,我想给我的就路由器加个USB口传输数据。但是知识有限,只能求助您了。也是RF3050F的CPU,您能帮个忙么?指导我一下~~万分感谢

  2. 手头上有个wap120nf补上网口后为什么没反应。。。已经刷了自己编译的openwrt 用的是615h1版本的。。。。是不是要改交换机代码?网口插上去串口是有输出证明路由知道插上网线了。。。

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据