Broken DIR-300

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Author Message
Junkee
DD-WRT Novice


Joined: 17 Nov 2009
Posts: 3

PostPosted: Tue Nov 17, 2009 12:56    Post subject: Broken DIR-300 Reply with quote
So I tried to upgrade my ddwrt on my DIR-300 over wireless and found out that its a big don't.

Now my Router starts up, the Power LED is lit and if i connect my laptop on a LAN port the specifiv LED lights up aswell. During bootup i cant see Gratuitous ARP Request coming from the Router and i can ping successfully with TTL 64 so i suppose the router isnt bricked. During bootup it is aswell possible to telnet it on port 9000 but all i get is a message that the router is going to bootup in a few seconds.

Any communication with the router after bootup does not work at all. Reading through the wiki i guessed i would have to flash with tftp so i used this guide : http://www.dd-wrt.com/wiki/index.php/Tftp_flash but i didnt get any response from the router.

Do i have to reinstall redboot on the router or what is the next thing to try ?
Sponsor
iVitor
DD-WRT User


Joined: 10 Jul 2009
Posts: 106

PostPosted: Tue Nov 17, 2009 18:18    Post subject: Reply with quote
You've done a great job troubleshooting on your own, now all you need to do is ctrl+c (send the ^C char) while you see that message telling "the start-up script is going to run in x seconds" and you will be presented with the redboot prompt.

To reflash your firmware, you will need to setup a TFPT server on your PC (see the useful links at the end of the post), place the linux.bin firmware in the same folder of the TFTP server exe, run the exe and then in the redboot prompt:

ip_address -h 192.168.1.2 (this is your PC IP Address)
fis init -f
load -r -b 0x80041000 linux.bin
fis create linux

I am assuming that your bootscript is already setup correctly.

Usefull links
TFTP Server: http://www.dd-wrt.com/dd-wrtv2/downloads/stable/dd-wrt.v24%20SP1/Consumer/Dlink/DIR-300/tftpsrv.zip
Latest linux.bin: http://www.dd-wrt.com/dd-wrtv2/downloads/others/eko/BrainSlayer-V24-preSP2/10-10-09-r13064/dlink-dir300/linux.bin

Common Issues
Temporarily disable your PC firewall so that it accepts the router connection to the running TFTP server
Junkee
DD-WRT Novice


Joined: 17 Nov 2009
Posts: 3

PostPosted: Tue Nov 17, 2009 19:34    Post subject: Reply with quote
Yeah i hoped that would work, i tried several times but ctrl-c did not abort the booting progress.
the message normally says the start-up script is going to run in about 2 seconds so with a ping below 1 ms i dont think the reaction time should be a matter.

Any clues ?
iVitor
DD-WRT User


Joined: 10 Jul 2009
Posts: 106

PostPosted: Tue Nov 17, 2009 22:13    Post subject: Reply with quote
Well, the way I do it myself was inspired from the scripts in the wiki, and is the following:

(assuming you use Windows)

1) download putty
http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe

always in the same path as putty,

2) create a file (for instance break.txt) with the content
Code:
^C


3) create a batch (for instance redboot.bat) with the following content:
Code:

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

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


4) Now run the batch and then power on your router. (You may have to be pressing reset while powering on the router until it gets to the redboot prompt)

Works every time Wink
Junkee
DD-WRT Novice


Joined: 17 Nov 2009
Posts: 3

PostPosted: Wed Nov 18, 2009 12:26    Post subject: Reply with quote
no im not on windows, im on a linux machine.

even sending the escape char over telnet (getting into telnet prompt an doing a "send escape")
so automatically send the escape char but google tells me i need to learn tcl and other stuff for that and i dont think its worth the effort to do that and i didnt find any premade script.

The best script i could come up with was :

#!/bin/sh
host=192.168.1.1
port=9000
cmd="^C"

echo open ${host} ${port}
sleep 2
echo ${cmd}

but all i get is "connection was closed by foreign host"


i did set up the bootloader properly when first installing ddwrt. is it possible that the upgrading process damaged the bootloader ?
the normal process involves setting the ip to 192.168.20.80 and i doubt that the router will respond to anything on that port since i saw that gratuitous arp request on 192.168.1.1
iVitor
DD-WRT User


Joined: 10 Jul 2009
Posts: 106

PostPosted: Wed Nov 18, 2009 13:42    Post subject: Reply with quote
The firmware update by itself won't corrupt the redboot loader, because they are stored in completely separate regions of the flash.
Trying to enable jffs filesystem however may nuke your board configuration region, but it will still leave the redboot region intact.

My biggest suspicion is that your telnet client isn't sending the "^C" char correctly, hence why the boot script isn't aborted and you don't get to the redboot prompt.

Looking at the Linux script posted in the wiki, since it uses putty, I believe it was used some kind of wine configuration that allowed putty to be started like that... Nevertheless my best advice is for you to adapt that script so that it runs putty under your own wine configuration.

The script in the wiki (very small edit to not link to bash -- some of us use dash or even other posix shell)
Code:

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


Wiki URL: http://www.dd-wrt.com/wiki/index.php/DIR300

PS: The proper IP is 192.168.1.1, don't have any doubts about it Wink
cedwifi
DD-WRT Novice


Joined: 11 Jan 2010
Posts: 2

PostPosted: Mon Jan 11, 2010 20:29    Post subject: Reply with quote
Hello everybody !

Quote:
Trying to enable jffs filesystem however may nuke your board configuration region, but it will still leave the redboot region intact.


I had this problem yesterday when I enable jffs option on my DIR-300 flashing with DD-WRT.

Next I try many things to restore the firmware, but nothing work.

Finally, I follow the instruction :
- completely go back to original firmware
- installing DD-WRT on DIR-300

I think there is no way to erase the on board config to default value (I didn't find it).

Does anyone know this on DIR-300 ?
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT 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