OpenWrt installation on D-link DGS-1210-16

Hi,
I have recently bought the switch DGS-1210-16 https://openwrt.org/toh/hwdata/d-link/d-link_dgs-1210-16 in order to eventually run OpenWrt on it, like I have been doing with my TP-Link AccessPoint for years.
Unfortunately it seems, that OpenWrt currently can#t be flashed from the web UI, nor via TFTP (I have tried with both the 21.02 rc1 and the snapshot release).
I would avoid opening the case and void warranty if possible.
Does anyone have an idea, what might need to be changed in the binary to get the D-link software to accept it, like it seems to be the case for the sister model https://openwrt.org/toh/hwdata/d-link/d-link_dgs-1210-28
I am happy to help testing to flash modified binaries.

Thanks
fireburner

Just to confirm the obvious first, which exact hardware revision?

1 Like

Sorry forgot to add it. It is G1.

It's at least Realtek based, so it should be possible - but I guess you will need serial console access. Installation should be similar to https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=b5bd945733a7ed235777c2ceaa0ff27dc779630f

1 Like

Well on that git commit, it actually says, that the sysupgrade can be flashed directly from the OEMs web UI. So I was hoping we could eventually find a way without opening the device.
But let's see, if someone has an idea why this model doesn't accept the OpenWrt sysupgrade, while the DGS-1210-28 does.

okay, you are right, that's just the procedure to flash openwrt, once the switch has bootet into the initram openwrt that booted through the console.

To give you a short update:
I finally opened the case and I tried to remove the circuit board, but it seems there more screws hidden below the heat spreader, so I tried if I can use the serial console without soldering (I did not want to remove the heat spreader).
I connected my UART module with a cable to a 4-pin header, which I could stick into the 4 serial console port wholes. That way I can access the serial console without needing to solder the header to it. One sometimes might need to apoply a little presure to the cable/header in order to get the pins to have contact. But for the little it is needed, I had no issues.

I used picocom from my Debian to connect to the UART module
I could interupt the u-boot by pressing ESC (the output after powering the switch will tell you when to).
Afterwards one needs to press CTRL +C to get a full u-boot console.
Then use the command "rtk network on" to turn on the network on the switch.
Then prepare a tftp server with the openwrt initramfs-kernel biunary and connect it via lan to any of the ports. I am not sure if the ip needs to be in the 10.90.90.0/24 network or if any would do.
In the serial console type "tftpboot 0x8f000000 :"
is the ip of the tftp server (it didn't work without for me)
is the initramfs-kernel binary name
Afterwards the binary can be booted with "bootm".

This worked without any issues. I have access via the serial console to the booted openwrt.
However I failed to connect to the openwrt via ssh. I have connected to port1 and set up my machine with vlan100. (all realtek devices seem to only be accessible via vlan100 on port1)
I tested the vlan100 setup on my laptop with another openwrt device where I configured vlan100 and successful could used it. So the laptop setup with vlan100 should be correct.
However I am not able to to ping 192.168.1.1 or ssh into it. (the laptop has an ip from the ramnge 192.168.1.0/24 on the vlan100 interface)
Does anyone have an idea what could be wrong on the switch image?

That is the reason why I did not yet flash openwrt to it, but only booted openwrt from memory.

I have no idea why I couldn't access the switch via port1 via vlan100.
I just added a different port to the LAN network and removed it from WAN and tada, I could access the switch.
I am now running OpenWrt 21.02 rc2 on the switch, which is very nice.
Also adding additional networks with vlans did work (LUCI is not yet able to handle the DSA switch, which means one needs to edit /etc/config/network.

At some point I need to check what was wrong with the vlan100 approach.

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.

It seems that something is strange with port1, which explains, why I couldn't access it via vlan100. Someone else was having the same issues with port1: Support for RTL838x based managed switches - #355 by sven

So the solution is:
Add any other port to the LAN vlan via the console (edit /etc/config/network and afterwards restart the service with "/etc/init.d/network restart") and you will be able to access Lucy normally.

The installation instruction can now be found here: https://openwrt.org/toh/d-link/dgs-1210-16_g1

1 Like

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