D-Link DIR-300 rev A

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 19:04, 29 July 2009 (edit)
Sash (Talk | contribs)
(v24_SP1 Specific)
← Previous diff
Current revision (15:50, 17 May 2023) (edit) (undo)
Kernel-panic69 (Talk | contribs)

 
(43 intermediate revisions not shown.)
Line 1: Line 1:
-[[Category:English documentation]]+{{Languages|D-Link DIR-300 rev A}}
- +'''NOTE: D-Link DIR-300 Rev.A = Airlink101 AR430W = Airlink101 AR335W'''<br><br>
-= '''Airlink101 AR430W'''<br><br>+
__TOC__ __TOC__
Line 7: Line 6:
=Initial flashing instruction= =Initial flashing instruction=
-Windows flashing instruction for the D-Link DIR-300 to DD-WRT (by Brainslayer, modified by Sash, v24_SP1 specific added by Deepak)<br>+'''WARNING: Procedure below is valid only for DIR-300 Revision A. Please check carefully the revision level of your D-Link before flashing'''
 + 
 +'''WARNING: Don't use Builds 21676 - 23503 as it has a restart loop.'''
 + 
 +'''NOTE: Initial flash files can be found [https://download1.dd-wrt.com/dd-wrtv2/downloads/v24-sp1/Consumer/Dlink/DIR-300/ here]
 + 
 +See [[Index:FAQ#Where_do_I_download_firmware.3F|Where do I download firmware?]] for links to files to upgrade firmware.
 + 
 +Windows flashing instruction for the D-Link DIR-300 to DD-WRT (by Brainslayer, modified by Sash, v24_SP1 specific added by Deepak)
 +==Install RedBoot==
configure your local ip to 192.168.20.80 configure your local ip to 192.168.20.80
connect your lan cable to the WAN port of the router. connect your lan cable to the WAN port of the router.
-plugoff the power cord and replug it.+plugoff the power cord and replug it. You must press the RESET key for 5 sec.
now enter the redboot using telnet and ip 192.168.20.81 and port 9000. connect your lan cable to the dir300 wan port. now enter the redboot using telnet and ip 192.168.20.81 and port 9000. connect your lan cable to the dir300 wan port.
you might need several tries since its only available for 1 second after aprox. 5 sec. of booting you might need several tries since its only available for 1 second after aprox. 5 sec. of booting
-(in the appendix is a windows instruction for easy connecting to redboot)<br>+(below is a Windows & Linux access script for an easy way to connect to redboot)<br>
 +When you succeed you will be rewarded with a RedBoot> prompt.
<br> <br>
DIR-300 Info:<br> DIR-300 Info:<br>
Line 25: Line 34:
load ap61.ram load ap61.ram
go go
-now a new temporarily bootloader should start. (on serial console it will display some warning. but you dont need to care about)+now a new temporarily bootloader should start. (on serial console it will display some warning. but you dont need to care about). It will be waiting for connection at the LAN side of the router, so follow the instructions that follow.
-plug your lan cable to the lan port of the dir-300.+Plug off your cable from the wan port and reconfigure your local (computer) ip to 192.168.1.2 (set your DHCP server to serve 192.168.1.1 as the only address in the DHCP pool and the TFTP must also be available at 192.168.1.2). Now you should be pluging on to any of the lan ports. Then connect via telnet to 192.168.1.1 (or to the ip your dhcp server served to the redboot) and port 9000. A DD-WRT> prompt should welcome you.
-reconfigure your ip to 192.168.1.2 and connect via telnet to 192.168.1.1 (or to the ip your dhcp server served to the redboot) and port 9000.+
<br> <br>
-important: while doing the following steps. never plugoff the lan cable or the power cord<br>+IMPORTANT: while doing the following steps. never plugoff the lan cable or the power cord<br>
'''fis init''' '''fis init'''
About to initialize [format] FLASH image system - continue (y/n)? y About to initialize [format] FLASH image system - continue (y/n)? y
Line 35: Line 43:
... Erase from 0xbffe0000-0xbfff0000: . ... Erase from 0xbffe0000-0xbfff0000: .
... Program from 0x807f0000-0x80800000 at 0xbffe0000: . ... Program from 0x807f0000-0x80800000 at 0xbffe0000: .
 +
'''ip_address -h 192.168.1.2''' '''ip_address -h 192.168.1.2'''
IP: 192.168.1.1/255.255.255.0, Gateway: 0.0.0.0 IP: 192.168.1.1/255.255.255.0, Gateway: 0.0.0.0
Default server: 192.168.1.2 Default server: 192.168.1.2
- '''fis init'''+
'''load -r -b %{FREEMEMLO} ap61.rom''' '''load -r -b %{FREEMEMLO} ap61.rom'''
Using default protocol (TFTP) Using default protocol (TFTP)
Raw file loaded 0x80080000-0x800a8717, assumed entry at 0x80080000 Raw file loaded 0x80080000-0x800a8717, assumed entry at 0x80080000
 +
'''fis create -l 0x30000 -e 0xbfc00000 RedBoot''' '''fis create -l 0x30000 -e 0xbfc00000 RedBoot'''
An image named 'RedBoot' exists - continue (y/n)? y An image named 'RedBoot' exists - continue (y/n)? y
Line 48: Line 58:
... Erase from 0xbffe0000-0xbfff0000: . ... Erase from 0xbffe0000-0xbfff0000: .
... Program from 0x807f0000-0x80800000 at 0xbffe0000: . ... Program from 0x807f0000-0x80800000 at 0xbffe0000: .
 +
'''reset''' '''reset'''
now the unit will reboot and the new bootloader will be executed and is waiting for your connection. now the unit will reboot and the new bootloader will be executed and is waiting for your connection.
-this wil take 30+ sec.+this will take 30+ sec.
 + 
 +==Install DD-WRT==
 + 
The following will work for the '''initial flash''' AND a '''recovery''' The following will work for the '''initial flash''' AND a '''recovery'''
-connect to the bootloader with telnet on port 9000 and ip 192.168.1.1<br>+connect to the bootloader with telnet on port 9000 and ip 192.168.1.1 (If you have installed [[Micro_Redboot]] read the wiki page about it first)<br>
-now do the following: (consider that fis create operations are taking sometimes several minutes to finish)<br> 
-'''If you are using v24_SP1, skip this and see the instruction below'''+now do the following (consider that fis create operations are taking sometimes *several* minutes to finish, in my particular case it took more than 5 minutes):
fis init fis init
Line 64: Line 77:
fis create linux fis create linux
fconfig boot_script true fconfig boot_script true
- fconfig boot_script_timeout 4+ fconfig boot_script_timeout 5
-now type fconfig again and configure the bootscript to:<br>+now type '''fconfig''' again and configure the bootscript to:<br>
fis load -l linux fis load -l linux
exec exec
-now type reset again. the unit should now boot dd-wrt and work as known from other atheros based platforms+and press enter for every other option to confirm the defaults.
 + 
 +Now type '''reset''' again. The unit should now boot dd-wrt and work as known from other atheros based platforms
You are done now. Wait for your router to reboot. It will take about 1-2 minutes. It may blink and reset once or twice (as noted). <br> You are done now. Wait for your router to reboot. It will take about 1-2 minutes. It may blink and reset once or twice (as noted). <br>
-Now open Internet Explorer and connect to address 192.168.1.1 you should be able to see the dd-wrt page.+Now open a Browser and connect to address 192.168.1.1 you should be able to see the dd-wrt page.
That's All That's All
-=Recovery and Upgrade=+==Recovery and Upgrade==
connect to the bootloader with telnet on port 9000 and ip 192.168.1.1 connect to the bootloader with telnet on port 9000 and ip 192.168.1.1
do the following: (consider that fis create operations are taking sometimes several minutes to finish) do the following: (consider that fis create operations are taking sometimes several minutes to finish)
- fis init+ fis init -f
now load the latest linux.bin from your tftp-server: now load the latest linux.bin from your tftp-server:
 + ip_address -h 192.168.1.2
load -r -b 0x80041000 linux.bin load -r -b 0x80041000 linux.bin
fis create linux fis create linux
Line 89: Line 105:
==Redboot access script for Windows== ==Redboot access script for Windows==
-download putty.exe to c:\<br>+Make a folder and download putty.exe to it<br>
-create a file on c:\ called redboot.txt, with the following content:<br>+create a file in the same folder called redboot.txt, with the following content:<br>
^C ^C
-create a file on c:\ called redboot.bat with the following content:<br>+create a file in the same folder called redboot.bat with the following content:<br>
rem echo off rem echo off
Line 112: Line 128:
==Redboot access script for Linux== ==Redboot access script for Linux==
 +===Putty===
 +download putty.exe to c:\
 +create a file called redboot.txt, with the following content:
 +
 + ^C
 +
 +create a file called redboot in the same folder with the following content:
#!/bin/bash #!/bin/bash
Line 120: Line 143:
while true while true
do do
- if eval "ping -c 1 -s 1 $host" > /dev/null; then + if eval "ping -c 1 $host" > /dev/null; then
- echo "Router Awake"+ putty telnet://$host 9000 -m redboot.txt
- putty telnet://$host 9000 -m redboot.txt+ echo "Router Awake"
break break
else else
echo "Waiting for Redboot to boot. Press CTRL + C to quit" echo "Waiting for Redboot to boot. Press CTRL + C to quit"
- sleep 1+ sleep 1
fi fi
done done
 +Make the file executable.
 +
 +===Telnet===
 +If you don't want to install putty for linux, you may use standard telnet and arping.
 +It would be so (replace eth2 by your ethernet card name):
 +
 + #!/bin/sh
 + echo "192.168.20.81 send ip" >> ~/.telnetrc
 + arping -f 192.168.20.81 -I eth2; telnet 192.168.20.81 9000
 +
 +=Flashing back to stock firmware=
 +*https://www.shadowandy.net/2007/10/flashing-dir-300-back-to-original-firmware.htm
=Hardware= =Hardware=
==Serial port== ==Serial port==
 +<br>3.3V TTL
 +<br>8,n,1,9600
 +
[[Image:Dir300-serial.jpg]] [[Image:Dir300-serial.jpg]]
 +
 +=Overclocking=
 +To overclock your router, see http://www.dd-wrt.com/phpBB2/viewtopic.php?t=30305
 +
 +=Links=
 +https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=330022
 +
 +[[Category:D-Link guides]]

Current revision

NOTE: D-Link DIR-300 Rev.A = Airlink101 AR430W = Airlink101 AR335W

Contents


[edit] Initial flashing instruction

WARNING: Procedure below is valid only for DIR-300 Revision A. Please check carefully the revision level of your D-Link before flashing

WARNING: Don't use Builds 21676 - 23503 as it has a restart loop.

NOTE: Initial flash files can be found here

See Where do I download firmware? for links to files to upgrade firmware.

Windows flashing instruction for the D-Link DIR-300 to DD-WRT (by Brainslayer, modified by Sash, v24_SP1 specific added by Deepak)

[edit] Install RedBoot

configure your local ip to 192.168.20.80 connect your lan cable to the WAN port of the router. plugoff the power cord and replug it. You must press the RESET key for 5 sec. now enter the redboot using telnet and ip 192.168.20.81 and port 9000. connect your lan cable to the dir300 wan port. you might need several tries since its only available for 1 second after aprox. 5 sec. of booting (below is a Windows & Linux access script for an easy way to connect to redboot)
When you succeed you will be rewarded with a RedBoot> prompt.
DIR-300 Info:
IP: 192.168.20.81/255.255.255.0, Gateway: 0.0.0.0
Default server: 192.168.20.80

now start a local tftp server on your computer and place ap61.ram as well as ap61.rom in the root dir of this server
back to the redboot enter:

load ap61.ram
go

now a new temporarily bootloader should start. (on serial console it will display some warning. but you dont need to care about). It will be waiting for connection at the LAN side of the router, so follow the instructions that follow. Plug off your cable from the wan port and reconfigure your local (computer) ip to 192.168.1.2 (set your DHCP server to serve 192.168.1.1 as the only address in the DHCP pool and the TFTP must also be available at 192.168.1.2). Now you should be pluging on to any of the lan ports. Then connect via telnet to 192.168.1.1 (or to the ip your dhcp server served to the redboot) and port 9000. A DD-WRT> prompt should welcome you.
IMPORTANT: while doing the following steps. never plugoff the lan cable or the power cord

fis init
About to initialize [format] FLASH image system - continue (y/n)? y
*** Initialize FLASH Image System
... Erase from 0xbffe0000-0xbfff0000: .
... Program from 0x807f0000-0x80800000 at 0xbffe0000: .

ip_address -h 192.168.1.2
IP: 192.168.1.1/255.255.255.0, Gateway: 0.0.0.0
Default server: 192.168.1.2

load -r -b %{FREEMEMLO} ap61.rom
Using default protocol (TFTP)
Raw file loaded 0x80080000-0x800a8717, assumed entry at 0x80080000

fis create -l 0x30000 -e 0xbfc00000 RedBoot
An image named 'RedBoot' exists - continue (y/n)? y
... Erase from 0xbfc00000-0xbfc30000: ...
... Program from 0x80080000-0x800a8718 at 0xbfc00000: ...
... Erase from 0xbffe0000-0xbfff0000: .
... Program from 0x807f0000-0x80800000 at 0xbffe0000: .

reset

now the unit will reboot and the new bootloader will be executed and is waiting for your connection. this will take 30+ sec.

[edit] Install DD-WRT

The following will work for the initial flash AND a recovery

connect to the bootloader with telnet on port 9000 and ip 192.168.1.1 (If you have installed Micro_Redboot read the wiki page about it first)


now do the following (consider that fis create operations are taking sometimes *several* minutes to finish, in my particular case it took more than 5 minutes):

fis init
ip_address -h 192.168.1.2 
load -r -b 0x80041000 linux.bin
fis create linux
fconfig boot_script true
fconfig boot_script_timeout 5

now type fconfig again and configure the bootscript to:

fis load -l linux
exec

and press enter for every other option to confirm the defaults.

Now type reset again. The unit should now boot dd-wrt and work as known from other atheros based platforms

You are done now. Wait for your router to reboot. It will take about 1-2 minutes. It may blink and reset once or twice (as noted).
Now open a Browser and connect to address 192.168.1.1 you should be able to see the dd-wrt page.

That's All

[edit] Recovery and Upgrade

connect to the bootloader with telnet on port 9000 and ip 192.168.1.1

do the following: (consider that fis create operations are taking sometimes several minutes to finish)

fis init -f

now load the latest linux.bin from your tftp-server:

ip_address -h 192.168.1.2 
load -r -b 0x80041000 linux.bin
fis create linux

[edit] Redboot access script for Windows

Make a folder and download putty.exe to it
create a file in the same folder called redboot.txt, with the following content:

^C

create a file in the same folder called redboot.bat with the following content:

rem echo off
:start
rem ------------------------------------------------
ping 192.168.20.81 -n 1 -w 1 >NUL
IF ERRORLEVEL 1 goto start

rem putty
rem ------------------------------------------------
break
putty.exe telnet://192.168.20.81:9000 -m redboot.txt
exit

start the bat file and power on the router.....here comes redboot


[edit] Redboot access script for Linux

[edit] Putty

download putty.exe to c:\ create a file called redboot.txt, with the following content:

^C

create a file called redboot in the same folder with the following content:

#!/bin/bash
echo
echo ""
echo "Enter hostname or ip address: "
read host
while true
do
   if eval "ping -c 1 $host" > /dev/null; then       
       putty telnet://$host 9000 -m redboot.txt   
       echo "Router Awake"
       break
   else
       echo "Waiting for Redboot to boot. Press CTRL + C to quit"
       sleep 1
   fi
done

Make the file executable.

[edit] Telnet

If you don't want to install putty for linux, you may use standard telnet and arping. It would be so (replace eth2 by your ethernet card name):

#!/bin/sh
echo "192.168.20.81 send ip" >> ~/.telnetrc
arping  -f 192.168.20.81 -I eth2; telnet 192.168.20.81 9000

[edit] Flashing back to stock firmware

[edit] Hardware

[edit] Serial port


3.3V TTL
8,n,1,9600

Image:Dir300-serial.jpg

[edit] Overclocking

To overclock your router, see http://www.dd-wrt.com/phpBB2/viewtopic.php?t=30305

[edit] Links

https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=330022