D-Link DIR-2150 A1 support

OK, saved:

[  174.629945] mtdblock: MTD device 'Bootloader' is NAND, please consider using UBI block devices instead.
[  202.355041] mtdblock: MTD device 'config' is NAND, please consider using UBI block devices instead.
[  210.405171] mtdblock: MTD device 'factory' is NAND, please consider using UBI block devices instead.
[  216.092079] mtdblock: MTD device 'config2' is NAND, please consider using UBI block devices instead.
[  220.951717] mtdblock: MTD device 'firmware' is NAND, please consider using UBI block devices instead.
[  234.609166] mtdblock: MTD device 'kernel' is NAND, please consider using UBI block devices instead.
[  252.229547] mtdblock: MTD device 'rootfs' is NAND, please consider using UBI block devices instead.
[  284.701278] mtdblock: MTD device 'rootfs' is NAND, please consider using UBI block devices instead.
[  291.164853] mtdblock: MTD device 'rootfs_data' is NAND, please consider using UBI block devices instead.
[  314.446961] mtdblock: MTD device 'private' is NAND, please consider using UBI block devices instead.
[  340.594429] mtdblock: MTD device 'firmware2' is NAND, please consider using UBI block devices instead.
[  368.441647] mtdblock: MTD device 'mydlink' is NAND, please consider using UBI block devices instead.
[  382.526728] mtdblock: MTD device 'reserved' is NAND, please consider using UBI block devices instead.

From Luci of course.
What's next?

well if you look into Firmware you should have backup of the dlink unencrypted firmware
usually need to remove lots of 0xff off the end of the the memory dunp
but should end up with a recovery file for the dlink firmware
should look kinda like the openwrt factory firmware
well the header at lest

presuming you have this file and others just in case you can now flash openwrt factory file

You mean OpenWrt.mtd4.bin (because it starts from 0)?

Should I edit this 40MB file?
If yes, then which program should I use on Linux?

yes mtd4 and really mtd8 should be a 2nd copy
not sure what hex editor is on linux I manly use windows
only use linux when I have to like openwrt compiling

So now I should just keep this files and forget about them for a while, and flash factory?

When I try to do it says this:

I've tried to upload this file:
openwrt-ramips-mt7621-dlink_dir-2150-a1-squashfs-factory
It appeared after compiling with your instructions.
In the folder: /home/b/openwrt/bin/targets/ramips/mt7621/

the recover interface is the way to upload the factory file
I'm not sure a sysupgrade will work from the "initramfs-kernel"
due to the UBI partition is not formatted
better to use the recover interface
it's how you will recover if needed anyway

Please choose the operation:
1: Load system code to SDRAM via TFTP.
2: Load system code then write to Flash via TFTP.
3: Boot system code via Flash (default).
4: Entr boot command line interface.
6: System Enter UBoot to Update Img.
7: Load Boot Loader code then write to Flash via Serial.
9: Load Boot Loader code then write to Flash via TFTP.

So, option 9?

No don't write the boot loader that would be bad you don't want to break that
option 2 would also work
better to use the recover interface due to it checking checksums

OK, thanks! I'm on it.

OK, it took the file:
openwrt-ramips-mt7621-dlink_dir-2150-a1-squashfs-factory.bin

And it then started router and I was able to enter Luci interface on 192.168.1.1

First of course I spammed "2" key and it asked me if I'm sure, so I pressed "Y" and enter.

"this firmware is so close to its brothers
my self i would compile what you have
use that it get passed the initial recover image signature requirements
then force sysupgrade to the dir-1960-A1 release
add then manually add the missing 2.4G driver"

OK, so it's working normally, no need for 2.4 driver (I see both interfaces in "Wireless section"?
I will report my experience with it. Thanks so much for help!

The first major thing I spotted which makes router unusable is the Tx Power of the 5GHz interface:
image

Where in other routers the maximum is 1000mW.

Can I force it for more power?
BTW, already checked different countries and the same power, only 3mW max...

1 Like

This looks like incorrect calibration data: mt76 uses the "factory" mtd partition for calibration data. Can you dump that partition and see if two bytes at the start are 0x76 and 0x03 and also at offset 0x8000 the two bytes should be 0x76 and 0x15.

that sounds weird
what's it's say the wifi interfaces are ?
I imagine they are the same as below

