OpenWrt Forum Archive

Topic: Netgear DGN3500

The content of this topic has been archived between 8 Feb 2018 and 7 May 2018. Unfortunately there are posts – most likely complete pages – missing.

Just pulled the latest revision, but i still couldn't find this patch in the trunk.

Before doing first make menuconfig, create a .config file:

CONFIG_TARGET_lantiq=y
CONFIG_TARGET_lantiq_xway=y
CONFIG_TARGET_lantiq_xway_DGN3500=y

Aaaahhh, that's what I've been missing... I could not for the life of me find the DGN3500 stuff in make menu config. But that's because my target wasn't lantiq, it was ar7xxxx Thank You!

Hey there ixproz,

Just got back from walking the dogs and fund the wifi patch wouldn't apply cleanly, and broker the build. *sigh*

So the patch I thought was in the tree already was a different patch, by the same author around the same time. When I followed the link in your previous post, I found a thread with two patches. The first (earlier) patch, was a patch to change a patch already in the tree. Ouch! The second patch (the one you linked to directly) works against a file that isn't in the tree until the in tree patch is applied. Did you just create a randomly named patch file in  target/linux/lantiq/patches-3.10 containing the patch you linked too, or did you manage to apply both patches in the thread manually?

Thanks

I'd suggest patching target/linux/lantiq/patches-3.10/0010-MIPS-lantiq-wifi-and-ethernet-eeprom-handling.patch manually as in daniel's first post. Here's a link to my version, it's based on revision 39395.

I don't suppose you could post a link to your .config too could you? Just in case I missed something... big_smile I'd prefer not to brick the router, since I don't have a serial cable handy.

Here's the link to my config. Use it at your own risk wink Both, ramdisk and squashfs image will be built with this config, make sure you use squashfs image. There's a sercomm recovery cd for Windows XP if you brick the device, send me an email if you need it.

And for any others struggling out there, here's the step-by-step guide.

I did this inside a Debian VM, built and installed according to these instructions. I tried initially on my gentoo box, but the build failed because the library paths are different, or something.

In your home directory (or anywhere else you choose I suppose)

$ mkdir DGN3500
$ cd DGN3500
$ wget https://www.dropbox.com/s/9qr7gac9su9m2dn/OpenWRT-Netgear-DGN3500-patches.tar.bz2
$ tar xjf OpenWRT-Netgear-DGN3500-patches.tar.bz2
$ git clone git://git.openwrt.org/openwrt.git
$ git checkout e24fee10022bd73976d416d7b06b7fbeaa36c9a5 #svn revision 39969
$ cd openwrt
$ ./scripts/feeds update -a
$ ./scripts/feeds install -a
$ cp ../0010-MIPS-lantiq-wifi-and-ethernet-eeprom-handling.patch target/linux/lantiq/patches-3.10
$ patch -p1 ../dgn3500-factory-final-v3.patch 
$ cp ../dgn3500.config .config
$ make oldconfig
$ make V=s

Your OEM flashable image will be in openwrt/bin/lantiq and will be named either

openwrt-lantiq-xway-DGN3500-squashfs-factory-NA.img (For North American Routers)

OR

openwrt-lantiq-xway-DGN3500-squashfs-factory-WW.img (For Everyone Else)

You should be able to head on over to your DGN3500's admin interface, and choose router upgrade. Make sure you're connected by cable, and choose browse, and select your .img file.

N.B. The config in the file is the way I set it up with a bunch of stuff I want to use. You may want to modify it, in which case, replace the "make oldconfig" with "make menuconfig". If you do this, you should know the following

1. The Target System is "Lantiq (GPON/XWAY/SVIP)"
2. The Subtarget is "XWAY"
3. The Target Profile is "Netgear DGN3500" (obviously)
4. Under Target Images, only enable squashfs
5. You don't need to select "Build the OpenWrt Image Builder", "Build the OpenWrt SDK",  or "Build the OpenWrt based Toolchain"
6. The ethernet switch in the router is a Realtek RTL8366RB, so under "Kernel Modules/Network Devices" select kmod-switch-rtl8366rb
7. The right stuff for the ADSL modem and the wifi seem to have been selected automatically when the target profile was set

Also, I haven't yet tested this image on my actual router. I'm posting posting these instructions so others can get the factory image to build at all. I'll post back here once I've confirmed the image is working on my router.

Woohoo, that wasn't so hard now, was it?

Thanks for this guide! One more point:
8. For USB Storage Devices, select USB kernel modules and filesystems you need.

Thank you! I wouldn't have got anywhere without your help.

BTW: I've merged your and my config files. I see you use rt8129? (or similar, can't remember off hand). Is that for ethernet? I thought the chip was RTL8366RB?

yes, you dont need rt8192, i needed it for an edimax ew-7811 usb stick.

Okay, image built, but it's 1am... I'm not going to try and flash it now... Rather leave that for after to tea tomorrow morning

Ix nay on the nstallay sad So I tried OEM flashing both the WW and the NA images on my netgear, but both times it complained that the file 'didn't match'; presumably meaning it's still failing the checksum. I'm not sure what to do next.

Did you build it on a fresh, clean tree?

Yup. Clean tree, apart from the patches being applied of course. I did notice though that dgn3500sum.c doesn't seem to get compiled, so maybe I need to run that on the output image manually?

I just tried running dgn3500sum on the factory image, with offset 0x50000 and pid WW

$ ./dgn3500sum openwrt-lantiq-xway-DGN3500-squashfs-factory-WW.img 0x50000 WW
/home/sirlark/dgn3500sum: PID type: WW

