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.
Essentially:
- Boot the router into emergency mode.
- Flash it with the stock DD-WRT firmware.
- Reboot the device.
- Telnet to the router.
telnet 192.168.1.1
- Transfer the OpenWRT upgrade image using netcat
nc -l -p 1234 > /tmp/dir620.bin
- Erase the nvram
erase nvram
- Erase the flash
mtd erase linux
- Flash the upgrade
mtd -r write /tmp/dir620.bin linux
- Reboot the device.
Please share to all of us on the OpenWRT to Stock.
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 .
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.
howbout 3g modems? someone gave me maxis 3g modem (huawei e1762) and its on the openwrt-compatible-list [http://www.dd-wrt.com/wiki/index.php/3G_/_3.5G] 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?
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.
You can just download it from the DD-WRT website.
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?
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.
Got it working. Its a nice workaround for a router that couldn’t even telnet after flashing Openwrt. Thanks for your help.
Glad to hear it’s working.
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..
You’re welcome!
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.