Need help installing D-Link DAP-1620 B1

I'm trying to flash OpenWRT on a D-Link DAP-1620 B1.

I enter recovery mode, upload the factory image and I get a Upgrade successfully! message, but the device doesn't reboot, and if I switch it off and on again the stock firmware is still installed.

I tried the procedure with original firmware v2.10 and then flashed v2.01, they both fail.
(v2.01 is the earliest I could find, but there was v2.00 before that, I don't know if it makes a difference).

I tried 23.05.4, 23.05.5 and snapshot, none works.

I tried 3 different browsers, none works.

I tried reconnecting to the device without setting a static IP, in case I could enter some form of OpenWRT interface, but it fails to get an IP address, I can only use a static IP, meaning the recovery is still loaded.

I trried reloading the page or opening it in another browser, and if I do that the flashing process restarts from 0% directly (I think it's a bug because in the other browser no file was selected).

I tried opening the recovery web interface in the browser and then opening a terminal and running

curl -v -i -F "firmware=@openwrt-ramips-mt7621-dlink_dap-1620-b1-squashfs-factory.bin" 192.168.0.50

as per instructions but I get this error message

$ curl -v -i -F "firmware=@openwrt-ramips-mt7621-dlink_dap-1620-b1-squashfs-factory.bin" 192.168.0.50
*   Trying 192.168.0.50:80...
* Connected to 192.168.0.50 (192.168.0.50) port 80 (#0)
> POST / HTTP/1.1
> Host: 192.168.0.50
> User-Agent: curl/7.81.0
> Accept: */*
> Content-Length: 7602432
> Content-Type: multipart/form-data; boundary=------------------------90e6b057559c6a03
> Expect: 100-continue
> 
* Mark bundle as not supporting multiuse
* HTTP 1.0, assume close after body
< HTTP/1.0 200 OK
HTTP/1.0 200 OK
< Server: uIP/0.9 (http://dunkels.com/adam/uip/)
Server: uIP/0.9 (http://dunkels.com/adam/uip/)
< Content-type: text/html
Content-type: text/html

< 
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
		<script language="JavaScript">
			var which_id;
			var total_second = 120;
			var which_second = 0;
			
			function show_success_msg(){
				document.getElementById("upgrade_msg").style.display = "none";
				document.getElementById("upgrade_warning").style.display = "none";
				document.getElementById("success_msg").style.display = "";				
				document.getElementById("success_warning").style.display = "";	
			}
			
			function change_time(){
				var precent = Math.round((++which_second / total_second) * 100);
								
				if (precent > 100){
					precent = 100;
				}
				
				document.getElementById("show_second").innerHTML = precent;
				
				if (precent == 100){
					clearInterval(which_id);
					setTimeout("show_success_msg()", 2000);												
				}					
			}
			
			function start_counting(){
				document.getElementById("upgrade_msg").style.display = "";
				document.getElementById("upgrade_warning").style.display = "";
				document.getElementById("success_msg").style.display = "none";				
				document.getElementById("success_warning").style.display = "none";
				which_id = setInterval('change_time()', 1000);
			}
		</script>
	</head>
	<body onLoad="start_counting()">
		<form action="/cgi/index" enctype="multipart/form-data" method=post>
			<center>
				<font color=blue face=verdana size=5><b>D-Link Access Point Recovery Mode</b></font>    			
    			<br><br><br><br>
    			<div id="upgrade_msg"><font size="3" face="Verdana, Arial, Helvetica, sans-serif">Device is upgrading the firmware .... <span id="show_second">0</span>%</font></div>
    			<div id="success_msg" style="display:none"><font face="Verdana, Arial, Helvetica, sans-serif" color="red" size="5">Upgrade successfully!</font></div>
  			</center>
  		</form>  		
		<hr>
		<br>
		<center>
			<font face=Verdana color=red size=4><b>WARNING!!</b></font>
		</center>
		<br>
		<font face=Verdana size=2>
		<div id="upgrade_warning">
			<li>Do not interrupt the update process, as it may damage the device.</li>
		</div>
		<div id="success_warning" style="display:none">
			<li>If a wrong firmware image is upgraded, the device may not work properly or even could not boot-up again.</li>
		</div>
		</font>		
		<hr>
	</body>
* Closing connection 0
</html>

I don't know what else to do. Can someone help?

What happens when you load stock firmware by recovery?

Failed, I used the main user interface

that's not the question you were asked....

It failed, so I flashed it through the main interface

@frollic @hecatae
When trying to flash stock firmware via recovery I get an Upgrade failed! error message

flashed what, Openwrt?

If I flash stock firmware it says Upgrade failed!, stock firmware can be flashed in the main web interface though, OpenWRT is not accepted there. If I flash OpenWRT in recovery it says Upgrade successfully! but actually nothung happens.

@hecatae @frollic
is there anything else I can do?

@RaylynnKnight @raenye
Can the authors of the wiki page of the device help me?

  1. The stock image is encrypted, and the recovery only accepts non-encrypted firmware, so if you want to go back to stock via the recovery, you need to decrypt the image first. Quoting from the commit (e4c7703):
Revert to OEM firmware:
- tail -c+117 DAP1620B1_FW212B03.bin | \
  openssl aes-256-cbc -d -md md5 -out decrypted.bin \
  -k 905503a4e0c3cd3c1ce062246de427a68962347e
- flash decrypted.bin via D-Link Web Recovery
  1. You could try a different browser, edge/chrome usually work. The curl instructions from the general D-Link recovery page aren't necessarily working for all D-Link models (I never tried them).

  2. I have an implementation of the firmware encryption algorithm, which can be used to create a firmware binary that can be installed from the OEM interface, but I recall I had problems with it, so it's still WIP in my local git tree.

1 Like

It should. How long did you wait?
The easiest way to diagnose this is to view UART logs, but this requires disassembling the case (non-destructively). Are you willing and capable of doing so?

1 Like

No, the device has stock firmware on it, I want to install OpenWRT, but the recovery seems not to be working

You could try a different browser

I tried Firefox, Chromium, Falkon and Epiphany, none of them works. I even tried lynx but it has no file chooser

How long did you wait?

I left it for several minutes, maybe 15-20

Let me grab my spare unit and try to flash snapshot, so see if it's working.

2 Likes

Thank you for weighing in and for your help

I can confirm the symptoms you describe with 24.10rc2 and 23.05.5:
After "Device is upgrading the firmware" with percentage going from 1% to 100%, I got "Upgrade successfully!" and the device did not reboot.
Accessing the webrecovery in a different tab restarted the count.
After powering off, the device boots normally (in my case, to my OpenWrt build that was previously installed).

I'll connect UART to see what's wrong.

1 Like

@Bobert You recently managed to install 23.05.5, right? which browser did you use?

I don't know if this is browser-related, those I tried encompass all web browser rendering engines, Firefox uses Gekko, Chromium uses the latest Chromium and Falkon an older version of it (87.xxx), Epiphany uses WebKit.

I found some detailed notes of mine about the installation process:

installing openwrt

  • unplug the unit, press the reset button (next to the ethernet port) using a pin or a pen, and re-plug it while keeping the reset button pressed. Release the button when the red LED turns on.
  • connect your computer to the unit using an ethernet cable.
  • manually configure the computer's IP to static 192.168.0.10 (no gateway needed) since the unit does not
  • point your web browser to 192.168.0.50 (I used Brave, some people have better luck with Firefox); you should get to a page titled "D-Link Access Point Recovery Mode", where a firmware image can be uploaded.
  • note: while in recovery, the unit WILL NOT answer ping requests, so you must use a browser.
  • upload "openwrt-ramips-mt7621-dlink_dap-1620-b1-squashfs-factory.bin".
  • the webpage displays "Device is upgrading the firmware .... 0%" and counts up to 100%. This takes roughly 2 minutes, during which the red LED starts blinking rapidly.
  • afterwards the webpage displays "Upgrade successfully!", and the unit reboots.
  • during boot, the red LED blinks rapidly. After ~1 more minute it turns solid green and the unit is ready. Note: subsequent reboots take only 20-30 seconds.

There was no red LED blinking (during flashing), right?