Tag: router

Flashing OpenWRT onto a D-link DIR-615 – The Sequel!

The funny part about this blog is that I spent an entire day searching for how to do this and then I ended up landing on a blog post with the answer… written by ME. in this 2015 blog post Lol or something?

This tutorial assumes you are using Ubuntu and know how to access your terminal and do some basic commands. If not, do a quick study on that before you begin. If you aren’t using Ubuntu on your computer I’m not sure what I can do to help other than encourage you to switch immediately.

This tutorial also assumes that your computer/laptop is plugged directly into the DIR-615 router by ethernet cable and not by wifi. It could probably be done with wifi, but I don’t know and I know it adds an extra layer of complexity I don’t like. So find a cable and plug in to do all this.

1. Download the appropriate image from OpenWRT to your computer.

I got mine by refining a search here.

2. Extract the file into it’s raw ‘.bin’ format.

Mine looks exactly as follows at the time of this writing when it’s sitting in my directory but as versions change and improve this could slightly change be aware:

lede-17.01.4-ar71xx-generic-dir-615-c1-squashfs-factory.bin

3. Using your terminal cd (change directory) to the location where the file is you just extracted in step 2.

4. Make sure your computer is set to a static IP address.

If you don’t know how to do this, search it online as I don’t have a quick link to it right now. “How to set static IP address in Ubuntu’ should find something. Make sure that your static IP address you are setting does not conflict with another device on the router, nor with the router itself at 192.168.0.1.

192.168.0.2 static

NOTE: After this router is flashed you will need to get rid of this static IP address since it won’t match your new router!

5. Pre-enter the following command into your terminal so you are ready to press enter

curl -0vF files=@lede-17.01.4-ar71xx-generic-dir-615-c1-squashfs-factory.bin http://192.168.0.1/cgi/index

Again, the part after the @ symbol in the command above might change depending on the .bin file you are flashing on. This tutorial will likely get old at some point so you may need to swap out a different file name into the command above but the rest should work long term.

6. Power off the router by unplugging the black power cable

Warning. You are about to forever wipe your router’s ‘operating system’ so if you have anything in there you care about this would be the time to get those out!

7. Put pen in the reset button of router and hold it there

8. While still holding reset button, plug in the power cable.

Keep holding the reset button! Don’t let go. The light will be a solid colour (orange, I recall?) but you are waiting for the first flash before executing the next step.

9. As soon as the solid light starts to flash hit the enter key in your terminal and run the curl command you pre-entered in step 5 above

After you hit this command at the perfect moment, things should start to work. When they do, you’ll see some funky html stuff come on the screen that looks like this:
* 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
<
backup loader Device is Upgrading the Firmware


  • Don’t turn the device off before the Upgrade jobs done !
` `

More notes for this step
The screen will stay with this html/> script on there and at this point you can keep your eyes on the router as nothing will happen on the screen.
You should see lights flashing and reboots. Wait, wait, wait. Failure seems real but it’s not yet…. For me I was stuck on a green light for a really long time and no updates in terminal.

If after 5 minutes (or so) things appear to be ‘stuck’ at that point you could try unplugging the power cable and plugging it back in again to test.

To test to see if it worked, go to the new access IP address which should be 192.168.1.1. If you are prompted for user/password you succeeded.

A few troubleshooting notes

Something didn’t work? Read these next few points for some inspiration:

  • Did you really make a static IP address in step 4? You might think you did but maybe it didn’t work. Check with ifconfig command and see what IP address your computer/laptop has. If it’s not static, things won’t work right.
  • Were you too fast or too slow with the timing of the curl command in Step 5? Timing is a bit finicky here so you may have to try a few times to nail it.
  • If things are really goofy you ‘may’ need to install the original Dlink .bin file and start from there. I doubt it but there are records of this online so I thought I would mention it. You could get this on there by finding this .bin file online and using your new curl skills from above to flash the original .bin on there first.

Bin file name for DIR-615 = dir615_revC_firmware_311NA.bin

command to flash it on:
curl -0vF files=@dir615_revC_firmware_311NA.bin http://192.168.0.1/cgi/index

Follow up notes

  • Reminder! Turn your computer/laptop back to DHCP mode from static IP otherwise you might not be able to connect at all to your new router! I made this mistake way too many times and easy to forget.
  • After getting things up and running and if you need ddns, reboot device via ssh. when it comes back, then you could try this tutorial I wrote for the No-ip service. Here is a link to that tutorial.

