Netgear DG834G v2

Support forum for routers of all shapes and sizes. As long as it's router based and doesn't fall into the other categories, this is the place to ask your questions.
willshep
Regular
Regular
Posts: 46
Joined: Tue Mar 27, 2007 1:45 pm

Netgear DG834G v2

Post by willshep » Sun Jul 06, 2008 2:53 pm

As far as i can tell (ie from the datasheets) this router has all the required hardware on it for rt fw; there is an issue though with the adam2 boot loader where it checks to see if the firware has the right checksum and if not then refuses to boot - and I have also followed the instructions in order to patch this - but I cannot access the adam2 ftp at all as the directory structure proc/sys/dev does not have an adam2 entry.

Any ideas on how to get into the ftp?

Incidentially - the RUC program does not work on this becuase (I am guessing) the telnet access does not require login and the utility just simply hangs waiting for a response that isn't coming.. so i can't use that to check.

ANy ideas would be great.

To be honest, I'm happy to get another router but nots ure which one to get - I've used this f/w on a wired router for a long time and certianly want it installed on any new router.

Regards

Will
User avatar
Neo
RouterTech Team
RouterTech Team
Posts: 3583
Joined: Thu Jan 26, 2006 1:09 pm
Contact:

Re: Netgear DG834G v2

Post by Neo » Sun Jul 06, 2008 4:35 pm

willshep wrote:Incidentially - the RUC program does not work on this becuase (I am guessing) the telnet access does not require login and the utility just simply hangs waiting for a response that isn't coming.. so i can't use that to check.
Can you try the Telnet script from viewtopic.php?t=1062 - you will need to modify it (remove the password/username) to correctly gain access ;) Once you have the output, please PM the results (so that any sensitive info is not made public).
RouterTech Team
Image
No support via PM, please ask your questions on the forum!
mstombs
RouterTech Team
RouterTech Team
Posts: 3753
Joined: Wed Jan 10, 2007 11:54 pm

Post by mstombs » Sun Jul 06, 2008 4:55 pm

I'm not sure anyone has successfully installed RT firmware before on such a device. Need to check the flash format carefully - especially the config area - Netgear do not use the Ti config.bin I recall. Need also to check the switch and wireless hardware.
willshep
Regular
Regular
Posts: 46
Joined: Tue Mar 27, 2007 1:45 pm

Post by willshep » Sun Jul 06, 2008 7:35 pm

All the data is here and i should think its correct

http://wiki.openwrt.org/OpenWrtDocs/Har ... ear/DG834G

for "v2"


this was the patch procedure for adam2:

http://www.earth.li/~noodles/hardware-dg834g.html

W
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12066
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: Netgear DG834G v2

Post by thechief » Sun Jul 06, 2008 7:57 pm

willshep wrote:As far as i can tell (ie from the datasheets) this router has all the required hardware on it for rt fw; there is an issue though with the adam2 boot loader where it checks to see if the firware has the right checksum and if not then refuses to boot - and I have also followed the instructions in order to patch this - but I cannot access the adam2 ftp at all as the directory structure proc/sys/dev does not have an adam2 entry.
How are you trying to connect via ftp? Your mention of /proc/sys/dev suggests that you are trying to connect after the router has booted up the kernel and loaded the filesystem. This is not how to access the bootloader ftp. You access it by interrupting the boot process in the few seconds before the bootloader loads the kernel, and then running your ftp client to connect. Without a serial console, getting the timing right is a hit and miss affair. You may need to keep rebooting and trying to get in during those few seconds before you succeed. Read the threads on de-bricking for more information on how to connect to the bootloader ftp server.
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
User avatar
Neo
RouterTech Team
RouterTech Team
Posts: 3583
Joined: Thu Jan 26, 2006 1:09 pm
Contact:

Post by Neo » Mon Jul 07, 2008 1:10 am

Based on the information in the PM:
  1. No normal indication of wireless are found so perhaps the wireless AP was disabled? It's strange that the usual wireless directories don't appear on the router... But I note the presence of a tiwlan in the modules (like this router).
  2. The bootloader can't be verified as Adam2 - there is no normal adam2 directory and no my_ipaddress in the environment. The only value that indicates an Adam2 bootloader is the BootloaderVersion variable
This means that if the RUC were able to access your router it would not be able to suggest a firmware package. The best guess would be routertech-ar7wrd-adam2-firmware-20080331.zip but there's no guarantee since the router seems a bit atypical.

For reference, here is the main info from the script:

