Adding OpenWrt support for DIR-3060

This would be the DBDC card. Unfortunately with Luci it does not work well with it.

You will need to edit /etc/config/wireless and do it manually.

This is an example.

config wifi-device 'radio0'
	option type 'mac80211'
	option phy 'phy0'
	option htmode 'HT40'
	option hwmode '11g'
	option country 'US'
	option channel '1'
	option cell_density '0'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'lan'
	option mode 'ap'
	option ssid 'Openwrt2G'
	option encryption 'psk2+ccmp'
	option key 'password'

config wifi-device 'radio1'
	option type 'mac80211'
	option phy 'phy1'
	option htmode 'VHT80'                                            
        option hwmode '11a' 
        option country 'US'    
        option channel '36'     
        option cell_density '0' 

config wifi-iface 'default_radio1'
	option device 'radio1'
	option network 'lan'
	option mode 'ap'
	option ssid 'Openwrt5G'
	option encryption 'psk2+ccmp'
	option key 'password'

yay radio at lest
Kar200 would know lots more then me about the DBDC radio side
that side of the driver I guess is still in the works tho it's been a while now
not sure what's next
gpio's have to be tested / confirmed
but really someone has to flash a board
do some polishing off
and then create a pull request

here is what is done so far

@Lucky1 -i'm gearing up to flash.....
there are no fw commands in the initramfs image. before i flash, i'd like to get the openwrt fw_printenv / setenv tools working. i think this requires some extra configuration.
@kar200 - my initial attempts at modifying /etc/config/wireless for radio2 were not successful. i think it has to do witht the pcie configuration for the radio. i'm trying to work through this.

thank you all for your help

if it's what I'm thinking you access the uboot environment variables in u boot it's the command line option in that boot menu
tho I don't think openwrt used them at all after boot

I think there is a way to do this in openwrt but it's not setup & not sure what you want to change tho

I think you have to have flashed the board to save setting like the wireless file

it's the factory file you flash BTW

Can you please post here the wireless file that you get when you first flash the router?

From the screenshot in Luci it seems that the first and third wireless card are the DBDC ones.

If you post the content of the wireless file I can give you an example to try and just paste into the file and test again.

After you modify you can run

#wifi down
#wifi up

ok i'll give it a shot.
do you know where a can get the oem firmware to flash by this method ? the images on their support site only work for updateing the oem firmware, not for initial flash.

you saved a copy of what was there
I think it's MTD4 it's 40,960KB
tho i would look in a hex editor & trim it down & remove all the FF's off the end
you file will end up about 17-18M

done!
your 4.23 factory image flashed successfully. the bootlog is here:
dir-3060 openwrt 4.23 initial flash
i'll try to keep going with an directives.
thanks

Or use this to decrypt the OEM image. Actually the guy used the DIR-3060 for his example.

if you get a chance I'm still wondering if i need the GPIO'S
I put into 2021.04.21 are needed
so 2021.04.21 has them
2021.04.20 don't
and they have newer firmware then 2021.04.23
as i had to backdate openwrt to make that initramfs image
the upgrade & factory files are ok just initramfs didn't get the drivers

it's think it's all going well so far :slight_smile:

only thing i see in the log is
leds-gpio: probe of leds failed with error -16

@lucky -
neither of the 4.20 or 4.21 factory firmwares had gpio functions for LEDs that worked.
i'll probe around.
findings:
the wps button doesnt signal anything
the reset button triggers an immediate reboot

Reset is correct for immediate reboot. If you hold it down it should reset the device.
WPS is not used by default in openwrt. It needs to be added (there is a how to somewhere)

good to know DBDC isn't annoying just for non-openwrt.

how does DBDC work when you're using the dual band on a single radio?

i'm pretty sure each band gets two streams, right?

that's why i held off on saying my build works for the 3060 because i suspect people want that third radio/band. otherwise they would have gotten a 2660/2460

That's a good question but a bit too technical for me :slight_smile:

I am using the device as my main router at the moment (I have a wrt3200acm as stby at the moment) and it seems to perform well actually. I have compiled the latest image as of yesterday with the 5.11 kernel and so far so good.

My testing is only home use really and some iperf3 tests. I get around 450mbs on 5G and 100mbs on 2g.

the stock firmware should outperform those numbers quite well, but i know that it's not the best in terms of features and accessibility so you can't be faulted for looking forward to an openwrt release.

I did not test stock that much but I did with padavan which uses MTK drivers. They definately outperform this especially with HW NAT enabled on both Ethernet and wireless.

I could get a bit more than 700mbs with htop showing hardly any cpu usage. I still think openwrt is better in terms of versatility and since these Nand Dlink devices have a firmware partition of 40mb you can fit a lot of extra packages.

for sure.

ya these things with HW_NAT and the proprietary driver are so awesome (no offence intended towards openwrt's mt76 driver).

i'm pulling 500Mbps up/down on my BCM43602CDP from about 15 feet and a 2 foot thick floor (with some ducts and crap in between) so i'm happy. i wish it could be better but i suspect the 30 year old house and suboptimal apple wireless stack have something to do with it.

i know i'm missing the 'best' model out of the lineup in my build, but i agree with your reasoning and you can't be faulted.

DBDC is just so freaking annoying when it comes to configuration with the proprietary driver. it merges configuration files. so if you want to build with DBDC it uses different names for the dat files than if you build without it.

not only that, i have to figure out if i can automate the dd-wrt build process so the GUI will add a new wireless radio field when DBDC is on, which would make the process easy.

this thread has got me thinking about it, though. i may just give it a good solid think-through today and see what i can produce. since the 882 is double DBDC (if i want it, which right now i don't since i am pretty sure it splits the 4x4 into 2x2 when you do it), i'd be able to test any solution on my own.

solid thread, and good job @lucky1 @ghoffman @kar200

I don't think the DIR-882 had DBDC (@Lucky1 can confirm this).

Most of the work has been done for DBDC proprietary driver. Again I have a sound but limited knowledge so I try and study what has been done and use it. You should give padavan a go.

This is how I compiled padavan for my device. Only issue is that the script produces an image with a standard uboot header. Even worse I used the option to have kernel and rootfs in ram and for some reason the script is missing some of the kernel modules.

What I did was build the first time. Then manually re run the make commands and finally got a zimage.lzma.

After that I just compiled quickly the mkimage binary from the dlink opensource website and just run the same command. I ended up with a working image that actually works very well.

If you are going to go this route for any of the Nand flash devices please look at the kernel paritition layout in my github for DIR-853 as I think nearly all devices (if not all) they have been using in padavan are not Nand flash.

the dir-878/882 is not "Dual Band Dual Concurrent" on a single MT7615 chip
tho I think is would be good to able to split it into 2 radios like 80+80 even if only 877Mhz each
& use 2 channels :slight_smile:
I don't think you can tho

good to hear the LED's worked ok
did the wifi work in 4.20 ?