Radio0 = MediaTek MT7603E 802.11b/g/n
Radio1 = MediaTek MT7615E 802.11ac/n

I would have guess the the 5G would be fine but the 2.4G would nee you to load it's driver

zekica is correct as a next step we need to look at the hex data in the MTD2 "factory" file
as this defines what type of radios and all the power limits & settings for each radio

It's my first time using hex editor, and this is probably the shorten version without zeros from hexdump -C in Linux:

00000000  03 76 0b 00 00 0c 43 26  60 00 03 76 c3 14 ff ff  |.v....C&`..v....|
00000010  ff ff 03 76 c3 14 00 00  00 00 00 00 00 00 00 00  |...v............|
00000020  00 00 b0 07 80 00 60 7f  fd 9b ff ff ff ff ff ff  |......`.........|
00000030  ff ff ff ff 22 34 00 20  ff ff 00 01 00 00 00 00  |...."4. ........|
00000040  00 00 22 00 00 00 00 00  00 00 00 00 00 00 e0 01  |..".............|
00000050  80 00 00 94 40 bf 40 c8  22 81 81 81 40 c8 22 c1  |....@.@."...@.".|
00000060  c1 c1 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000070  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
000000a0  c8 c8 c6 c6 c4 c1 c0 c6  c6 c6 c2 c0 c0 80 00 00  |................|
000000b0  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
000000f0  05 00 23 00 ae 00 cd 88  00 00 00 00 00 00 00 00  |..#.............|
00000100  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00000120  00 00 00 00 00 00 00 00  00 00 00 00 00 00 ff 20  |............... |
00000130  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00008000  15 76 a0 00 00 22 33 44  aa d0 15 76 c3 14 00 80  |.v..."3D...v....|
00008010  02 00 c3 14 15 76 03 22  ff ff 23 04 0d 02 8f 02  |.....v."..#.....|
00008020  00 80 0a 20 00 00 00 00  00 00 00 00 00 00 00 00  |... ............|
00008030  20 00 00 00 44 00 00 60  01 01 00 00 00 00 00 00  | ...D..`........|
00008040  00 00 44 00 04 00 00 00  00 00 00 00 00 00 e0 01  |..D.............|
00008050  20 20 00 b3 40 be 40 c4  24 81 81 81 c0 c3 24 c1  |  ..@.@.$.....$.|
00008060  c1 c1 c0 c4 24 00 00 00  40 c4 24 c1 c1 c1 40 c5  |....$...@.$...@.|
00008070  22 82 82 c0 c4 22 82 82  c0 c3 22 82 82 40 c3 22  |"...."...."..@."|
00008080  81 81 40 c2 22 80 80 40  c2 22 80 80 40 c2 22 80  |..@."..@."..@.".|
00008090  80 c0 c2 22 c1 c1 40 c3  22 81 81 40 c3 22 80 80  |..."..@."..@."..|
000080a0  40 c3 22 82 82 c0 c2 22  81 81 40 c2 22 81 81 c0  |@."...."..@."...|
000080b0  c1 22 81 81 40 c1 22 c2  c2 c0 c0 22 c4 c4 c8 c6  |."..@."...."....|
000080c0  c6 c4 c4 00 00 c6 00 c6  c4 c4 00 82 84 c6 c6 c4  |................|
000080d0  00 00 82 00 00 c5 c5 c5  00 00 c3 00 c3 c3 82 82  |................|
000080e0  80 82 84 c3 c3 c3 82 82  80 80 80 82 82 00 00 00  |................|
000080f0  85 00 00 22 c2 00 d2 87  00 00 00 00 00 00 00 87  |..."............|
00008100  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00008110  09 a4 c3 39 8f 48 d1 d1  c5 00 00 00 00 00 00 00  |...9.H..........|
00008120  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00008140  40 c1 22 81 81 c0 c1 22  81 81 40 c1 22 80 80 40  |@."...."..@."..@|
00008150  c1 22 80 80 40 c1 22 80  80 c0 c0 22 81 81 c0 c0  |."..@."...."....|
00008160  22 c1 c1 c0 c0 22 c1 c1  c0 c5 22 82 82 40 c5 22  |"...."...."..@."|
00008170  82 82 40 c4 22 81 81 c0  c3 22 81 81 40 c3 22 81  |..@."...."..@.".|
00008180  81 c0 c2 22 82 82 c0 c2  22 81 81 c0 c2 22 81 81  |..."...."...."..|
00008190  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000081b0  00 00 00 00 00 84 85 85  00 00 00 00 00 00 00 00  |................|
000081c0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00008220  00 06 1e 00 06 1f 00 06  1e 00 06 26 f4 b6 4e 00  |...........&..N.|
00008230  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000082a0  00 00 00 00 00 00 00 00  00 00 09 f4 00 0f f4 00  |................|
000082b0  16 fa 00 0b f7 00 00 00  00 00 00 28 0b 0b 00 00  |...........(....|
000082c0  00 00 00 00 00 00 00 00  09 03 00 08 02 00 0c 08  |................|
000082d0  00 0b 05 00 00 00 00 00  00 3e 22 f0 00 00 00 00  |.........>".....|
000082e0  00 00 00 00 00 00 15 0f  00 14 0e 00 19 14 00 15  |................|
000082f0  0e 00 00 00 00 00 00 29  24 9c 00 00 00 00 00 00  |.......)$.......|
00008300  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00008340  00 16 10 00 15 0e 00 18  11 00 1c 15 00 00 00 00  |................|
00008350  00 00 fd e8 ec 00 00 00  00 00 00 00 00 00 00 00  |................|
00008360  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000083a0  00 00 00 00 00 00 00 00  00 00 00 00 07 03 f1 03  |................|
000083b0  f1 03 f1 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000083c0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00008400  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
0000e000  a8 63 7d 94 16 bf ff ff  ff ff ff ff ff ff ff ff  |.c}.............|
0000e010  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00040000
00000000  03 76 0b 00 00 0c 43 26  60 00 03 76 c3 14 ff ff  |.v....C&`..v....|
00000010  ff ff 03 76 c3 14 00 00  00 00 00 00 00 00 00 00  |...v............|
00000020  00 00 b0 07 80 00 60 7f  fd 9b ff ff ff ff ff ff  |......`.........|
00000030  ff ff ff ff 22 34 00 20  ff ff 00 01 00 00 00 00  |...."4. ........|
00000040  00 00 22 00 00 00 00 00  00 00 00 00 00 00 e0 01  |..".............|
00000050  80 00 00 94 40 bf 40 c8  22 81 81 81 40 c8 22 c1  |....@.@."...@.".|
00000060  c1 c1 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000070  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
000000a0  c8 c8 c6 c6 c4 c1 c0 c6  c6 c6 c2 c0 c0 80 00 00  |................|
000000b0  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
000000f0  05 00 23 00 ae 00 cd 88  00 00 00 00 00 00 00 00  |..#.............|
00000100  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00000120  00 00 00 00 00 00 00 00  00 00 00 00 00 00 ff 20  |............... |
00000130  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00008000  15 76 a0 00 00 22 33 44  aa d0 15 76 c3 14 00 80  |.v..."3D...v....|
00008010  02 00 c3 14 15 76 03 22  ff ff 23 04 0d 02 8f 02  |.....v."..#.....|
00008020  00 80 0a 20 00 00 00 00  00 00 00 00 00 00 00 00  |... ............|
00008030  20 00 00 00 44 00 00 60  01 01 00 00 00 00 00 00  | ...D..`........|
00008040  00 00 44 00 04 00 00 00  00 00 00 00 00 00 e0 01  |..D.............|
00008050  20 20 00 b3 40 be 40 c4  24 81 81 81 c0 c3 24 c1  |  ..@.@.$.....$.|
00008060  c1 c1 c0 c4 24 00 00 00  40 c4 24 c1 c1 c1 40 c5  |....$...@.$...@.|
00008070  22 82 82 c0 c4 22 82 82  c0 c3 22 82 82 40 c3 22  |"...."...."..@."|
00008080  81 81 40 c2 22 80 80 40  c2 22 80 80 40 c2 22 80  |..@."..@."..@.".|
00008090  80 c0 c2 22 c1 c1 40 c3  22 81 81 40 c3 22 80 80  |..."..@."..@."..|
000080a0  40 c3 22 82 82 c0 c2 22  81 81 40 c2 22 81 81 c0  |@."...."..@."...|
000080b0  c1 22 81 81 40 c1 22 c2  c2 c0 c0 22 c4 c4 c8 c6  |."..@."...."....|
000080c0  c6 c4 c4 00 00 c6 00 c6  c4 c4 00 82 84 c6 c6 c4  |................|
000080d0  00 00 82 00 00 c5 c5 c5  00 00 c3 00 c3 c3 82 82  |................|
000080e0  80 82 84 c3 c3 c3 82 82  80 80 80 82 82 00 00 00  |................|
000080f0  85 00 00 22 c2 00 d2 87  00 00 00 00 00 00 00 87  |..."............|
00008100  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00008110  09 a4 c3 39 8f 48 d1 d1  c5 00 00 00 00 00 00 00  |...9.H..........|
00008120  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00008140  40 c1 22 81 81 c0 c1 22  81 81 40 c1 22 80 80 40  |@."...."..@."..@|
00008150  c1 22 80 80 40 c1 22 80  80 c0 c0 22 81 81 c0 c0  |."..@."...."....|
00008160  22 c1 c1 c0 c0 22 c1 c1  c0 c5 22 82 82 40 c5 22  |"...."...."..@."|
00008170  82 82 40 c4 22 81 81 c0  c3 22 81 81 40 c3 22 81  |..@."...."..@.".|
00008180  81 c0 c2 22 82 82 c0 c2  22 81 81 c0 c2 22 81 81  |..."...."...."..|
00008190  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000081b0  00 00 00 00 00 84 85 85  00 00 00 00 00 00 00 00  |................|
000081c0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00008220  00 06 1e 00 06 1f 00 06  1e 00 06 26 f4 b6 4e 00  |...........&..N.|
00008230  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000082a0  00 00 00 00 00 00 00 00  00 00 09 f4 00 0f f4 00  |................|
000082b0  16 fa 00 0b f7 00 00 00  00 00 00 28 0b 0b 00 00  |...........(....|
000082c0  00 00 00 00 00 00 00 00  09 03 00 08 02 00 0c 08  |................|
000082d0  00 0b 05 00 00 00 00 00  00 3e 22 f0 00 00 00 00  |.........>".....|
000082e0  00 00 00 00 00 00 15 0f  00 14 0e 00 19 14 00 15  |................|
000082f0  0e 00 00 00 00 00 00 29  24 9c 00 00 00 00 00 00  |.......)$.......|
00008300  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00008340  00 16 10 00 15 0e 00 18  11 00 1c 15 00 00 00 00  |................|
00008350  00 00 fd e8 ec 00 00 00  00 00 00 00 00 00 00 00  |................|
00008360  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000083a0  00 00 00 00 00 00 00 00  00 00 00 00 07 03 f1 03  |................|
000083b0  f1 03 f1 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000083c0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00008400  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
0000e000  a8 63 7d 94 16 bf ff ff  ff ff ff ff ff ff ff ff  |.c}.............|
0000e010  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00040000