cat /proc/ticfg/env
maca <removed>
macb <removed>
memsize 0x01000000
flashsize 0x00400000
modetty0 115200,n,8,1,hw
modetty1 115200,n,8,1,hw
bootserport tty0
cpufrequency 150000000
sysfrequency 125000000
bootloaderVersion 0.18.01
ProductID DG834
HWRevision Unknown
SerialNumber none
prompt DGB34
firstfreeaddress 0x9402e088
req_fullrate_freq 125000000
mtd0 0x900d0000,0x903e0000
mtd1 0x90020000,0x900d0000
mtd2 0x90000000,0x90020000
mtd3 0x903e0000,0x903f0000
oam_lb_timeout 100
autoload
mtd4 0x903f0000,0x90400000

cat /proc/sys/dev/adam2/environment
cat: /proc/sys/dev/adam2/environment: No such file or directory

cat /proc/version
Linux version 2.4.17_mvl21-malta-mips_fp_le (root@Run-P4) (gcc version 2.95.3 20010315 (release/MontaVista)) #161 Mon Jun 28 12:09:59 CST 2004

cat /etc/versions
cat: /etc/versions: No such file or directory

cat /proc/cpuinfo
processor : 0
cpu model : MIPS 4KEc V4.8
BogoMIPS : 149.91
wait instruction : no
microsecond timers : yes
extra interrupt vector : yes
hardware watchpoint : yes
VCED exceptions : not available
VCEI exceptions : not available

cat /proc/avalanche/avsar_ver
ATM Driver version:[4.00.07.00]
DSL HAL version: [1.00.06.00]
DSP Datapump version: [1.00.09.00] Annex A
SAR HAL version: [01.06.06]
PDSP Firmware version:[0.49]

cat /proc/interrupts
7: 1110596 R4000 timer/counter [MIPS interrupt]
15: 97 serial [hw0 (Avalanche Primary)]
23: 519351 + SAR [hw0 (Avalanche Primary)]
29: 559277 + VLYNQ0 [hw0 (Avalanche Primary)]
41: 9552 + Cpmac Driver [hw0 (Avalanche Primary)]
47: 11 + DSL [hw0 (Avalanche Primary)]

cat /proc/modules
tiwlan 65432 2
ipt_REJECT 8744 1
led 3448 0 (unused)
push_button 1544 1
tiatm 111288 1
RouterTech Team
Image
No support via PM, please ask your questions on the forum!
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12066
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Post by thechief » Mon Jul 07, 2008 7:20 am

Well, the mtd values are certainly all over the place. Hardly any of them is standard. I would stay well away from upgrading the firmware to a RT firmware.
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
mstombs
RouterTech Team
RouterTech Team
Posts: 3753
Joined: Wed Jan 10, 2007 11:54 pm

Post by mstombs » Mon Jul 07, 2008 8:21 am

According to the OpenWRT info it should be a compatible AMD flash and Marvell switch. But it has a 128KB adam2 bootloader (normal is 64K) and mtd4 is a small extra partition (language options?) and not the normal single image location.

As per old threads - no one has found how to connect JTAG to this model of router, so changes of recovery if the flash is corrupted are small.

The firmware is very old, I'm sure there's newer official firmware available, which would work better than dsp V1!
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12066
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Post by thechief » Mon Jul 07, 2008 2:54 pm

The question is whether there is a compatible 64kb bootloader (either Adam2 or PSBL) that can be copied over the current bootloader, which would therefore make flashing a new firmware more straightforward.
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
giacobbi
Newbie
Newbie
Posts: 8
Joined: Sat Aug 02, 2008 6:12 am

Post by giacobbi » Wed Sep 10, 2008 11:44 pm

I too tried to install RT FW on a DG834 v2.

After some investigations I discovered the content of the MTD blocks:

mtd0 0x900d0000,0x903e0000 fs
mtd1 0x90020000,0x900d0000 krnl
mtd2 0x90000000,0x90020000 Adam2 (128k)
mtd3 0x903e0000,0x903f0000 config
mtd4 0x903f0000,0x90400000 env

The main difference between DG834 and other AR7 routers (i.e. D-Link DSL-524) is that usually mtd3 is split in 2 parts: the first 0x27ff bytes contain the ENV entries, and the remaining the config (bin or xml), while in DG834 mtd3 contains config in NETGEAR format (plain text), while mtd4 contains ENV entries (from the first byte).

To use Adam2 ftp I added my_ipaddress 192.168.1.1 to ENV using telnet
(you must before enable telnet with the todo=debug hack accessing web page).

Then I had no problem accessing Adam2 at boot time (BTW i patched Adam2 for bypassing checking CRC).

I first tried to upgrade to RT 2.60 with web update; of course the update was rejected (invalid image format).

Then I flashed the firmware with Adam2 ftp ; i flashed also a new mtd3 block with env+config.bin ---> bricked router.

I restored the original mtd0, mtd1, mtd3 blocks and the router resurrected.

