I purchased a D-Link DIR-2640, because it seems to be the last WiFi router on the ToH for a reasonable price on Amazon. I downloaded the Factory Image from here https://openwrt.org/toh/d-link/dir-2640_a1. Then entered recovery mode and connected as described here: https://openwrt.org/docs/guide-user/installation/installation_methods/d-link_recovery_gui. However, the recovery firmware only seems to ever respond to one request. If you try to load the recovery page twice it will simply hang, failing to so much as open the TCP connection.
You are able to make the request to flash the file from the terminal:
$ curl -v -i -F firmware=@Downloads/openwrt-23.05.4-ramips-mt7621-dlink_dir-2640-a1-squashfs-factory.bin 192.168.0.1
* Trying 192.168.0.1:80...
* Connected to 192.168.0.1 (192.168.0.1) port 80
> POST / HTTP/1.1
> Host: 192.168.0.1
> User-Agent: curl/8.7.1
> Accept: */*
> Content-Length: 9568532
> Content-Type: multipart/form-data; boundary=------------------------LpsCd7YDWIm01T0i62GWpT
> Expect: 100-continue
>
* Done waiting for 100-continue
* upload completely sent off: 9568532 bytes
* HTTP 1.0, assume close after body
< HTTP/1.0 200 OK
HTTP/1.0 200 OK
< Content-type: text/html
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'>.warning{margin:50px 0;color:red;font-size:22px}</style></head><script type="text/javascript">var percent=1;var Timer;function uiOnload(){Timer=setTimeout("upStatus()",2200);}window.onload = uiOnload;function upStatus(){percent++;if(percent > 100){clearTimeout(Timer);document.getElementById('wait').style.display = 'none';document.getElementById('result').style.display = '';return; }document.getElementById('time').innerHTML = 'Device is upgrading the firmware...' + percent + '%'; Timer = setTimeout('upStatus()',2200);}window.onload = uiOnload;</script><body><center><div><center style='margin:50px 0;color:blue;font-size:24px'>D-Link Router Recovery Mode</center></div><div id=wait><center style='margin:50px 0;font-size:15px'><span id=time>Device is upgrading the firmware... 1%</span></center></div><div id=result style=disp* Closing connection
lay:none><center class=warning><span>Upgrade successfully!</span></center></div><hr/><div><center class=warning>WARNING!!</center></div></center><ul><li style='margin:50px 0 10px;font-size:14px'>Do not interrupt the update process,as it may demage the device</li></ul><hr/></body></html>
This looks like it goes smoothly, but it never reboots (even after some hours), and again, never responds to another query, just like if I try to make 2 subsequent get requests to the recovery firmware:
Should I return it for another one or am I doing something wrong?