D-Link Dir-842 - can't access firmware upload form

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.

you should run

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

ifconfig eth0 10.10.10.88 netmask 255.255.255.0
route add default gw 10.10.10.1

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

So I entered

ifconfig br-lan 10.10.10.88 netmask 255.255.255.0
route add default gw 10.10.10.1

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:

  1. 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.
  2. Configure network via SSH:
    changes made via ifconfig are not persistent, OpenWRT uses UCI instead:
    https://openwrt.org/docs/guide-user/base-system/uci
    https://openwrt.org/docs/guide-user/network/openwrt_as_clientdevice
    In your case it would be something like:
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
  1. 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 :slightly_smiling_face:

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:

[   11.765509] ath10k 5.1 driver, optimized for CT firmware, probing pci device: 0x56.
[   11.787000] ath10k_pci 0000:00:00.0: enabling device (0000 -> 0002)
[   11.793824] ath10k_pci 0000:00:00.0: pci irq legacy oper_irq_mode 1 irq_mode 0 reset_mode 0
[   12.411649] firmware ath10k!fwcfg-pci-0000:00:00.0.txt: firmware_loading_store: map pages failed
[   13.433173] firmware ath10k!QCA9888!hw2.0!ct-firmware-5.bin: firmware_loading_store: map pages failed
[   13.719980] firmware ath10k!QCA9888!hw2.0!ct-firmware-2.bin: firmware_loading_store: map pages failed
[   14.002556] firmware ath10k!QCA9888!hw2.0!firmware-6.bin: firmware_loading_store: map pages failed
[   14.541853] ath10k_pci 0000:00:00.0: qca9888 hw2.0 target 0x01000000 chip_id 0x00000000 sub 0000:0000
[   14.551435] ath10k_pci 0000:00:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
[   14.571484] ath10k_pci 0000:00:00.0: firmware ver 10.4b-ct-9888-fW-013-d81f62d97 api 5 features mfp,peer-flow-ctrl,txstatus-noack,wmi-10.x-CT,ratemask-CT,regdump-CT,txrate-CT,flush-all-CT,pingpong-CT,ch-regs-CT,nop-CT,set-special-CT,tx-rc-CT,cust-stats-CT,txrate2-CT,beacon-cb-CT,wmi-block-ack-CT,wmi-bcn-rc-CT crc32 937128b4
[   14.907447] ath10k_pci 0000:00:00.0: board_file api 2 bmi_id 0:18 crc32 f228337a
[   16.952026] ath10k_pci 0000:00:00.0: unsupported HTC service id: 1536
[   16.962106] ath10k_pci 0000:00:00.0: 10.4 wmi init: vdevs: 16  peers: 48  tid: 96
[   16.969861] ath10k_pci 0000:00:00.0: msdu-desc: 2500  skid: 32
[   17.000209] ath10k_pci 0000:00:00.0: wmi print 'P 48/48 V 16 K 144 PH 176 T 186  msdu-desc: 2500  sw-crypt: 0 ct-sta: 0'
[   17.011526] ath10k_pci 0000:00:00.0: wmi print 'free: 114524 iram: 12628 sram: 29508'
[   17.252933] ath10k_pci 0000:00:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal pre-cal-file max-sta 32 raw 0 hwcrypto 1

Where do I find the latest official snapshot? It's not on the Dir-842 page, is it? dmesg outputs this:

[   11.929521] ath10k 5.1 driver, optimized for CT firmware, probing pci device: 0x56.
[   11.950993] ath10k_pci 0000:00:00.0: enabling device (0000 -> 0002)
[   11.957806] ath10k_pci 0000:00:00.0: pci irq legacy oper_irq_mode 1 irq_mode 0 reset_mode 0
[   12.579718] firmware ath10k!fwcfg-pci-0000:00:00.0.txt: firmware_loading_store: map pages failed
[   13.159867] firmware ath10k!QCA9888!hw2.0!ct-firmware-5.bin: firmware_loading_store: map pages failed
[   13.584887] firmware ath10k!QCA9888!hw2.0!ct-firmware-2.bin: firmware_loading_store: map pages failed
[   13.872432] firmware ath10k!QCA9888!hw2.0!firmware-6.bin: firmware_loading_store: map pages failed
[   14.424836] ath10k_pci 0000:00:00.0: qca9888 hw2.0 target 0x01000000 chip_id 0x00000000 sub 0000:0000
[   14.434413] ath10k_pci 0000:00:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
[   14.454466] ath10k_pci 0000:00:00.0: firmware ver 10.4b-ct-9888-fW-013-d81f62d97 api 5 features mfp,peer-flow-ctrl,txstatus-noack,wmi-10.x-CT,ratemask-CT,regdump-CT,txrate-CT,flush-all-CT,pingpong-CT,ch-regs-CT,nop-CT,set-special-CT,tx-rc-CT,cust-stats-CT,txrate2-CT,beacon-cb-CT,wmi-block-ack-CT,wmi-bcn-rc-CT crc32 937128b4
[   14.793963] ath10k_pci 0000:00:00.0: failed to fetch board data for bus=pci,bmi-chip-id=0,bmi-board-id=31 from ath10k/QCA9888/hw2.0/board-2.bin
[   14.808092] ath10k_pci 0000:00:00.0: board_file api 1 bmi_id 0:31 crc32 ad503a02
[   16.853292] ath10k_pci 0000:00:00.0: unsupported HTC service id: 1536
[   16.863813] ath10k_pci 0000:00:00.0: 10.4 wmi init: vdevs: 16  peers: 48  tid: 96
[   16.871585] ath10k_pci 0000:00:00.0: msdu-desc: 2500  skid: 32
[   22.014262] ath10k_pci 0000:00:00.0: wmi unified ready event not received
[   22.086933] ath10k_pci 0000:00:00.0: could not init core (-145)
[   22.093326] ath10k_pci 0000:00:00.0: could not probe fw (-145)
[   22.102618] ath10k_pci 0000:00:00.0: firmware crashed! (guid b99368b4-6994-469c-b17e-17afed7985bb)
[   22.111912] ath10k_pci 0000:00:00.0: qca9888 hw2.0 target 0x01000000 chip_id 0x00000000 sub 0000:0000
[   22.121447] ath10k_pci 0000:00:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
[   22.129907] ath10k_pci 0000:00:00.0: firmware ver 10.4b-ct-9888-fW-013-d81f62d97 api 5 features mfp,peer-flow-ctrl,txstatus-noack,wmi-10.x-CT,ratemask-CT,regdump-CT,txrate-CT,flush-all-CT,pingpong-CT,ch-regs-CT,nop-CT,set-special-CT,tx-rc-CT,cust-stats-CT,txrate2-CT,beacon-cb-CT,wmi-block-ack-CT,wmi-bcn-rc-CT crc32 00000000
[   22.159748] ath10k_pci 0000:00:00.0: board_file api 1 bmi_id 0:31 crc32 ad503a02
[   22.167406] ath10k_pci 0000:00:00.0: htt-ver 0.0 wmi-op 6 htt-op 4 cal pre-cal-file max-sta 32 raw 0 hwcrypto 1
[   22.187914] ath10k_pci 0000:00:00.0: failed to get memcpy hi address for firmware address 4: -16
[   22.196996] ath10k_pci 0000:00:00.0: failed to read firmware dump area: -16
[   22.204205] ath10k_pci 0000:00:00.0: in crash-regs-harder
[   23.912175] ath10k_pci 0000:00:00.0: in crash-regs-harder, firmware did not provide indicator: 0x2
[   23.921437] ath10k_pci 0000:00:00.0: Copy Engine register dump:
[   23.927575] ath10k_pci 0000:00:00.0: [00]: 0x0004a000   0   0   0   0
[   23.934248] ath10k_pci 0000:00:00.0: [01]: 0x0004a400   0   0   0   0
[   23.940914] ath10k_pci 0000:00:00.0: [02]: 0x0004a800   0   0   0   0
[   23.947579] ath10k_pci 0000:00:00.0: [03]: 0x0004ac00   0   0   0   0
[   23.954247] ath10k_pci 0000:00:00.0: [04]: 0x0004b000   0   0   0   0
[   23.960912] ath10k_pci 0000:00:00.0: [05]: 0x0004b400   0   0   0   0
[   23.967579] ath10k_pci 0000:00:00.0: [06]: 0x0004b800   0   0   0   0
[   23.974244] ath10k_pci 0000:00:00.0: [07]: 0x0004bc00   0   0   0   0
[   23.980911] ath10k_pci 0000:00:00.0: [08]: 0x0004c000   0   0   0   0
[   23.987577] ath10k_pci 0000:00:00.0: [09]: 0x0004c400   0   0   0   0
[   23.994244] ath10k_pci 0000:00:00.0: [10]: 0x0004c800   0   0   0   0
[   24.000909] ath10k_pci 0000:00:00.0: [11]: 0x0004cc00   0   0   0   0
[   24.007579] ath10k_pci 0000:00:00.0: failed to get memcpy hi address for firmware address 8: -28
[   24.016666] ath10k_pci 0000:00:00.0: failed to dump debug log area: -28
[   24.023516] ath10k_pci 0000:00:00.0: failed to get memcpy hi address for firmware address 72: -28
[   24.032694] ath10k_pci 0000:00:00.0: failed to get memcpy hi address for firmware address 72: -28
[   24.041877] ath10k_pci 0000:00:00.0: failed to get memcpy hi address for firmware address 76: -28
[   24.051060] ath10k_pci 0000:00:00.0: failed to get memcpy hi address for firmware address 76: -28
[   24.060252] ath10k_pci 0000:00:00.0: failed to read firmware RAM BSS memory from 4286176 (22704 B): -28
[   24.069980] ath10k_pci 0000:00:00.0: failed to read firmware ROM BSS memory from 4197376 (11312 B): -28
[   27.354067] ath10k_pci 0000:00:00.0: cannot restart a device that hasn't been started

It is:

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.

Thanks. What is the best OpenWRT firmware to install on this router? I'm not sure 5 GHZ is needed but what's definitely needed is a GUI. How can I be sure I have enough RAM to install Luci on the latest snapshot I used?

According to the 842 page the router is equipped with 16 MB of flash and 128 MB of RAM but free -h shows only

              total        used        free      shared  buff/cache   available
Mem:         123288       15604       97496          68       10188       78740
Swap:             0           0           0

Does this command simply not show the amount of flash RAM? Or should I go back to a stable version and not use a snapshot? Apparently I still have a lot to learn about OpenWRT.

https://openwrt.org/toh/d-link/d-link_dir-842#installation

As long as the devicepage shows only "snapshot" as current release, there is only a snapshot image available. Snapshots come without LuCI, you have to install LuCI yourself.

I've installed Luci manually as tmomas suggested but I'm still confused about DHCP. As mentioned above the 842 acts as an access point that extends the main router's (AVM Fritzbox 7490) WLAN which apparently means I'm using bridged mode.

'Interfaces > LAN > General Settings > Protocol' is set to static address. 'Network > Interface' shows WAN and WAN6 on eth.02 with Protocol: DHCP client and 'Network > DHCP and DNS' has all boxes checked. So is the DHCP server enabled or not?

As we ware drifting further and further away from the initial topic, please open a new topic for your new questions.

Thanks!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.