Then I created a NETGEAR firmware image (it is a block of 0x3e0000 bytes containing mtd2,mtd1 and mdt0; at the end there must be a sort of signature and in the last 4bytes there must be a CRC (a word containing the sum of all the bytes from 0 to 0x3cfffb) and 0xffff.

With some wears and tears I succeded in creating a valid RT 2.60 image and I could perform a web update stating with the standard DG834 FW.

Then I flashed the mtd3 with env+config ; but alas! the router was bricked again.

IMHO Adam2 and the kernel must have the same definitions of MTD blocks; but I don't dare to flash a standard Adam2 bootloader (Oleg?), because in the case of unsuccess (highly probable), bricking should be definitive (no JTAG).

Besides I should flash Adam2 and Mtd3 in the same time, otherwise the bootloader couldn't find a valid ENV partition.

And I don't know which hardware is fully compatible with DG834 v2,( I think mandatory for Adam2 to work).

Any suggestions should be welcome.
mstombs
RouterTech Team
RouterTech Team
Posts: 3753
Joined: Wed Jan 10, 2007 11:54 pm

Post by mstombs » Thu Sep 11, 2008 1:35 am

Brave man!

I'm surprised a netgear firmware image includes mtd2 - is that a typo?

How did you make the test mtd3? The bootloader env is specific to your router - but PCTool and ftp will not flash the full mtd3, they protect the 10K bootloader env.
giacobbi
Newbie
Newbie
Posts: 8
Joined: Sat Aug 02, 2008 6:12 am

Post by giacobbi » Thu Sep 11, 2008 6:13 am

I'm surprised a netgear firmware image includes mtd2 - is that a typo?

I too was surprised; but if you download the standard firmware from NETGEAR site you'll get an .img file of nearly 4MB and in the first 128k there's Adam2 (it's equal to mtd2 block backed up from the router).

How did you make the test mtd3?

I backed up the DG834 mtd0,mtd1,mtd3 and mtd4 blocks via telnet : I started a mini web server on the router (mini_httpd -p 1080), I copied the blocks on a temporary folder (cat /dev/mtdblock/x > /tmp/mtdx.bin) and then I downloaded them on my Win2k PC using the Web browser.
I splitted mtd4 (that contained only env entries) in 2 parts , the first of 0x27ff bytes; I joined to the first part the config.bin of RT 2.60 and padded with ff obtaining a file of 64k. So I got a 'standard' mtd3 block.

but PCTool and ftp will not flash the full mtd3, they protect the 10K bootloader env.

That's true with standard Adam2;in fact I looked at Adam2 Oleg source and there's a 'hack' to change the start address of config data in mtd3 from 0 to 0x2800.
Netgear Adam2 ftp flashes the full mtd3 (IMHO because Netgear mtd3 contains only config data and is not splitted in 2 parts).
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12066
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Post by thechief » Thu Sep 11, 2008 10:02 am

You are very brave indeed. Do you have a serial console? You should be able to see why you get a brick, and that would make it easier to fix or work around.

I suspect that, if you have an mtd3 image from another wireless Adam2 router running RT 2.6 (e.g., DLink G604T), and you flash that instead of your own backed up mtd3, you may get further.
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
giacobbi
Newbie
Newbie
Posts: 8
Joined: Sat Aug 02, 2008 6:12 am

Post by giacobbi » Thu Sep 11, 2008 1:08 pm

You are very brave indeed.

Thanks!

Do you have a serial console?

Not yet. I wanted to build a serial cable after bricking a Dlink DSL-300T; but after some wears and tears I was able to resurrect it without a serial console.

Now for me is mandatory to build one, also because I nearly succeeded in installing RT 2.60 on a Netgear DG632: eveything works till I connect the ADSL cable; then the router acquires the dynamic IP address from ISP (I can see it in the status page), and, after a few seconds, the LAN led goes off and the router becomes a brick - till I power off-power on; a serial console would help a lot.

I suspect that, if you have an mtd3 image from another wireless Adam2 router running RT 2.6

I have a Dlink DSL-524T that is ready to be modded; if it works I'll follow your suggestion.
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12066
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Post by thechief » Thu Sep 11, 2008 1:45 pm

giacobbi wrote:Now for me is mandatory to build one, also because I nearly succeeded in installing RT 2.60 on a Netgear DG632: eveything works till I connect the ADSL cable; then the router acquires the dynamic IP address from ISP (I can see it in the status page), and, after a few seconds, the LAN led goes off and the router becomes a brick - till I power off-power on; a serial console would help a lot.
Yes, it will. I suspect that what happens is that, when the WAN connection is established, either the core logic (cm_logic), or one of the drivers crashes. I am not sure what would cause such a crash - but you may wish to turn off things like USB, sntp, ipaccount, etc., one by one (or even try different modulations) so to eliminate other things. However, a serial console is the best bet.
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
Post Reply