D-Link Forums

D-Link FAQ => Router FAQs => DD-WRT => Topic started by: larkey on July 26, 2018, 10:21:45 AM

Title: For me the webserver of the emergency didn't work
Post by: larkey on July 26, 2018, 10:21:45 AM
For me the webserver of the emergency didn't work, specifically it did only serve exactly one TCP connection (and then HTTP) request and then no following.  Since the usual upgrade process means that you access the interface at 192.168.0.1 with a GET request (to display it) and then upload the data with a POST request, the actual upload would never occur.  My workaround was to:


Flash the webflash as usual.  For me, however, the router wasn't finished after 3:40mins and I perhaps was a bit hasty, forcing it to reboot. Anyhow, the DD-WRT UI wasn't available at 192.168.1.1, whether it was because the flash failed or me not waiting.  @GreenBay42 kindly recommended me to downgrade the firmware to v1.00b7 (available at tsd.dlink.com.tw) which is only possible using the workaround, since the WebUI doesn't allow downgrades (at least not from 1.10b2).  Then I could regularly flash the factory-to-ddwrt.bin file from the normal webinterface and proceed as usual.

Bonus: Output from telnet access to the webserver

Code: [Select]
$ telnet 192.168.0.1 80
Trying 192.168.0.1...
Connected to 192.168.0.1.
Escape character is '^]'.
GET / HTTP/1.1
HTTP/1.0 200 OK
Content-type: text/html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><style type="text/css">.main{     margin-right: auto;     margin-left: auto; }.title{  margin:50px 0 50px 0px;  color:blue;     font-size:24px; font-weight:bold}.file{ margin:50px 0 50px 0px;       font-size:15px}.warning{        margin:50px 0 50px 0px; color:red;    font-size:22px; font-weight:bold}.info{ margin:50px 0 10px 0px; font-size:14px}</style></head><body><div class="main"><div><center class="title">D-Link Router Recovery Mode</center></div><div><form enctype=multipart/form-data method=post><center class="file"><table><tr><td>Firmware Image</td><td><input id="firmware" type="file" size="30" maxlength="128" name="firmware"></td><td><input type="submit" name="btn" id="upload"  value="Upload" /></td></tr></table></center></form> </div><hr /><div><center class="warning">WARNING!!</center></div><ul><li class="info" >If a wrong firmware image is upgraded,the device may not work properly or even could not boot-up again.</li></ul><hr /></div></body></html>Connection closed by foreign host.
$ telnet 192.168.0.1 80
Trying 192.168.0.1...
GET / HTTP/1.1


^C
Title: Re: For me the webserver of the emergency didn't work
Post by: FurryNutz on July 26, 2018, 11:02:23 AM
"Now, after you waited a few seconds to be sure and perhaps re-assigned your device a static IP, hit Upload." The user needs to static assign a 192.168.0.### address on there PC BEFORE beginning to use the recovery mode process.

I would recommend that since there is FW encryption in all new recent D-Link FW, if users want to use 3rd party FW, to use the recovery mode to FIRST downgrade there routers to initial older shipping versions of FW. Once the router is downgraded to older initial OEM FW, then use the routers main web page to send the DD-WRT Factory2WRT file to make the conversion to DD-WRT. This should be the safest method to get 3rd party FW loaded. I would not use the recovery mode for any 3rd party FW loads. This may cause the 3rd party FW to be loaded incorrectly or damage the routers NVRAM and recovery mode sections. It's only needed for, troubleshooting, downgrading OEM FW to a lower version or use it to migrate back to D-Link OEM FW from 3rd party FW.