[DIR-1960] Curl upload succeeds but no OpenWrt installation

Hi
I recently bought a D-Link DIR-1960, its support was added on July 27 to master, tech data link.

I am following installation via recovery method. Unfortunately browser upload didn't work for me, no matter how many permutations I tried.
Curl i.e. curl -v -i -F "firmware=@file" 192.168.0.1 succeeds but OpenWrt is not installed.
First sign of trouble is that device does not reboot, I waited for upto 30 minutes in one of the attempts. After I turn device off then on , I see stock firmware itself.

I also tried installing different stock firmware versions and then following recovery GUI option, same behavior on all, also tried encrypting OpenWrt snaphot bin with delink-decrypt and flash via Stock firmware web ui, no luck there also.

WIll be glad for any help regarding this.

Curl output is copied below

*   Trying 192.168.0.1:80...
* Connected to 192.168.0.1 (192.168.0.1) port 80 (#0)
> POST / HTTP/1.1
> Host: 192.168.0.1
> User-Agent: curl/7.69.1
> Accept: */*
> Content-Length: 8126664
> Content-Type: multipart/form-data; boundary=------------------------e8c670b780b3ece0
> Expect: 100-continue
> 
* Done waiting for 100-continue
* We are completely uploaded and fine
* Mark bundle as not supporting multiuse
* 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 0
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>⏎

Was able to flash via browser in Wndows.

Interestingly on Linux (Fedora 32) , it didn't work with either of Chrome, Firefox, Opera and curl.

All good now, this topic can be considered closed.

1 Like

Yes, the issue is with Linux browsers (something with the MIME type handling). I have spent quite a few time on my DIR-878 A1 (which has the same issue) - no Linux browser worked, whereas both Firefox and Chrome on Windows worked straight away. The commit description is a bit vague on that unfortunately.

Shouldn't curl have worked ?
or the instructions for that should also be updated ?

As you can see the 'emergency room' environment returns an 'Upgrading' status page, so it should, yes.

just to add a note
about recent versions of Firefox on windows
just like logging into OpenWRT with out a password
it's hit & miss but doing it in Private Mode works