Netgear WAG 102

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 05:40, 22 October 2008 (edit)
Holgi03 (Talk | contribs)
(Hardware)
← Previous diff
Current revision (11:06, 30 April 2010) (edit) (undo)
Glenn (Talk | contribs)
(catchg)
 
(30 intermediate revisions not shown.)
Line 1: Line 1:
 +
__TOC__ __TOC__
Line 4: Line 5:
==Hardware== ==Hardware==
 +<center> [[Image:Wag102 board.jpg|thumb|WAG 102 Board]] </center>
- Atheros AR5312 chipset @ 220 MHz <br> - Atheros AR5312 chipset @ 220 MHz <br>
- Flash: MX 29LV320CBTC-70G <br> - Flash: MX 29LV320CBTC-70G <br>
- Net: RTL8201CP <br> - Net: RTL8201CP <br>
- Ram: EM639165TS-6G <br> - Ram: EM639165TS-6G <br>
-- FFC ID: PY307100064 <br>+- FCC ID: PY307100064 <br>
-<center> [[Image:Wag102 board.jpg|thumb|WAG 102 Board]] </center>+
- Serial Pinout: TXD | 3,3V | RXD | GND <BR> - Serial Pinout: TXD | 3,3V | RXD | GND <BR>
- Baudrate 9600/8/n/1 (Original-Firmware) 115200/8/n/1 (Redboot/DD-WRT)<br> - Baudrate 9600/8/n/1 (Original-Firmware) 115200/8/n/1 (Redboot/DD-WRT)<br>
Line 20: Line 21:
'''Boot Menu''' '''Boot Menu'''
-[Boot]: ?<br>+<pre>
 +[Boot]: ?
