Due to frequent WLAN dropouts I want to flash a Dir-842 C3 to OpenWRT. Keeping the reset button pressed while powering it on results in the power LED blinking about once per second. I'm connected to the router in LAN 1 with my laptop but I cannot ping 192.168.0.1 nor access a webpage on that address. If I disconnect power and boot the router without pressing the reset button, the power LED stays on and I can access the regular start page of the router.
I've updated the router to the official firmwares 3.11, 3.12, 3.13, 3.14 (trying to flash OpenWRT between each version) but I just don't get the basic firmware upload form. How can I flash the router to OpenWRT?
It is normal that the Recovery web interface does not respond to ping, also there is no DHCP so you'd have to configure your computer's IP address to be in the same subnet (e.g. set it to 192.168.0.2).
Also, the recovery requires the file to be uploaded as application/octet-stream which does no longer work with newer versions of Firefox or Chrome (try using IE11).
For flashing via the normal web ui, the image needs to be encrypted. This is not yet supported in OpenWRT, but I'm currently working on it You could try this image for now, it should be flashable via the regular Web UI.
From that you can flash to the latest official snapshots if you have trouble installing packages via opkg.
Thanks but the router is set to 192.168.0.1 and the laptop to 192.168.0.2 but yes, I have not tried IE11 yet. Will do once I'm back at my friend's in case the official firmware I flashed won't make a difference which I fear it won't (it's D-Link after all).
So, I visited my friend again and you were right: using IE 11 I could access the firmware upload form. However, it would not accept the firmware you linked to in this thread saying it was the wrong one. What else can I do?
The recovery will only accept the "old" firmware format (called MiddleFirmware by D-Link); to flash to OpenWRT via the recovery just download the latest official OpenWRT Snapshot.
The firmware I linked to already uses the new format, that can be flashed from the D-Link Web UI even with new stock fw versions.
They will eventually be renamed to factory-recovery.bin and factory-webflash.bin as of PR #3109
So, I visited again yesterday and successfully uploaded the Firmware OpenWrt snapshot Install from this page. However, after logging in with putty entering the first command got me this:
BusyBox v1.31.1 () built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt SNAPSHOT, r13600-9a477b833a
-----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:~# scp sysupgrade.bin root@192.168.1.1:/tmp/
Host '192.168.1.1' is not in the trusted hosts file.
(ssh-rsa fingerprint sha1!! <redacted>)
Do you want to continue connecting? (y/n) y
sysupgrade.bin: No such file or directory
What now? I've taken the router with me and hope to get this installed cause with the official firmware the router apparently cannot act as an Access Point properly.
on your computer instead, from the folder that contains an image named sysupgrade.bin.
SCP will then login to your router at 192.168.1.1 and transfer the file to /tmp.
After that, you could run sysupgrade /tmp/sysupgrade.bin from the OpenWRT shell.
Alright, I've uploaded the file with WinSCP and could start it but when I execute
'opkg update' the Dlink cannot download the files cause it's still set to 19.168.1.1 and my DSL router is at 10.10.10.1. So I entered
and this worked for eth0 but apparently the interface used is br-lan (cable is plugged into LAN1) cause when I ran opkg update I got
Downloading http://downloads.openwrt.org/snapshots/targets/ath79/generic/packages/Packages.gz
Failed to send request: Operation not permitted
*** Failed to download the package list from http://downloads.openwrt.org/snapshots/targets/ath79/generic/packages/Packages.gz
but the command would not confirm with a prompt and even after setting my PC's IP back to 10.10.10.20 I could not connect to the Dlink anymore. Only after reboot it was still accessible under 192.168.1.1. How do I get it to download the update packages? Or can I download them manually, upload via WinSCP and excecute them manually?
There are basically three options to install LuCI from this point:
Connect the WAN port of DIR-842 to your network, install LuCI and do all the network configuration (static IP address for LAN) more comfortably via the GUI.
uci set network.lan.ipaddr='10.10.10.88'
uci set network.lan.netmask='255.255.255.0'
uci set network.lan.broadcast='10.10.10.255'
uci set network.lan.dns='10.10.10.1'
uci set network.lan.gateway='10.10.10.1'
uci set dhcp.lan.ignore='1'
uci commit
service network restart
You can also transfer individual packages via scp and install these via opkg, however this a pain for large applications like LuCI that have a lot of dependencies.
Uci worked, thx! So now the system is updated to OpenWRT and I want to configure it as an access point. Gonna add a new post about that cause I have some questions about that too.
Using the above configuration, the device is actually set up as an access point already, i.e. DHCP is disabled and any DHCP requests and traffic from clients will be forwarded to the main router via br-lan. Just configure the wifi name and password, and enable wifi
Sounds good but when I clicked around a bit and saw I could add a radio there was no option to add 5 Ghz only 2? I thought this was a dual router or maybe this is not supported by the OpenWRT generic firmware?
Just checked with my device again (C3 EU), and it seems my locally-built image did actually not have the ath10k module and firmware included, however it is working flawless when updating to the latest official snapshot - both radios are shown after installing LuCI, 5G is actually radio0 and 2.4G is radio1 (my image was rather meant for testing the flashing via the D-Link Web UI rather than recovery, so had not even tested wifi).
Could you post the output of dmesg | grep atk10k ?
e.g. on my device it looked like this, with the latest official snapshot:
So the ath10k firmware is loaded correctly, but crashing.
In the developer section someone mentioned they have calibration data for ath10k in a different partition (mtd10 / reserved) instead of art:
Do you see any data when doing hexdump -s 0x5000 /dev/mtd9 ?
It should start with 20 2f, but for some routers apparently there is no calibration data there, just ff.
Maybe @augs could assist on this, it looks like all it takes is to replace
caldata_extract "art" 0x5000 0x2f20
with caldata_extract "reserved" 0x15000 0x2f20
in /etc/hotplug.d/firmware/11-ath10k-caldata ?
I'll have another look at qca_ol.ko, maybe we can figure out how to detect this, or if all else fails, just add some shell script magic to check art 0x5000 for the magic header vs. ff, and then proceed to dumping from reserved instead?
I'm starting to think the long term patch for the DIR-842 C* is to scan a handfull of offsets for caldata magic. I'm not confident enough in my knowledge of how stable the board/caldata config formats are and if that is actually a magic header or not.
Right, I was under the impression I'd already updated to this version by entering
opkg update
opkg install luci
after the installation of the snapshot install. Apparently I had not so now I've updated via the GUI to 'Firmware snapshot OpenWrt Upgrade' from the page you linked to. Problem is, more than 10 minutes later I can't access the router via GUI but only via Putty. A reboot does not change this. How come and what do I do now?
Any help on this? I was planning on returning the router tomorrow. I'm gonna reset it and start the whole process over if need be if the result will be a working OpenWRT install. Thx.