Modify

Opened 9 years ago

Last modified 2 years ago

#2897 new enhancement

add Netgear support to upslug2

Reported by: matteo Owned by: developers
Priority: normal Milestone: Features Paradise
Component: other Version:
Keywords: Cc:

Description

Netgear DG834Gv3 is an AR7 with tftp server disabled.
Altought the firmware can be uploaded powering the unit while pressing the reset button.
While doing so the serial shows:

ADAM2 Revision 0.22.02
(C) Copyright 1996-2003 Texas Instruments Inc. All Rights Reserved.
(C) Copyright 2003 Telogy Networks, Inc.
memsize == 0x01000000Usage: setmfreq [-d] [-s sys_freq, in MHz] [cpu_freq, in MHz]
maca                  00:1b:2f:71:5a:72
macb                  00:1b:2f:71:5a:73
memsize               0x01000000
flashsize             0x00400000
modetty0              115200,n,8,1,hw
modetty1              115200,n,8,1,hw
bootserport           tty0
cpufrequency          211968000
sysfrequency          105984000
bootloaderVersion     0.22.02
ProductID             DG834
HWRevision            Unknown
SerialNumber          none
my_ipaddress          192.168.0.1
prompt                DG834
firstfreeaddress      0x9401bd20
req_fullrate_freq     125000000
mtd0                  0x900d0000,0x903e0000
mtd1                  0x90020000,0x900d0000
mtd2                  0x90000000,0x90020000
mtd3                  0x903e0000,0x903f0000
mtd4                  0x903f0000,0x90400000
oam_lb_timeout        100
mtd5                  0x90020000,0x903e0000
DSL_FEATURE_CNTL_1    0x00000020
Download.
Copying download from b0017000 to b4020000
psys_printf=90005bd0

and the router starts to accept a firmware image with a raw ethernet frame protocol, which is the same used by uplsug2.
I have an initial patch to add DG834G support, but the ondisk image fil format is a bit different, because while tryng to update i have:

$ sudo upslug2 -d eth1 -i DG834V3_V4.01.30.img
NSLU2     00:1b:2f:71:5a:72 Product ID: 0 Protocol ID: 0 Firmware Version: R41V1E [0x411E]
DG834V3_V4.01.30.img: failed while reading data from file: fatal error [std::exception]

Should we consider patching uplsug2 or write a new tool for netgears?
I started one before discovering the upslug2 existence: http://forum.openwrt.org/viewtopic.php?id=13861

Attachments (3)

dg834g.diff (1.7 KB) - added by matteo 9 years ago.
added vendor ID to upslug2
nftp.c (3.7 KB) - added by matteo 9 years ago.
tool to upload firmware to the DG834 (just a stub at the moment)
nftp.2.c (9.0 KB) - added by wilmer 8 years ago.
Improved version of nftp.c, works with at least v4 routers.

Download all attachments as: .zip

Change History (8)

Changed 9 years ago by matteo

added vendor ID to upslug2

Changed 9 years ago by matteo

tool to upload firmware to the DG834 (just a stub at the moment)

comment:1 Changed 8 years ago by blogic

  • Milestone set to Kamikaze Features Paradize

Changed 8 years ago by wilmer

Improved version of nftp.c, works with at least v4 routers.

comment:2 Changed 8 years ago by wilmer

I gave up on trying to understand upslug2, IMHO it tries to do too much which made it hard for me to figure out how to make it work with my DG834v4.

So instead I enhanced nftp.c to actually do uploads and verifies. It works with at least my router, I tried to add some verification to see if the image and the router will be compatible. Since I have no idea how this should be done officially I just guessed. Some creativity may be required to make it work with a different router.

Use at your own risk, but I hope it'll be useful for someone some day. :-)

comment:3 Changed 5 years ago by adam

Thank you wilmer - a godsend for an emergency midnight rescue!
I used this with the latest firmware for the DG834Gv4: DG834Gv4_V5.01.16.img and after commenting out the verification check for the magic header (a risky strategy, I know...) it worked perfectly.
Run in an Ubuntu virtual machine on an OSX host.

comment:4 Changed 4 years ago by anonymous

This has really helped me, thanks guys.
My internet was slow and I was told it might be because I was running an old firmware version on my DG834G version 1. I downloaded and went through the normal netgear browser update and it bricked, flashing power and test, orange and green! After trying to use netgear's recovery utility which doesn't work on windows 7 on a netbook I arrived here. I am not really a linux bod and have never compiled a piece of software and run it.. but. after following the instructions here.
http://wiki.openwrt.org/toh/netgear/dg834.g/b
in particular
"Also there is a small utility nftp.2.c that is able to reflash and verify the router."
it worked.
For any other newbies to linux put all your files in a folder easily accessible, ie the desktop and use the cd command in terminal to navigate there.
I did have to delete the "return 1" in a line about "Magic header?" as I remember in nftp.2.c but after a re-compile under gcc it worked. Then a reboot of the modem. I didn't even have to re-enter any login or configuration. So thanks again.
Has saved me buying a new modem and probable calls to my ISP.
Thanks to matteo, wilmer and rootkit?
cheers Simon

comment:5 Changed 2 years ago by philcolbourn

nftp2 does not work for me. I have a DG834(v1).

nftp works after bypassing sanity check.

It is also fantastic for installing OpenWRT: append ADAM2 image with OpenWRT image, pad result to multiple of 1024 bytes and flash router using modified nftp.

Everything can be explicitly scripted (ie. documented) which is far better.

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.