OpenWrt Forum Archive

Topic: Netgear FVG318 Serial Connector - Trying to unbrick

The content of this topic has been archived on 20 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello everybody,

unfortunately I bricked my Netgear FVG318, because updating the Firmware somehow failed. Now I am trying to resurrect it, as it has an internal Serial Connector. I got the pin assignment from here and built a serial cable by just connection the following

PINS JP1 <-> Pins RS232
1 VCC <-> None
2 Rx <-> PIN3
3 Tx <-> PIN2
4 Gnd <-> PIN5

Now all I get when setting up Putty or HyperTerminal are cryptic characters. After some research I found that every homemade Serial cable to connect a router with the PC also had some IC on it, is this my problem? Or is my router ready for the trash?

Any help appreciated, the router is out of warranty anyways but I want to try to resurrect it first before throwing it away...

I made it to the serial console, it needed a max232 IC.

Still I cannot find a way to flash it...I pretty much followed this guide: http://www.embraceit.com.au/wgt624/

Yet some things differ on my router, I attached some console screenshots hoping someone can help me...

http://img196.imageshack.us/img196/9152/output1.th.jpg
http://img196.imageshack.us/img196/7049/output2.th.jpg
http://img34.imageshack.us/img34/9089/output3.th.jpg
http://img17.imageshack.us/img17/4791/output4.th.jpg

Well I got it, I just need an .elf Image of some Firmware that boots. Orignal Firmware in .bin won't, and the .elf linked on the website gives an CPU Access Error when booting... *sigh*

I got the thing unbricked. If you can get to the serial terminal interface to the bootloader, you are almost there. I basically followed directions for others to simply setup the tftp server on an xp box doing like nothing to configure other than turning off firewall and pointing at directory with the bin files from netgear. The trick was that the .bin files from netgear are not elf format required and give an error message, so I looked at an OpenWRT elf file I found on this site somewhere and noticed their was just a little bit of invalid header bytes before the text ELF. Using notepad++, I simply opened the netgear .bin file and chopped off what appeared before it, then using the serial connection commands, set the boot flags to boot from tftp after setting the ip of the device and the remote boot address.  I took a chance and it worked fine and was able to then use web loader to boot other versions. the v49 got owned in a day, moved back to v48 and it seemed to last.   It is doable. I wish that tip was out there when I tried or I wouldn't have wasted hours. I could do it now in about ten minutes.  I think I might have started with bootflag of 132 or 160, I forget now...I had several options set, and not autoload at first. After doing it a few times and playing with the factory reset button after it loaded, eventually, I was able to get it to boot normally.  I don't think I put any path for the filename, just matched what I had for a filename in the directory pointed at by tftp server.

oh, and after you're done, you have to set the options back to normal, so it would be wise to write that down before you go changing them, it took too many hours of trial and error and guesswork from memory and other netgear examples trying this and that...so before editing, save the settings with a simple copy from the terminal...  yah, I know this is old, but I kept that brick around for 7 years and finally ordered the $5 USB to TTL cable from Amazon out of some shop in NYC which there was a driver out there that worked perfectly... oh, and pin 1 was the one with the square block, the listing here was correct once you know that... and I noticed the usb was enough for power too, didn't even plug in the cord and it ran fine while fiddling

oh, and the baud is 9600...  if you're getting cryptic chars, the other settings were default? no, no and whatever the default was...sorry, I should have kept better notes...  this old hardware is still useful if you put it behind a pfsense or untangle box...so I can have safer wireless for my tv

next question:  anyone know how to fix the elf image for OpenWRT? it appears to have something to do with the file layout ... looks fixable...  when trying to boot that, it doesn't find the file system and you get kernal panic... which was why I just put it all back to netgear firmware...

I should be more clear on how to edit the bin file from netgear to get it to elf... If I recall correctly, there was one unknown byte char in front of three letters ELF where I simply moved the cursor and deleted to the start of line and hit save as and changed the file extension to .elf.  To be sure, find the elf file that OpenWRT has and open them both side by side with notepad++. I assume the display of a square is just something for unknown chars display and that notepad doesn't mangle the byte when saving. Hey, it was a brick before and once you get it setup to boot from tftp you can watch the errors in the serial terminal when trying to boot the OpenWRT atheros elf... I really would like to get OpenWRT to boot on it, but so far just the netgear .bin edited into .elf...    Oh yah, I think one of the boot options I needed was to disable security because the default admin password didn't work and couldn't recall what it was set to...  fiddle around, its totally doable

I finally got around to try your tips and I get it to boot. I see this in the terminal:

[Boot]: p

boot device          : ae
unit number          : 0
processor number     : 0
file name            : fw2.elf
inet on ethernet (e) : 192.168.1.20:0xffffff00
host inet (h)        : 192.168.1.100
flags (f)            : 0xa4
other (o)            : ae

[Boot]: @
Attached TCP/IP interface to ae0.
Attaching network interface lo0... done.
Loading... 2693568
Starting at 0x806846e0...

WARNING: bootrom did not start the watchdog.
/fl/  - Volume is OK
Reading Configuration File "/fl/apcfg".
Configuration file checksum: 4c8b6 is good
in ae531xMacAddressGet, MACInfo->unit is 0
disable vlan
muxDevLoad failed for index 2
muxDevLoad failed for index 3
Attached TCP/IP interface to ae unit 0
Attaching interface lo0...done
Error setting inet address of ae0 to 192.168.1.20, errno = 0x11
Ready

iGateway Initialization Started
setbootline
Error in IAPLstFtpLoad
Error in extnat add record 30467
WanMakeConnectionEx :: Wan Connection Type is: 2
WanMakeConnectionEx :: Wan Connection Type is: 2
WanMakeConnectionEx :: Wan Connection Type is: 2
WanMakeConnectionEx :: Wan Connection Type is: 2
Netgear modules configuration loaded


*******************************************

       FVG318 Image version 1.0.48
BSP version: NEW 2.4
create time: 09:26:00, Jul. 13th, 2007


*******************************************

But thats about it I don't know how to proceed from there. Any hints?

I think I got it after 3 hours of fiddling. I didn' t remember the original boot parameters? Can you post yours?

Another hours gone by and I unbricked my old FVG318v1. This thread and this page http://www.embraceit.com.au/wgt624/ hold all the information you need. The ethernet interface is called ae0 on this router.

I failed the last hour because I didn't realize that once the unit started it had 192.168.0.1 as IP address and not 192.168.1.1. D'oh!

The discussion might have continued from here.