But the resulting image, 78 bytes larger, also fails OEM flashing. Maybe I need a different offset, although 0x50000 seems like a likely number based on anytara12's recommendations and the flash layout, becasue 0x50000 lines up nicely with the beginning of the 6th layer 3 'partition', i.e. the kernel partition. Also, the first 0x50000 bytes of factory image are zeros.

Next step, ignore the previous step. I modified dgn3500sum.c the write out a file to /tmp just to confirm that it was being used (and not crashing, because when I tried running it the first time, it segfaulted) during the build. It is being run, the message file appeared in /tmp, so the images generated should supposedly have the correct checksums embedded in them.

Can anyone give working image WW? Thank you.

(Last edited by optimus25 on 10 Apr 2014, 09:33)

I managed to build the images with the patch last night, based on the rev 40604 (https://pbs.twimg.com/media/BmiD0y_CIAIwRu-.png:large )
BUT, i can't promise it will work as i "bricked" (corrupted) the firmware at the first try, and on the amod firmware.
It worked on the web recovery mode though (using the net uboot command or if the firmware is corrupted, go to 192.168.1.1)

Here are the images (NA and WW) http://zlock.eu/openwrt/

obviously, this comes without any warranty, and get a serial cable next to it, in case of wink

prototux wrote:

BUT, i can't promise it will work as i "bricked" (corrupted) the firmware at the first try, and on the amod firmware.
It worked on the web recovery mode though (using the net uboot command or if the firmware is corrupted, go to 192.168.1.1)
...
obviously, this comes without any warranty, and get a serial cable next to it, in case of wink

No, it doesn't work. Tried it on a brand new DGN3500 through Netgear's firmware upgrade.
Now I'll have to find a star-shaped driver bit and a serial cable wink

Weird..
After flashing this  firmware build:  No network connection anymore.
But serial console shows openwrt starting, and br-lan is up with 192.168.1.1
Hmm?!

formfeed wrote:

No, it doesn't work. Tried it on a brand new DGN3500 through Netgear's firmware upgrade.
Now I'll have to find a star-shaped driver bit and a serial cable wink

I flashed this image on a amod firmware (i've installed it before), that's why i can't test on stock netgear firmware.
What error the upgrade system said?

formfeed wrote:

Weird..
After flashing this  firmware build:  No network connection anymore.
But serial console shows openwrt starting, and br-lan is up with 192.168.1.1
Hmm?!

In the wiki, they said at the first start you have to go to 192.168.1.1 in telnet to set the root password, then go with ssh.
(i did this part with a laptop on wifi, you can do it on the console too, just press enter after boot). (you maybe need a fixed IP, i can't remember if DHCP worked at that point or not, sorry sad )

I still have some problems (but i think it's my configuration that need to be fixed somewhere), i managed to got ipv6, but somehow wifi clients doesn't seems to have any external ipv4 until they wait for ~30mn (even they have an LAN ipv4 and on ipv6 both LAN and external works), and the ethernet switch seems to be working (i have internet via eth) but seems to have some isolation mode activated (i have my own servers on my LAN, but i can't reach them via eth, only via wifi).

(Last edited by prototux on 4 May 2014, 08:07)

prototux wrote:

... you have to go to 192.168.1.1 in telnet to set the root password ...


Yes, Haven't quite figured out yet what the problem is: No route to host.  Using the same cable and point to point link I used when it still was on 192.168.0.1.  Serial console shows br-lan up on 192.168.1.1. Wifi shows up as OpenWrt as well, but no connection. I will have to look at it again when I have more time ..

formfeed wrote:
prototux wrote:

... you have to go to 192.168.1.1 in telnet to set the root password ...


Yes, Haven't quite figured out yet what the problem is: No route to host.  Using the same cable and point to point link I used when it still was on 192.168.0.1.  Serial console shows br-lan up on 192.168.1.1. Wifi shows up as OpenWrt as well, but no connection. I will have to look at it again when I have more time ..

Maybe that's the rtl8366rb switch that's is buggy on this router (i have problems as it's impossible to talk with other LAN devices when they are on other ethernet ports (even they are in the same vlan), maybe that's my config, maybe that's the driver, i don't know yet), did you tried over wifi? try using a static ip over wifi, that's how it worked for me.

I watch the SVN trunk as blogic said about a month ago that he's reviewing the factory upgrade patch (even for both of us it's useless now...) and for the various lantiq fixes, they seem to work seriously on this one so... when i see some patches about my issues i'll re-compile and post the new images smile

Hi Prototux,
you are right, I've just tried to flash the image, it seems run well but I can't access via ethernet cable.
Just for your info I can connect to the router via wifi, it give me the address with dhcp, I can ping it and connect via telnet to the address 192.168.1.1:)
About you, why I can't connect to 192.168.1.1 via http (luci interface)?
Thanks
Stefano

stepini wrote:

Hi Prototux,
you are right, I've just tried to flash the image, it seems run well but I can't access via ethernet cable.
Just for your info I can connect to the router via wifi, it give me the address with dhcp, I can ping it and connect via telnet to the address 192.168.1.1:)
About you, why I can't connect to 192.168.1.1 via http (luci interface)?
Thanks
Stefano

Because LuCi isn't in the image (even i selected it, i don't know why...), so you have to install it via opkg when you have SSH access (eg. when you changed the root password via telnet wink )

For the switch/ethernet problem, i still wait to see a major patch about it before trying anything, as the DGN3500 i use is the one for my workplace, so i don't want to brick it smile

Sorry, posts 51 to 50 are missing from our archive.