Before I explain the ‘how to’ part, please allow me to explain everything I tried to do first in case some of these key words save someone else the pain:
-I tried everything I could find on the well meaning but horrendous pages of OpenWRT. Specifically this one for this router located here.
-I tried the ‘upload via recovery mode browser’ method. Fail.
-I tried a variety of different browsers including a few versions of Firefox. Fail.
-I tried that ‘curl’ command on that chaotic page in full recovery mode and regular boot mode (make sure you read till the bottom if you are at this step now as you should be a bit happy you found my post)
-I tried hex-editing the file according to all that hex editing crap. It was a cool learning experience but at the end of the day the file that ended up working didn’t have needs of the hexing 🙁
-I tried doing every form of TFTP, ATFTP and some other something or another. During this process, I was ‘nearly’ successful getting it on the router, but it kept snagging at block 7560 and then timing out and then aborting. I tried the ‘option blksize’ option in atftp and tried increasing, reducing, etc, etc, and none of that worked. This was my favourite and most useful link on the subject, though, if that’s worth anything.
-I tried increasing the timeout from 1 to 10 to 30 to 60 to who knows how the heck long. But none of that worked either.
-I tried doing all of the above in regular boot (just plugging it in) and recovery mode boot (with the pen jammed in there) and none of that worked
-I tried smashing my head into the wall and laughing hysterically. Fail.
-I tried drinking a lot of alcohol and doing all of the above again. Still failed!
-Finally, because I’m so sadistic, I tried a bunch of new things…. but one of them worked! And I hope it works for you, too. It was the curl command BUT….
…BUT… a few changes were applied:
- I inserted a HUB/SWITCH between the router and computer (i’m not sure if this is needed yet)
- I followed these very specific curl steps
- made sure laptop was set to 192.168.0.2 static
- pre-entered the command in the terminal as follows from instructions:
curl -0vF files=@openwrt-ar71xx-dir-615-c1-squashfs-factory.bin http://192.168.0.1/cgi/index
- put pen in the reset button of router in same way you do recovery mode
- start the curl command in the terminal
- power on the router by plugging in
- watch the commands so that they look like this hopefully:
* Hostname was NOT found in DNS cache
* Trying 192.168.0.1…
* Connected to 192.168.0.1 (192.168.0.1) port 80 (#0)
> POST /cgi/index HTTP/1.0
> User-Agent: curl/7.35.0
> Host: 192.168.0.1
> Accept: */*
> Content-Length: 3932431
> Content-Type: multipart/form-data; boundary=————————464dbec1925a46d8
>
* HTTP 1.0, assume close after body
< HTTP/1.0 200 OK
< Server: uIP/0.9 (http://dunkels.com/adam/uip/)
< Content-type: text/html
<
<html>
<head>
<title>backup loader</title>
<script language=”javascript”>
var count = 0;
function count_down(){
if (count == 101) {return;}
get_by_id(“show_sec”).innerHTML = count;
if (count < 101) {count++;setTimeout(‘count_down()’, 1000);}
}
function get_by_id(id){with(document){return getElementById(id);}}
</script>
</head>
<center>
<font color=blue face=verdana size=3><b>Device is Upgrading the Firmware</b></font>
<p>
<table>
<tr><td align=center><font face=Arial size=2 color=red>
<b><span id=”show_sec”></span> %</b>
</font></td></tr>
</table>
<hr><ul><font face=Verdana color=red size=4>NOTICE !!</font><br>
<font face=Verdana size=1><li>Don’t turn the device off before the Upgrade jobs done !
</center>
<script>
count_down();
</script>
</html>
7. wait for the reboot. Nothing will seem to happen. You will wonder if you have need of bashing your head on your wall, but just wait for light to go out and on again. Still nothing will happen. I thought I had failed again until one *very* critical step did I.
8. change your static IP of your computer BACK TO DHCP (or to the same network as your new router which will magically change from 192.168.0.1 to 192.168.1.1! Once I did this, restarted the connection, I was finally able to access the openwrt login page!
I hope this helps someone tremendously.
Thank you so much – worked like a breeze!
my pleasure!
Thanks so much for your post. Your last line to change from static IP to dynamic IP made my day. I was uploading the bin file on the recovery page, waited and waited but nothing happened. But when I followed what you said, restart the router and static to dynamic got me to the dd-wrt page. I did not need a hub/switch.
nice! glad to help!
I can’t believe it, but it #$% worked!
Thank you so much.
I’m trying to do the same thing with DIR-825 but the commands stops after
Content-Type: multipart/form-data; boundary=————————
and then nothing happens. Any idea what to do?
Did you read all of my points in detail? There were a few tricky points. I know it’s hard to go through these things in detail and especially this one but try again and let me know exactly what step you get stuck on and I”ll try to remember. Also, are you on the same model number for sure? There are ‘sub model numbers. This is C1. Is yours C1 for sure?
I was having this problem. I currently have DD-WRT firmware on, and I was trying to use the strategy to put factory firmware back on. Do you think this would work?
Did you know if the version of curl matters?
At what point do you let go of the reset button?
Sadly I’m too busy for quite a while. I don’t think curl version should matter, no. Curl just ‘curls’ I think 🙂 I don’t remember about the reset button details. I recall the usual 30 second hold or something. the key is when you release the process starts (I think…) It would be great if you fill in these details for others after you figure it out. Thanks! https://wayneoutthere.com/2018/12/23/how-to-flash-openwrt-d-link-dir-615/ check that link too?