The file is OpenWrt.mtd2.bin, generated from current installed OpenWrt from Lucky1's git. Compared with original factory file, has the same structure and size as when generated at the beginning with OpenWrt ran from initramfs. Both files are basically the same.

Maybe to speedup the process and testing. How do I install different version of the 5GHz driver in this router? I've searched in "Software" section, but don't have many options to choose.

***Added thoughts:
Is it possible that there was a bug in original firmware? Because I remember when was testing it on original firmware, and from probably 10 meters behind only one wall it was switching from 5GHz to 2.4GHz on my mobile.

yes 1st radio is 03 76 so MT7603 & 15 76 so MT7615

1 Like

What does it mean? What is the solution?
P.S
I added some thoughts in my previous post.

did you try & install the kmod-mt7603 Driver ?

I found the dlink software horrible anyway so i didn't keep it long
I think there may be a problem with not having the full driver installed
there is a few parts i'm looking it up now what they are there maybe firmware files as well

Should I first uninstall the previous drivers?

no you still need the MT7615 for the 5G radio
they have just added some changes but i can't see how it would be a problem
that the radio flash area is bigger the needed

kmod-mt7603 5.15.135+2023-09-18-2afc7285-1 96.90 KiB MediaTek MT7603 wireless driver Installed

Already installed, I did nothing.