-? - print this list<br>+? - print this list
-@ - boot (load and go)<br>+@ - boot (load and go)
-p - print boot params<br>+p - print boot params
-c - change boot params<br>+c - change boot params
-e - print fatal exception<br>+e - print fatal exception
-v - print version<br>+v - print version
-B - change board data<br>+B - change board data
-S - show board data<br>+S - show board data
n netif - print network interface device address<br> n netif - print network interface device address<br>
-$dev(0,procnum)host:/file h=# e=# b=# g=# u=usr [pw=passwd] f=# tn=targetname s=script o=other<br>+$dev(0,procnum)host:/file h=# e=# b=# g=# u=usr [pw=passwd] f=# tn=targetname s=script o=other
-boot device: tffs=drive,removable file name: /tffs0/vxWorks<br>+boot device: tffs=drive,removable file name: /tffs0/vxWorks
-<nowiki> Boot flags:</nowiki><br>+Boot flags:
-<nowiki> 0x02 - load local system symbols </nowiki><br>+0x02 - load local system symbols
-<nowiki> 0x04 - don't autoboot </nowiki><br>+0x04 - don't autoboot
-<nowiki> 0x08 - quick autoboot (no countdown </nowiki><br>+0x08 - quick autoboot (no countdown
-<nowiki> 0x20 - disable login security </nowiki><br>+0x20 - disable login security
-<nowiki> 0x40 - use bootp to get boot parameters </nowiki><br>+0x40 - use bootp to get boot parameters
-<nowiki> 0x80 - use tftp to get boot image </nowiki><br>+0x80 - use tftp to get boot image
-<nowiki> 0x100 - use proxy arp </nowiki><br>+0x100 - use proxy arp
- +available boot devices: Enhanced Network Devices ae0 tffs
-available boot devices: Enhanced Network Devices ae0 tffs<br>+</pre>
- +
'''Original Boot Parameter''' '''Original Boot Parameter'''
 +<pre>
 +[Boot]: p
-[Boot]: p <br>+boot device : tffs:
 +unit number : 0
 +processor number : 0
 +file name : /fl/wag102
 +inet on ethernet (e) : 192.168.0.232:0xffffff00
 +flags (f) : 0x0
 +other (o) : ae
 +</pre>
-boot device : tffs: <br>+'''Board Konfiguration'''
-unit number : 0 <br>+<pre>
-processor number : 0 <br>+name: AP AR5001AP default
-file name : /fl/wag102 <br>+magic: 35333131
-inet on ethernet (e) : 192.168.0.232:0xffffff00 <br>+cksum: 1699
-flags (f) : 0x0 <br>+rev: 4
-other (o) : ae <br>+major: 1
 +minor: 0
 +pciid: 0013
 +wlan0: yes 00:18:4d:07:xx:xx
 +wlan1: yes 00:18:4d:07:xx:xx
 +enet0: yes 00:18:4d:07:xx:xx
 +enet1: no 34:12:78:12:xx:xx
 +uart0: yes
 +sysled: yes, gpio 7
 +factory: yes, gpio 6
 +serclk: internal
 +cpufreq: calculated 220000000 Hz
 +sysfreq: calculated 55000000 Hz
 +memcap: disabled
 +watchdg: enabled
 +</pre>
-""Board Konfiguration"" 
-name: AP AR5001AP default <br>+'''Aufbau der Firmware Update-Files'''
-magic: 35333131 <br>+
-cksum: 1699 <br>+
-rev: 4 <br>+
-major: 1 <br>+
-minor: 0 <br>+
-pciid: 0013 <br>+
-wlan0: yes 00:18:4d:07:xx:xx <br>+
-wlan1: yes 00:18:4d:07:xx:xx <br>+
-enet0: yes 00:18:4d:07:xx:xx <br>+
-enet1: no 34:12:78:12:xx:xx <br>+
-uart0: yes <br>+
-sysled: yes, gpio 7 <br>+
-factory: yes, gpio 6 <br>+
-serclk: internal <br>+
-cpufreq: calculated 220000000 Hz <br>+
-sysfreq: calculated 55000000 Hz <br>+
-memcap: disabled <br>+
-watchdg: enabled <br>+
 +!!! unvollständig !!!
-----+Version v2.07
 + 
 +{| class="wikitable" border="1"
 +|-
 +! '''Adresse'''
 +! '''Abschnitt'''
 +! '''v2.07'''
 +|-
 +| >>>>>
 +| HEADER
 +| <<<<<
 +|-
 +| 0x64-0x67
 +| Versionsnummer
 +| 32 30 30 37
 +|-
 +| 0x70-0x73
 +| Länge des gesamten Files ohne MD5 Prüfsumme
 +| 00 17 01 D4
 +|-
 +| 0x74
 +| ??
 +| 00
 +|-
 +| 0x75
 +| ??
 +| 01
 +|-
 +| 0x76
 +| ??
 +| 00
 +|-
 +| 0x77
 +| ??
 +| 00
 +|-
 +| 0x78-0x7B
 +| Länge SYS File
 +| 00127b54
 +|-
 +| 0x7C-127BCF
 +| >>>>SYS<<<<
 +| 7F 45 4C 46 01 02 01 00 ....
 +|-
 +|sys +1
 +| ??
 +| 00
 +|-
 +|sys +2
 +| ??
 +| 02
 +|-
 +|sys +3
 +| ??
 +| 00
 +|-
 +|sys +4
 +| ??
 +| 00
 +|-
 +|sys +5 - +8
 +| Länge cfg
 +| 000066EC
 +|-
 +|sys +9 - sys +9 + Länge cfg
 +| >>>>CFG<<<<
 +| 23 20 43 6F 70 79 72 69 67 ....
 +|-
 +|cfg +1
 +| ??
 +| 10
 +|-
 +|cfg +2-3
 +|Versionsnummer bootloader
 +|1007
 +|-
 +|cfg +4-7 Länge bootkoader
 +|Länge bootloader
 +|00041e10
 +|-
 +|cfg +8 - cfg +8 + Länge bootloader
 +| >>>>BOOTLOADER<<<<
 +| 10 00 01 4F 00 00 00 00 10 00 01...
 +|-
 +|bootloader +1
 +| ??
 +| 20
 +|-
 +|bootloader +2-3
 +|Versionsnummer bootcfg
 +|1007
 +|-
 +|bootloader +4-7 Länge bootcfg
 +|Länge bootcfg
 +|00000070
 +|-
 +|bootloader +8 - bootloader +8 + Länge bootcfg
 +| >>>>BOOTCFG<<<<
 +| 41 52 35 33 31 58 74 66 66...
 +|-
 +|bootcfg +1
 +| ??
 +| 40
 +|-
 +|bootcfg +2-3
 +|Versionsnummer boarddata
 +|1007
 +|-
 +|bootcfg +4-7 Länge boarddata
 +|Länge boarddata
 +|0000007c
 +|-
 +|bootcfg +8 - bootcfg +8 + Länge boarddata
 +| >>>>BORDDATA<<<<
 +| 35 33 31 31 18 6B 00 04 ....
 +|-
 +|}
 +<br>
 +Die einzelnen Abschnitte werden nur bei geänderter Versionsnummer überschrieben.<br>
==Installation== ==Installation==
--+ 
--+ 
--+1. Router auf Werkseinstellungen zurücksetzen.<br>
--+2. mit PC verbinden (dem PC die 192.168.0.36 zuweisen)<br>
--+3. auf dem PC einen TFTP-Server Installieren z.B. TFTPD32 von http://jounin.net/<br>
--+4. tftp_boot.img, wag102firmware.img und wagram_boot.img von http://www.dd-wrt.com/dd-wrtv2/down.php?path=downloads/v24-sp1/Professional/Netgear/WAG102 downloaden und ins FTP-Root des tftp Servers kopieren. <br>
 +5. über das Webinterface des Router (192.168.0.232) Firmware Update laden (tftp_boot.img)<br>
 +6. der Router startet automatisch neu und wird sich vom TFTP-Server das wagram_boot.img laden und starten.<br>
 +7. es findet nun der eigentliche Flash Prozess statt. (Dauer ca. 2 bis 3 Minuten) in Log des TFTP Servers sollte das nachladen des wag102firmware.img sehen sein. <br>
 +8. Router startet mit DD-WRT.<br>
 +9. zu Diagnose ob der Router das DD-WRT gestartet hat suchen sie einfach nach einem neuen WLAN mit der SSID DD-WRT.<br>
 + 
 +'''!!!!!Achtung eine vorzeitige Unterbrechung der Prozedur kann zur Zerstörung des Routers führen.!!!'''<br>
 + 
 +10. der Router ist nun unter der IP 192.168.1.1 erreichbar.<br>
 + 
 +<pre>
 +Falls die Update-Prozedur aus irgendwelchen Gründen fehlschlägt, überprüfen sie ihre Konfiguration.
 +Der Router sollte während der Prozedur unter der IP 192.168.0.232 zu erreichen sein (ping 192.168.0.232).
 +Nach einspielen des tftp_boot.img befindet sich der Router in „TFTP Boot Modus“, er versucht im Abstand
 +von ca. 10 Sec. von einem TFTP-Server mit der IP 192.168.0.36 das wagram_boot.img zu laden.
 +</pre>
==Recovery== ==Recovery==
--+ 
--+Load the wag102Recovery.7z from http://www.dd-wrt.com/dd-wrtv2/down.php?path=downloads/v24-sp1/Professional/Netgear/WAG102<br>
--+ 
--+connect the Router via serial Cable >[http://www.dd-wrt.com/wiki/index.php/LaFonera_Hardware_Serial-Cable-Port Fonera Serial Cable]<BR>
--+ 
--+ 
--+'''Install REDBOOT'''
 +<pre>
 +-load redboot ram_Image
 +tftpboot 192.168.0.36:redboot_ramboot.elf (from vxworks bootloader)
 +or
 +load -v redboot_ramboot.srec (from redboot) and exec
 +-fis init -f
 +-load -r -b %{FREEMEMLO} redboot.rom
 +-fis create -l 0x30000 -e 0xbfc00000 RedBoot
 +-reset
 +-fis init -f
 +-fconfig -i
 + 
 +Run script at boot: true
 +Boot script:
 +Enter script, terminate with empty line
 +>> fis load linux
 +>> exec
 +>>
 +Boot script timeout (1000ms resolution): 5
 +Use BOOTP for network configuration: false
 +Gateway IP address: 192.168.0.36
 +Local IP address: 192.168.0.232
 +Local IP address mask: 255.255.255.0
 +Default server IP address: 192.168.0.36
 +Console baud rate: 115200
 +DNS server IP address:
 +GDB connection port: 9000
 +Force console for special debug messages: false
 +Network debug at boot time: false
 +Update RedBoot non-volatile configuration - continue (y/n)? y
 +</pre>
 + 
 +'''Install DD-WRT'''
 +<pre>
 +-load -r -v -b 0x80041000 root.fs
 +-fis create -b 0x80041000 -f 0xBFC30000 -l 0x002a0000 -e 0x00000000 rootfs
 +-load -r -v -b 0x80100000 lzma_vmlinus
 +-fis create -r 0x80100000 -e 0x80100000 -l 0x000c0000 -f 0xBFED0000 linux
 +-fis create -f 0xBFFA0000 -b 0x80041000 -l 0x00010000 -e 0x00000000 nvram
 +</pre>
 + 
 +'''Recover board_data'''
 +<pre>
 +- show Board-Data
 +dump -b 0xBFFe0000 -l 0x100
 +or Command S from Origianl Bootloader
 + 
 +- load redboot ram_Image
 +tftpboot 192.168.0.36:redboot_ramboot.elf (from vxworks bootloader)
 +or
 +load -v redboot_ramboot.srec (from redboot) and exec
 +- load -r -b %{FREEMEMLO} board_data
 +- fis write -f 0xBFFE0000 -b 0x8004a000 -l 0x00010000
 +- change board data with B Command from vxworks bootloader
 +</pre>
 + 
 +'''Flash to Original Firmware'''
 +<pre>
 +-load redboot ram_Image
 +tftpboot 192.168.0.36:redboot_ramboot.elf (from vxworks bootloader)
 +or
 +load -v redboot_ramboot.srec (from redboot) and exec
 + 
 +-load -r -b %{FREEMEMLO} original_Firmware_backup_WAG_102.bin
 +-fis write -f 0xbfc00000 -b 0x8004a000 -l 0x003E0000
 +</pre>
 + 
 +--[[User:Holgi03|holgi]] 09:19, 23 October 2008 (CEST)
 + 
 +[[Category:Netgear guides]]

Current revision

Contents


Image:Wag102_front.jpg

[edit] Hardware

WAG 102 Board
WAG 102 Board

- Atheros AR5312 chipset @ 220 MHz
- Flash: MX 29LV320CBTC-70G
- Net: RTL8201CP
- Ram: EM639165TS-6G
- FCC ID: PY307100064
- Serial Pinout: TXD | 3,3V | RXD | GND
- Baudrate 9600/8/n/1 (Original-Firmware) 115200/8/n/1 (Redboot/DD-WRT)



[edit] Original Firmware (vxworks)

Boot Menu

[Boot]: ?

?                     - print this list
@                     - boot (load and go)
p                     - print boot params
c                     - change boot params
e                     - print fatal exception
v                     - print version
B                     - change board data
S                     - show board data
n netif               - print network interface device address<br>
$dev(0,procnum)host:/file h=# e=# b=# g=# u=usr [pw=passwd] f=# tn=targetname s=script o=other
boot device: tffs=drive,removable     file name: /tffs0/vxWorks
Boot flags:
0x02  - load local system symbols
0x04  - don't autoboot 
0x08  - quick autoboot (no countdown 
0x20  - disable login security 
0x40  - use bootp to get boot parameters
0x80  - use tftp to get boot image 
0x100 - use proxy arp
available boot devices: Enhanced Network Devices ae0 tffs

Original Boot Parameter

[Boot]: p 

boot device          : tffs: 
unit number          : 0 
processor number     : 0 
file name            : /fl/wag102 
inet on ethernet (e) : 192.168.0.232:0xffffff00 
flags (f)            : 0x0 
other (o)            : ae 

Board Konfiguration

name:     AP AR5001AP default 
magic:    35333131 
cksum:    1699 
rev:      4 
major:    1 
minor:    0 
pciid:    0013 
wlan0:    yes 00:18:4d:07:xx:xx 
wlan1:    yes 00:18:4d:07:xx:xx 
enet0:    yes 00:18:4d:07:xx:xx 
enet1:    no  34:12:78:12:xx:xx 
uart0:    yes 
sysled:   yes, gpio 7 
factory:  yes, gpio 6 
serclk:   internal 
cpufreq:  calculated 220000000 Hz 
sysfreq:  calculated 55000000 Hz 
memcap:   disabled 
watchdg:  enabled 


Aufbau der Firmware Update-Files

!!! unvollständig !!!

Version v2.07

Adresse Abschnitt v2.07
>>>>> HEADER <<<<<
0x64-0x67 Versionsnummer 32 30 30 37
0x70-0x73 Länge des gesamten Files ohne MD5 Prüfsumme 00 17 01 D4
0x74  ?? 00
0x75  ?? 01
0x76  ?? 00
0x77  ?? 00
0x78-0x7B Länge SYS File 00127b54
0x7C-127BCF >>>>SYS<<<< 7F 45 4C 46 01 02 01 00 ....
sys +1  ?? 00
sys +2  ?? 02
sys +3  ?? 00
sys +4  ?? 00
sys +5 - +8 Länge cfg 000066EC
sys +9 - sys +9 + Länge cfg >>>>CFG<<<< 23 20 43 6F 70 79 72 69 67 ....
cfg +1  ?? 10
cfg +2-3 Versionsnummer bootloader 1007
cfg +4-7 Länge bootkoader Länge bootloader 00041e10
cfg +8 - cfg +8 + Länge bootloader >>>>BOOTLOADER<<<< 10 00 01 4F 00 00 00 00 10 00 01...
bootloader +1  ?? 20
bootloader +2-3 Versionsnummer bootcfg 1007
bootloader +4-7 Länge bootcfg Länge bootcfg 00000070
bootloader +8 - bootloader +8 + Länge bootcfg >>>>BOOTCFG<<<< 41 52 35 33 31 58 74 66 66...
bootcfg +1  ?? 40
bootcfg +2-3 Versionsnummer boarddata 1007
bootcfg +4-7 Länge boarddata Länge boarddata 0000007c
bootcfg +8 - bootcfg +8 + Länge boarddata >>>>BORDDATA<<<< 35 33 31 31 18 6B 00 04 ....


Die einzelnen Abschnitte werden nur bei geänderter Versionsnummer überschrieben.

[edit] Installation

1. Router auf Werkseinstellungen zurücksetzen.
2. mit PC verbinden (dem PC die 192.168.0.36 zuweisen)
3. auf dem PC einen TFTP-Server Installieren z.B. TFTPD32 von http://jounin.net/
4. tftp_boot.img, wag102firmware.img und wagram_boot.img von http://www.dd-wrt.com/dd-wrtv2/down.php?path=downloads/v24-sp1/Professional/Netgear/WAG102 downloaden und ins FTP-Root des tftp Servers kopieren.
5. über das Webinterface des Router (192.168.0.232) Firmware Update laden (tftp_boot.img)
6. der Router startet automatisch neu und wird sich vom TFTP-Server das wagram_boot.img laden und starten.
7. es findet nun der eigentliche Flash Prozess statt. (Dauer ca. 2 bis 3 Minuten) in Log des TFTP Servers sollte das nachladen des wag102firmware.img sehen sein.
8. Router startet mit DD-WRT.
9. zu Diagnose ob der Router das DD-WRT gestartet hat suchen sie einfach nach einem neuen WLAN mit der SSID DD-WRT.

!!!!!Achtung eine vorzeitige Unterbrechung der Prozedur kann zur Zerstörung des Routers führen.!!!

10. der Router ist nun unter der IP 192.168.1.1 erreichbar.

Falls die Update-Prozedur aus irgendwelchen Gründen fehlschlägt, überprüfen sie ihre Konfiguration. 
Der Router sollte während der Prozedur unter der  IP 192.168.0.232 zu erreichen sein (ping 192.168.0.232).
Nach einspielen des tftp_boot.img befindet sich der Router in „TFTP Boot Modus“, er versucht im Abstand 
von ca. 10 Sec. von einem TFTP-Server mit der IP 192.168.0.36 das wagram_boot.img zu laden. 

[edit] Recovery

Load the wag102Recovery.7z from http://www.dd-wrt.com/dd-wrtv2/down.php?path=downloads/v24-sp1/Professional/Netgear/WAG102

connect the Router via serial Cable >Fonera Serial Cable


Install REDBOOT

-load redboot ram_Image
tftpboot 192.168.0.36:redboot_ramboot.elf (from vxworks bootloader)
or  
load -v redboot_ramboot.srec (from redboot) and exec
-fis init -f
-load -r -b %{FREEMEMLO} redboot.rom 
-fis create -l 0x30000 -e 0xbfc00000  RedBoot
-reset
-fis init -f
-fconfig -i 

Run script at boot: true
Boot script:
Enter script, terminate with empty line
>> fis load linux
>> exec
>>
Boot script timeout (1000ms resolution): 5
Use BOOTP for network configuration: false
Gateway IP address: 192.168.0.36
Local IP address: 192.168.0.232
Local IP address mask: 255.255.255.0
Default server IP address: 192.168.0.36
Console baud rate: 115200
DNS server IP address:
GDB connection port: 9000
Force console for special debug messages: false
Network debug at boot time: false
Update RedBoot non-volatile configuration - continue (y/n)? y

Install DD-WRT

-load -r -v -b 0x80041000 root.fs
-fis create -b 0x80041000 -f 0xBFC30000 -l 0x002a0000 -e 0x00000000 rootfs
-load -r -v -b 0x80100000 lzma_vmlinus
-fis create -r 0x80100000 -e 0x80100000 -l 0x000c0000 -f 0xBFED0000 linux
-fis create -f 0xBFFA0000 -b 0x80041000 -l 0x00010000 -e 0x00000000 nvram 

Recover board_data

- show Board-Data
dump -b 0xBFFe0000 -l 0x100 
or Command S from Origianl Bootloader

- load redboot ram_Image
tftpboot 192.168.0.36:redboot_ramboot.elf (from vxworks bootloader)
or  
load -v redboot_ramboot.srec (from redboot) and exec
- load -r -b %{FREEMEMLO} board_data 
- fis write -f 0xBFFE0000 -b 0x8004a000 -l 0x00010000
- change board data with B Command from vxworks bootloader

Flash to Original Firmware

-load redboot ram_Image
tftpboot 192.168.0.36:redboot_ramboot.elf (from vxworks bootloader)
or  
load -v redboot_ramboot.srec (from redboot) and exec

-load -r -b %{FREEMEMLO} original_Firmware_backup_WAG_102.bin
-fis write -f 0xbfc00000 -b 0x8004a000 -l 0x003E0000

--holgi 09:19, 23 October 2008 (CEST)