OpenWRT DIR615

I have a wonky DIR615-G2 that came standard with my UniFi subscription. It would randomly reboot and even fail to boot from time to time. Even trying to re-flash the firmware using the Emergency mode is iffy.

So, I figured out a way to at least get it to boot OpenWRT in a clean way. Essentially, I had to flash it with a DD-WRT image because the stock OpenWRT image does not work. Then, the standard method is to upgrade it to OpenWRT. However, that fails too.

So, I had to work out my own way, which does not require SSH running.


  1. Boot the router into emergency mode.
  2. Flash it with the stock DD-WRT firmware.
  3. Reboot the device.
  4. Telnet to the router.
  5. Transfer the OpenWRT upgrade image using netcat
    nc -l -p 1234 > /tmp/dir620.bin
  6. Erase the nvram
    erase nvram
  7. Erase the flash
    mtd erase linux
  8. Flash the upgrade
    mtd -r write /tmp/dir620.bin linux
  9. Reboot the device.



Published by

Shawn Tan

Chip Doctor, Chartered/Professional Engineer, Entrepreneur, Law Graduate.

13 thoughts on “OpenWRT DIR615”

  1. will this too require physical ethernet connection from my linux machine to the router and do you think openwrt is better? ive been using openwrt on my piratebox (mr3020) and saw this post while doing my research on flashing my unifi stock router but i am very interested to hear what you think of them both (openwrt / ddwrt) on tmnet unifi on dir-615 .

    1. I use a laptop. So, I only connect to my router using WiFi.
      Having used both OpenWRT and DD-WRT, I prefer OpenWRT because it is more configurable and has more features.

      1. howbout 3g modems? someone gave me maxis 3g modem (huawei e1762) and its on the openwrt-compatible-list [] but how to flash it – from linux preferably? i got only as far as setting up usb-modeswitch and udev rules but i am confused about this – if there is an ‘image’ file ie: ddwrt-e1762.img the goal is to flash a device ie: 3g modem (e1762) with it using dd command in linux terminal… where, how and what should i look for?

  2. Could you provide the link to the “stock DD-WRT firmware” that you used in step 2.
    I could not get the openwrt webpage to work after the initial flashing despite having the G2 hardware version which was supposed to work, so I’m interested in your trick.

      1. There are many versions. C1, D1, D2, D3… which one did you use?
        Is the openwrt barrier breaker (14.07) sysupgrade image for dir-620 the right one to use for step 8?
        Did you use manually copy and flash (netcat, mtd) the images because you could could not or did not want to use the dd-wrt gui?

      2. I believe that the DD-WRT ones are all the same binary image. When I did this, Barrier Break wasn’t out yet. I just prefer doing things by hand, rather than GUI.

  3. Got it working. Its a nice workaround for a router that couldn’t even telnet after flashing Openwrt. Thanks for your help.

  4. Shawn,

    Thanks for posting this. Have been looking around and trying to flash the TM DIR-615 Rev G2 for more than a day to Openwrt, with no success. Keeps saying failed when trying to do a firmware upgrade of DIR620.bin via DD-Wrt. Tried emergency mode, also failed.

    Tried your solution above and it works..! Finally got the router flashed to Openwrt.

    thanks again..

  5. How to check if the router is in emergency mode? I tried flashing several times but after few days (after several reboots) it revert to original firmware.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s