DIR-300 back to original firmware

Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Forum Index -> Atheros WiSOC based Hardware
Goto page Previous  1, 2, 3, 4  Next
Author Message
Silviu
DD-WRT Novice


Joined: 12 Dec 2008
Posts: 10

PostPosted: Wed Jan 28, 2009 13:54    Post subject: Reply with quote
Pls let us know how u did it Smile would be verry interesting Razz
Sponsor
derbaron
DD-WRT Novice


Joined: 29 Jan 2009
Posts: 1

PostPosted: Thu Jan 29, 2009 17:48    Post subject: tutorial Reply with quote
hey can you state how you restored the dir-300 ?

thanks!
Domino_55
DD-WRT User


Joined: 15 Sep 2008
Posts: 88

PostPosted: Sat Jan 31, 2009 11:45    Post subject: Reply with quote
IMPORTANT: ABSOLUTELY NO WARRANTY!!!, but these steps working for me on my three DIR-300.

So, the exact steps to restore the "really" original firmware is:


1. Get the correct image of the board config from here (posted). Thanks for fluffy@prog.ru.

2. Open the file with your favorite hex editor.
- Go to the 0x00000060 offset, and fill in your LAN & WLAN bridge MAC address. It's found on the sticker underneath your router.
- Go to the 0x00000066 offset, and fill in your WAN MAC address. You can get this, if you add +1 to the LAN & WLAN bridge MAC address.
- Go to the 0x0000204c offset, and fill in your pin code (the next 8 bytes, ASCII MODE, NOT HEX). It's found on the sticker underneath your router.
- Go to the 0x0000205c offset, and fill in your WAN MAC address (the next 17 bytes with colons, ASCII MODE, NOT HEX).
- Go to the 0x00002076 offset, and fill in your LAN & WLAN bridge MAC address (the next 17 bytes with colons, ASCII MODE, NOT HEX).
- Go to the 0x0000208f offset, and fill in your LAN & WLAN bridge MAC address (the next 17 bytes with colons, ASCII MODE, NOT HEX).
- Go to the 0x000020b6 offset, and fill in your country code for madwifi. (the next 3 bytes, ASCII MODE, NOT HEX).
Country codes follow the numbering scheme defined in ISO 3166, which can be found here (http://www.davros.org/misc/iso3166.html).
Important: strip leading zeros from country code values mentioned in the standard. Example: in the standard 056 is given as code for Belgium, so you use countrycode=56
If you are from a European country, you don't require to change the current (826) code. With code 826 you will give 13 wireless channels.
- Save the modified file.

3. Flash the original RedBoot and an original DIR-300 firmware. (http://www.shadowandy.net/2007/10/flashing-dir-300-back-to-original-firmware.htm)

4. Set your NIC address to 192.168.20.80/24

5. Enter to the original RedBoot via the WAN port. Original RedBoot's IP address is 192.168.20.81

6. Start a local TFTP server, and serve the previously edited board config file. (bfff0000-10000.bin)

7. Load the previously edited board config to the base memory: load -r -b %{FREEMEMLO} bfff0000-10000.bin

8. And do: fwrite -f 0xbfff0000 -b 0x80036400 -l 0x10000 -e 0x80036400 (-b and -e addresses are from the "load" command, and if it ask, update the non-volatile RedBoot configuration)

9. Fix the firmware entry and flash addresses and size with the following commands (always update the non-volatile RedBoot configuration):
These commands parameters are constant!

fconfig img_entry_addr 0x80040000
fconfig img_flash_addr 0xbfc20000
fconfig img_length 0x003c0000

10. Remove power from your router, and wait about 10 seconds, and power on.

11. Your system will boot up about 1-2 minutes.



The original flash layout is:

0x00000000-0x00030000 RedBoot (196 608 bytes)
0x00030000-0x003f0000 firmware image (3 932 160 bytes)
0x003f0000-0x00400000 board config (65 536 bytes)



Good luck,
Domino_55

P.S.: If you worked or not this howto, please report it in this topic. Thanks!
vit2142
DD-WRT Novice


Joined: 25 Dec 2008
Posts: 1

PostPosted: Sun Feb 01, 2009 12:01    Post subject: Reply with quote
It worked for me! MAC is same as on stiker and WPA fully functional now. Thanks for your tutorial, Domino_55.
wolfen
DD-WRT Novice


Joined: 07 Jan 2009
Posts: 10

PostPosted: Sun Feb 01, 2009 12:43    Post subject: Reply with quote
It's also working for me. But Domino_55 can you explain please this commands :
fconfig img_entry_addr 0x80040000
fconfig img_flash_addr 0xbfc20000
fconfig img_length 0x003c0000

Where did you get this addresses?
Domino_55
DD-WRT User


Joined: 15 Sep 2008
Posts: 88

PostPosted: Mon Feb 02, 2009 6:35    Post subject: Reply with quote
I create a full flash backup of a new DIR-300, and I research it.

Code:
fconfig img_entry_addr 0x80040000

This command describes the kernel start address in the memory. The memory start address is from 0x80000000. The 4 blocks of memory (0x40000) at the beginning stored the RedBoot, and the board config too, and padding.

Code:
fconfig img_flash_addr 0xbfc20000

This command describes the kernel start address in the flash memory. The start address is 0xbfc00000. But the first 2 blocks stored the RedBoot.

Code:
fconfig img_length 0x003c0000

This command describes the maximum size of the firmware. It's 3.932.160 bytes maximum.

Note: I seems to be, that the original RedBoot is enabled only 8 Mbytes of ram.
wolfen
DD-WRT Novice


Joined: 07 Jan 2009
Posts: 10

PostPosted: Mon Feb 02, 2009 8:57    Post subject: Reply with quote
Thank you Domino_55 for describing!
x007
DD-WRT Novice


Joined: 03 Feb 2009
Posts: 8

PostPosted: Tue Feb 03, 2009 17:47    Post subject: Reply with quote
Please help me what should I do ?
I'm Have DIR-300 with Orginal FW 1.03 im flashed to DD-WRT V24.Sp1. Im back with this turtial http://www.shadowandy.net/2007/10/flashing-dir-300-back-to-original-firmware.htm to orginal FW 1.04 and WPA/2 dont work. What do I do now?
I will give you any information about what you want the router WAN MAC Original, PIN , My Country
Create for me such a modified file *.bin :>
Domino_55
DD-WRT User


Joined: 15 Sep 2008
Posts: 88

PostPosted: Wed Feb 04, 2009 9:00    Post subject: Reply with quote
x007 wrote:
Please help me what should I do ?
I'm Have DIR-300 with Orginal FW 1.03 im flashed to DD-WRT V24.Sp1. Im back with this turtial http://www.shadowandy.net/2007/10/flashing-dir-300-back-to-original-firmware.htm to orginal FW 1.04 and WPA/2 dont work. What do I do now?
I will give you any information about what you want the router WAN MAC Original, PIN , My Country
Create for me such a modified file *.bin :>


Ok, i create a modified borad config file for you, but i need your MAC address and your pin code from underneath your router. And where are your from? Please PM these informations for me.
shadowandy
DD-WRT Novice


Joined: 23 Feb 2007
Posts: 11

PostPosted: Thu Feb 05, 2009 3:58    Post subject: Reply with quote
Not sure if this would help.

Generating DIR-300's board config
Domino_55
DD-WRT User


Joined: 15 Sep 2008
Posts: 88

PostPosted: Thu Feb 05, 2009 7:01    Post subject: Reply with quote
shadowandy wrote:
Not sure if this would help.

Generating DIR-300's board config


I think that's a little complicated. The really good solution is that anybody make a program with GUI (e.g. in Delphi) which can generate the board config from user datas (MAC, PIN, country code).
If I have a bit free time I make a program...
shadowandy
DD-WRT Novice


Joined: 23 Feb 2007
Posts: 11

PostPosted: Thu Feb 05, 2009 8:13    Post subject: Reply with quote
Domino_55 wrote:
shadowandy wrote:
Not sure if this would help.

Generating DIR-300's board config


I think that's a little complicated. The really good solution is that anybody make a program with GUI (e.g. in Delphi) which can generate the board config from user datas (MAC, PIN, country code).
If I have a bit free time I make a program...


Yeap that would be a great idea. Do provide GUI program that runs on window, mac and linux. Thanks!
Domino_55
DD-WRT User


Joined: 15 Sep 2008
Posts: 88

PostPosted: Fri Feb 06, 2009 8:02    Post subject: Reply with quote
shadowandy wrote:
Domino_55 wrote:
shadowandy wrote:
Not sure if this would help.

Generating DIR-300's board config


I think that's a little complicated. The really good solution is that anybody make a program with GUI (e.g. in Delphi) which can generate the board config from user datas (MAC, PIN, country code).
If I have a bit free time I make a program...


Yeap that would be a great idea. Do provide GUI program that runs on window, mac and linux. Thanks!


shadowandy, i look that you created a php script. So then i don't make a program, because your script is fully platform independent. Please send this script source for me, and please link this thread to your web page as the original of the fully firmware restoration.

Thanks!
x007
DD-WRT Novice


Joined: 03 Feb 2009
Posts: 8

PostPosted: Sat Feb 07, 2009 6:18    Post subject: Reply with quote
It has become im crash router !!!
I have access to RedBoot / DD-WRT but if you upload original Redboot come to Emergency Server. I do upload FW and wait 600s and write "Updating Su.....". Im reset router and wait and nothing happens light is only 1 LED power LED

If you try to upload DD-WRT it all goes according to the instructions until the command "fis create linux" then the router does not respond


What do I do now ?
Domino_55
DD-WRT User


Joined: 15 Sep 2008
Posts: 88

PostPosted: Sat Feb 07, 2009 8:24    Post subject: Reply with quote
x007 wrote:
It has become im crash router !!!
I have access to RedBoot / DD-WRT but if you upload original Redboot come to Emergency Server. I do upload FW and wait 600s and write "Updating Su.....". Im reset router and wait and nothing happens light is only 1 LED power LED

If you try to upload DD-WRT it all goes according to the instructions until the command "fis create linux" then the router does not respond


What do I do now ?


After 600s and reboot, the WAN led light up? (of course, if ethernet cable is connected)
Goto page Previous  1, 2, 3, 4  Next Display posts from previous:    Page 2 of 4
Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Forum Index -> Atheros WiSOC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum