Support for DIR-878

Just got a new DIR-878 here, setting up a build environment and happy to test!

1 Like

@Lucky1 Would you mind sharing your diffconfig? I have been trying multiple of my own builds (with UCI presets, without, default settings, ...) and they all seem to boot but no connectivity. Device has no serial pins either so I can't hook up a cable to see what's going on.

Just gave your build from April 28th a shot and that one works fine.

Thank you!

I had to look at what diffconfig was
but after running scripts/diffconfig.sh >mydiffconfig
I get http://luckys.onmypc.net/DIR-878/2020-04-28/mydiffconfig

if you can send me a firmware file i'll have a look at it's serial output

1 Like

Thanks man. I have two images here:

  • One with a modified .config (my default config - a multi-device one that also builds RT-AC57U and DIR-860L A1 images; works fine on the latter, former untested);
  • One based on a vanilla single-device config (remove .config, run make menuconfig, select DIR-878 A1, build image).

your images have the old network file that's why you can't connect

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd14:b588:25e1::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0.1'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wan'
        option ifname 'eth0.2'
        option proto 'dhcp'

config interface 'wan6'
        option ifname 'eth0.2'
        option proto 'dhcpv6'

the new one looks like this

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fdb8:e1fc:39c9::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'lan1 lan2 lan3 lan4'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wan'
        option ifname 'wan'
        option proto 'dhcp'

config interface 'wan6'
        option ifname 'wan'
        option proto 'dhcpv6'

Running the latest openwrt master + DIR-878 PR + LED patch, all good here, will see if it's stable...

2 Likes

@Lucky1 Thanks... Effing weird :unamused:

you must have an old "target\linux\ramips\mt7621\base-files\etc\board.d\02_network" file at lest
:slight_smile:

1 Like

Running stable on DIR-878 for a couple of days now... However I noticed an exception in the kernel:

[70996.601626] ------------[ cut here ]------------
[70996.611020] WARNING: CPU: 0 PID: 0 at backports-5.4.27-1/net/mac80211/sta_info.c:1937 ieee80211_sta_update_pending_airtime+0x22c/0x234 [mac80211]
[70996.637018] STA 44:4a:db:64:df:be AC 2 txq pending airtime underflow: 4294967244, 52
[70996.637023] Modules linked in: pppoe ppp_async iptable_nat xt_state xt_nat xt_conntrack xt_REDIRECT xt_MASQUERADE xt_FLOWOFFLOAD pppox ppp_generic nf_nat nf_flow_table_hw nf_flow_table nf_conntrack_rtcache nf_conntrack mt7615e mt7615_common mt76 mac80211 ipt_REJECT cfg80211 xt_time xt_tcpudp xt_multiport xt_mark xt_mac xt_limit xt_comment xt_TCPMSS xt_LOG slhc nf_reject_ipv4 nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 iptable_mangle iptable_filter ip_tables crc_ccitt compat ledtrig_heartbeat nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 leds_gpio gpio_button_hotplug
[70996.762240] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.4.35 #0
[70996.774006] Stack : 87381e60 800772d4 80670000 806699ec 806d0000 806699b4 80668b08 87c0dc44
[70996.790623]         80810000 806b11c4 806b0d03 80601e48 00000000 00000001 87c0dbe8 36419b97
[70996.807236]         00000000 00000000 80850000 00000000 00000030 00000204 342e3520 2035332e
[70996.823847]         00000000 00000dcc 00000000 000ba180 00000000 806d0000 00000000 86c88790
[70996.840458]         00000009 00000000 00000000 00000000 00000002 803239b8 00000000 80810000
[70996.857070]         ...
[70996.861921] Call Trace:
[70996.866796] [<8000b72c>] show_stack+0x30/0x100
[70996.875630] [<8054b424>] dump_stack+0xa4/0xdc
[70996.884295] [<80028058>] __warn+0xc0/0x10c
[70996.892432] [<80028130>] warn_slowpath_fmt+0x8c/0xac
[70996.902345] [<86c88790>] ieee80211_sta_update_pending_airtime+0x22c/0x234 [mac80211]
[70996.917791] [<86c81ebc>] ieee80211_report_low_ack+0xf0/0x43c [mac80211]
[70996.930991] [<86c82220>] ieee80211_free_txskb+0x18/0x30 [mac80211]
[70996.943318] [<873953cc>] mt76_tx_complete_skb+0xa8/0xbc [mt76]
[70996.954930] [<87379eb8>] mt7615_txp_skb_unmap+0x1f0/0x22c [mt7615_common]
[70996.968650] ---[ end trace 19133fa85eae728f ]---

Not sure if it has any real impact...

Well this looks like something with the wireless stack or mt76 driver... and those are both backports. Might be helpful to open a bug report (and clarify the exact OpenWrt build you're running, since mt76 got bumped on master exactly three days ago).

Looks like it's the same issue as these guys: https://github.com/openwrt/mt76/issues/385, and I get the disconnections on my phone too, but laptop is fine.

1 Like

For those interested, I figured out the curl command to work around the finicky 'Emergency Room' U-Boot recovery this device has. A bit of digging shows the web interface is a bit picky with about the HTTP content type used (application/octet-stream).

curl -v -i -F "firmware=@openwrt-ramips-mt7621-dlink_dir-878-a1-squashfs-factory.bin" 192.168.0.1

This should help you out on Linux in case you cannot switch to a browser on Windows.

3 Likes

Thanks a lot for your work guys and especially lucky for sharing your changes on github.

I have a DIR-853 A3 which looks to be a rebranded DIR-1360 for a specific ISP.

I am no expert and just an old linux enthusiast but I managed to read through the changes and adapt them to this model.

Main difference is the flash. It's a 256 Nand flash. I used a bit of mix and match from Mir3g and luckys git and created a dts file. I do have a system that boots but getting some kernel errors regarding jffs and the root system doesn't get mounted at the end.

Cab you confirm the wireless is working with the latest source? I don't seem to get it on mine for some reason but I might have messed up sth in the build process.

K.

I have the same issue with my device and manged to wreck one of them (bought another one second hand) just to carry on by trying to remove the solder.

I still manage to access the console and flash from there (as the emergency room doesn't work with the reset button on my device)

What you can do if you only need to read the console output is to use GND with on of the 3 metal thingy around the buttons and connect only the RXD on your TTL to the second pin from the right. You will be able to at least have the serial output.

1 Like

For anyone interested, "official" snapshot builds for the DIR-878 are now available...

Hi, can someone dump stock bootloader?
some month ago i'm flashing the bootloader with "Breed bootloader" and kinda stuck can't back to original dlink's bootloader because seems like dlink isnt include bootloader on firmware update.

thanks

Here is it. It's from DIR-882 but AFAICT the bootloader is the same on DIR-867/878/882...

thanks, work as expected
Capture

Can Dir-878 act as a router/switch, where I can assign Lan ports as wan ports, to be able to use it with mwan3 or mptcp?

it's using DSA you have 5 ports labeled WAN LAN1 LAN2 LAN3 & LAN4
if you want to change LAN4 remove it form you lan interface
create a new interface & add LAN4 to that

1 Like