Hi I got a DIR-3040 2nd hand. Arrived in firmware 1.20, seemed working no problem. Tried recovery mode but firmware won't upload (timeout after clicking upload) in any OS/browser/cURL.
Randomly tried D-Link's "DIR-3040_REVA_FIRMWARE_v1.20B03_HOTFIX" but this firmware is apparently flawed. Now the router can't even function with factory firmware. After reset, set WIFI SSID, password and admin password, the SSID won't update. Still connectable through default SSID and password. Admin login gets kicked out immediately after entering the correct admin password. WAN drops immediately after clicking agree on EULA.
So this unit is like dead-dead: no way to upload through recovery mode, no way to login as admin. Any chance to rescue? For example serial connection? As long as I can get OpenWRT onto it I'm fully satisfied.
It mentions recovery gui (like a lot of D-Link devices have) if you hold down the reset button on boot, so you'd figure it would be almost impossible to brick and super easy to recover since all you have to do is hold down the reset button then browse to a web page and upload the firmware file.
I'm not sure for this device, but usually you'd build your firmware, and there would be one with "factory" in the name and these are the ones you can upload straight into the emergency gui but I notice in this case the firmware selector has no "factory" option.
From V24
the firmware used for the recovery interface is called recover
the firmware used for the factory OEM interface is called factory
we don't have the RSA Keys to make the factory image for this model
Ok cool. I know with a 645 that I have that the recovery gui can be a little tricky with uploads. Sometimes it might take a few tries. There's also different browsers to try in linux like falkon
Thank you all for the info. The situation for this router might be a bit unique: I even tried Windows 7 + Firefox 10 comb. I can always access the recovery web GUI but it hangs as soon as I hit upload file. Both v1.2 firmware equipped routers cannot go through this. Some people reported v1.13 worked. So maybe the factory firmware somehow destroyed the recovery mode.
Good news is the serial efforts paid:case opening is quite standard, rubber pads off, screws out, just a metal ply bar from the WPS button side will open it up.
Then the UART pins are very obvious, right next to the reset button. I connected (soldered) GND, TX and RX to a CP2102, set "57600 8N1" then no problem accessing the serial outputs and interrupting the boot.
What tripped me over was setting up a working TFTP server. IDKY but everything I tried failed. Eventually I abusively repurposed another working server which I shouldn't. People may need to try different ways depending on their OS. For example, the tftp-hda in standard Debian repo just failed me.
After making sure the TFTP works and placing the firmware file, just interrupt boot with option 2 "Load system code then write to Flash via TFTP". Just wire the router and PC with ethernet cable and set IPs under subnet 192.168.0.*.
I also tried option 1 and booted into OpenWRT successfully. However the upgrade through web UI failed me:
verifying sysupgrade tar file integrity
cannot find ubi mtd partition rootfs
sysupgrade failed
You need to flash a factory image "recover in this case"
we may need to make this an option though sysupgrade
so if we change UBI format, we don't need to use the recovery interface
Most of the Dlink MT7621 AC models are made by ' Shanghai Gongjin Telecom Technology Co., Ltd. ([T&W]'
they are all the same
DIR-853-867-878-882-1360-1935-1960-2055-2150-2640-2660-3040-3060
are all the same recover
only the R1 versions that have Russian Failsafe interface
don't have this problem as then have a different bootloader
it's all simple the factory has a Windows computer to update the firmware
some programmer got it to work for the factory
they don't expect user to use it or care that it won't work with the linux stack
it's only linux user that have the problems over and over and over