Tags : , , , , ,

How to Flash OpenWRT on a DIR-615 C1 Router

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
  1. made sure laptop was set to 192.168.0.2 static
  2. 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

  3. put pen in the reset button of router in same way you do recovery mode
  4. start the curl command in the terminal
  5. power on the router by plugging in
  6. 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>&nbsp;&#37;</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.

Tags : , , , , , , , , ,

Telus: You Call That Tech Support?

I just had to share my horrific Telus internet tech support story.  It was so frustrating that it is interesting.  Because they have said they will be giving me a couple of months free internet, I’m not going to include a few other stories that surrounded this one, but it’s wrong for me not to share at least this one.  It must be exposed to spare others from pain.

I just moved to North Delta and decided to use Telus just because they seemed to have less presence than what seemed to be a near-monopoly of the over-priced Delta Cable.  My philosophy behind the decision was that if there wasn’t some reasonable competition in the market the monopolist would win removing all options and lower pricing from me.

The installation was fine (in fact great) and the service speed was good enough for my needs.   However, as the excited amateur radio (ham radio) operator that I am, I needed to open a few ports in my modem-router to make Qtel work.  I needed to simply open a few ports that seemed to be blocked by the router.

Since I know that tech support is always busy with people who don’t even know that they have ports, I decided to fix it on my own.  I did the usual steps: found my modem-router admin password and IP address, logged in, went into the port-forwarding section.  I typed in 5200 and tried to save my changes.  The router sent back a message “Wait a second while your settings are being saved. You will come back to this page again (something like that).  When I came back to the page, *no changes were saved*.  Thankfully, I kind of somewhat know a little bit about how computers work.  I envisioned that these changes were not being written to the router’s internal memory/hard drive.  I don’t know how a router works, per se, but it must have it’s own light weight operating system built in and memory to save changes to so that it can perform the jobs it needs to.

My settings are not being saved, therefore I reasoned there must be a problem with either the permissions of my user name or the router itself.

So, I called Telus tech support to let them know and get the permissions fixed assuming all they had to do was remotely log into the router and boost up my permission power.  And here is a rough summary of the dialogue with my buddy Telus and I (W):

——————–

W: Hello.  There is either a permission problem with my router admin user, or there is a problem with my router.

TELUS: Oh, explain

W: (explains)

TELUS: Oh, did you say ‘ports’?  We are not trained at this level of tech support to deal with port setting changes.  In order to deal with that, you will need to move to our premium tech support division.  If you go there and the problem turns out not to be the router problem, then it will cost you $40 [I can’t remember the number, exactly but it was nasty].  If the problem is our router, like you say, there will be no charge.

W: Hold on.  Stop for a second.  Did you just say that opening  a port is ‘advanced’ for your first level tech support?
TELUS: Yes.  We are not trained to do this.

W: Tell me you are joking.  Tell me this is a bad joke.  Tell me I will wake up and you will say ‘Ha, ha, gotcha’  – because my 75 year old mother knows how to open a port in her router…

TELUS: I’m sorry, sir, but to deal with ports you need to go to our paid tech support.

W: Ok, send me through [Note: I was deeply stressed about this because I’m coming through serious financial hardship so the decision was not as easy as it might have been for someone else]

TELUS: Hello, my name is ___.  What can I do for you.

W: There is a problem with (explained again)

TELUS: Ok, try this.  Now try that.  Ok, now try this.

W: Dude. No offence but this is not rocket science and I’ve done all these steps already and I’ve now wasted nearly 45 minutes on hold and qualifying to speak to you…

TELUS: Yes, sir.  Sorry about that.  Now try this, and this, and this.

W: There. See? I’ve done all this stuff.  Exactly what you told me to do already.  Are we done? What’s your solution?
TELUS: You need a new router.  You’re right.  There is a problem with the router.

W: *laughs psychotically*

——————-

So, if you are deciding to move to Telus, or start with Telus, you had better be freakin’ amazing at router stuff and networking or you are going to be funding their new revenue stream in a big way. I had used Shaw for years and ACN for a few years and never had I experienced such a blatant display of cash-grabbing from a cornered customer as that experience.

If they didn’t quickly give me two months free like they did, I would have also blogged my experience that I had one of their corporate stores when I picked up the router!

 

Tags : , , , , ,