D-Link open source switches: DGS 1210 product line

Dear friends,

DLink recently open-sourced some of their major switch products, see DLink opensource website.

I would like to point out this post, which I wrote about DLink DGS-1210 switch series.

This would be great to have access to cheap switches with 8 to 48 ports in LEDE. Those switches only support IPv4, therefore they are now widely available second hand no eBay ...

As I don't have any SPI analyser, I am giving you the link of my post, if you find it interesting, buy one of those switches and try to find the serial connection:


It should then be "relatively" easy to have them work.

I asked for help on DLink website:

Just in case some might help me the location of the serial console or SPI plug.

Why has this been posted in the "Community Builds" category?
As far as I can see this thread is about adding support for this device, right?

Thanks tmomas. I justed pushed in the right section "Developers".

Grab Dlink 1210 with ME index. It have console port.
ARMv7 with 112Mb memory and 32Mb flash.

You mean console port over Ethernet or console port on the motherboard? I am looking for the console port on the motherboard. Kind regards,

See datasheet image. Left RJ45 connector - RS232 port. Early firmware revisions allow access to unprotected bootloader. Now, bootloader is protected ;(

i see, this is this kind of cable:

I am looking for a serial plug on the motherboard.
Anyhow, these are good news.

I don't have the required hardware, i need to buy a jtag analyser.
or I will use a Raspberry Pie with tjtag-pi.

For what? Device based on custom? broadcom iProc SoC. You need soic8 clip and cheap SPI programmer based on CH341A to dump flash (MX25L25635E), modify squashfs stored in mtdblock3 (rootfs) and write it back.

Could you recommend me a cheap soic8 clip and programmer either on eBay or Amazon. I understand this is for dumping/reading flash. b

But do you know any tool that would help me find a serial console? Serial console is needed to dump caracteristics of the board and find drivers, etc ... I have a good working USB to ttl serial console tool, but after days and days, I never found a serial console. There must be some serial console somewhere.

I found this interesting post:

I have been looking for 4 pins:

i searched them in the same area, as there is ground and VCC everywhere on the board. Maybe I did not search very well and should reconsider my seach. Will get back.

this combo or this.
DON'T BUY "blue" or "green" borads, on it Chinese soldering cheapest voltage regulator instead of AMS1117-3.3 which able to provide current ~700 mA.

Buy logic analayzer - it really helps watching on multiple lines and decode protocols.

Don't know about cheap line DGS-1210, but in DGS-1210-x/ME - RJ45 console - mapped to /dev/ttyS0 and when kernel crashed - it show panics traces.

Inside switch nothing new - standard busybox, ISS.exe (main switch software), two proprietary broadcom kernel modules.

The GPL source code for the DGS-1210-ME is available here:

Scoll-down, select "Open Source" and choose your model.
The tarbal includes a build script to make the firmware;
Does not sound very "proprietary", but could be.

it even includes the build toolchain:

Install & Build

  1. Build Environment:
    1.1 CentOS 5.6 for 32-bit version, Ubuntu 10.4 for 32-bit version, fully install.
    1.2 You can open Terminal for using command line.
  1. Put "DGS-1210-10P-ME-GPLSourceCode.tar.gz" under /home and using command "tar -zxvf DGS-1210-10P-ME-GPLSourceCode.tar.gz" to untar it.

  2. Prepare for toolchain:
    3.1 Move /home/DGS-1210-10P-ME/toolchain/iproc_3.4.6 folder to /opt folder. (Ex. In /home/DGS-1210-10P-ME/, and using command "sudo mv toolchain/iproc_3.4.6 /opt")
    3.2 Change toolchain owner to root. (Ex. using command "sudo chown -R root:root /opt/iproc_3.4.6")

  3. Add yourself to the sudo list
    Edit "/etc/sudoers" to add your account to the sudoers.
    For example :

    This action is only allowed by super user, and the file "sudoers" is read-only.
    You must login in super user and change the file permission.
    Remember to change file permission back to 440 by command "chmod 440 /etc/sudoers".

  1. In /home/DGS-1210-10P-ME/,
    then type command "source build.env" then type "make GPL".

  2. After building finished, you can find /home/DGS-1210-10P-ME/image folder and firmware("DGS-1210-10P-ME-B1-OS.hex"), ("DGS-1210-10P-ME-B1-BOOT.hex").

Here is the build script:


Copyright (C) 2009 D-Link Corp./D-Link Systems, Inc.


DESCRIPTION : The makefile for builing the complete

Management Switch image files.

include ${MGM_PROJECT_BASE_DIR}/make.h

CP := cp
RM := rm
CAT := cat
GZIP := gzip
DD := dd

os_dir := os/linux-3.6.5_iProLDK_3.4.6

BOOT_ABSOLUTE_DIR := ${MGM_PROJECT_BASE_DIR}/boot/uboot-2012.10_iProLDK_3.4.6
OS_ABSOLUTE_DIR := ${MGM_PROJECT_BASE_DIR}/os/linux-3.6.5_iProLDK_3.4.6


IMGTAG := ${TOOL_DIR}/./imgtag
GEN_CHECKSUM := ${TOOL_DIR}/genTotalChecksum
IMGHDR := ${TOOL_DIR}/imghdr

HW_VER := B1

.PHONY: os

Check if "image" folder exists

if [ -d ${IMAGE_ABSOLUTE_DIR} ]; then
echo "image folder exists";
echo "no image folder exists";

change tool mod to 777

chmod 777 -R ${TOOL_DIR}

Make u-boot and copy ot to image dir

boot: check-image-folder
chmod 777 -R ${BOOT_ABSOLUTE_DIR}
${CP} ${BOOT_ABSOLUTE_DIR}/include/configs/cameo/smart5_series.h ${BOOT_ABSOLUTE_DIR}/include/configs/cameo/cameo_header.h
sed -i "s/hw_version=../hw_version=${HW_VER}/g" ${BOOT_ABSOLUTE_DIR}/include/configs/cameo/cameo_header.h
sed -i "s/#define BOARD_VERSION../#define BOARD_VERSION ${BOARD_VERSION}/g" ${BOOT_ABSOLUTE_DIR}/include/configs/cameo/cameo_header.h
make -w -C ${BOOT_ABSOLUTE_DIR} O=./build-output mdk-all
${CP} ${BOOT_ABSOLUTE_DIR}/build-output/u-boot.bin ${IMAGE_ABSOLUTE_DIR}/boot.bin

Make OS image and copy ot to image dir

os: check-image-folder
chmod 777 -R ${OS_ABSOLUTE_DIR}
cp ${OS_ABSOLUTE_DIR}/cameo/cameo.config/hurricane2_dgs_linux-3.6.5-flash.config ${OS_ABSOLUTE_DIR}/.config
make -w -C ${OS_ABSOLUTE_DIR} oldconfig
make -w -C ${OS_ABSOLUTE_DIR} zImage
if [ -f ${OS_ABSOLUTE_DIR}/arch/arm/boot/Image.gz ]; then
${RM} ${OS_ABSOLUTE_DIR}/arch/arm/boot/Image.gz;
gzip -9 ${OS_ABSOLUTE_DIR}/arch/arm/boot/Image
echo 'start address ${LOADADDR}' > ${IMAGE_ABSOLUTE_DIR}/vmlinux.dump
${TOOL_DIR}/mkimage -A arm -O linux -T kernel -n Image -a ${LOADADDR} -C gzip -d ${OS_ABSOLUTE_DIR}/arch/arm/boot/Image.gz ${IMAGE_ABSOLUTE_DIR}/vmlinux.gz

make -w -C ${OS_DIR} clean


Make relevant image information and attach


.PHONY: vmlinux-attach-version-checksum
${CP} ${IMAGE_ABSOLUTE_DIR}/vmlinux.gz ${IMAGE_ABSOLUTE_DIR}/vmlinux.tag
${CAT} ${IMAGE_ABSOLUTE_DIR}/vmlinux.tag ${IMAGE_ABSOLUTE_DIR}/vmlinux.sum > ${IMAGE_ABSOLUTE_DIR}/vmlinux.vc
${CP} ${IMAGE_ABSOLUTE_DIR}/vmlinux.vc ${IMAGE_ABSOLUTE_DIR}/vmlinux.ub
${RM} ${IMAGE_ABSOLUTE_DIR}/vmlinux.tag
${RM} ${IMAGE_ABSOLUTE_DIR}/vmlinux.sum

Make relevant image information and attach

${RM} ${IMAGE_ABSOLUTE_DIR}/boot.tag
${RM} ${IMAGE_ABSOLUTE_DIR}/boot.sum

Make bimage for update boot code only

bimage: boot-attach-version-checksum
${RM} -f ${IMAGE_ABSOLUTE_DIR}/bimage
${RM} -f ${IMAGE_ABSOLUTE_DIR}/boot.vc ${IMAGE_ABSOLUTE_DIR}/boot.bin
${RM} -f ${IMAGE_ABSOLUTE_DIR}/bimage

zimage: vmlinux-attach-version-checksum
${RM} -f ${IMAGE_ABSOLUTE_DIR}/zimage
${DD} if=${IMAGE_ABSOLUTE_DIR}/vmlinux.vc of=${IMAGE_ABSOLUTE_DIR}/zimage bs=1024
${RM} -f ${IMAGE_ABSOLUTE_DIR}/vmlinux.vc


Remove unnecessary files to save disk space


find ./image -path "./image/" ! -name ".hex" -exec rm -f {} ;
find ./ -name ".pfx" -delete
find ./ -name "
.spc" -delete
find ./ -name ".pvk" -delete
find ./ -name "
.tgz" -delete
find ./ -name ".gz" -delete
find ./ -name "
.xz" -delete
find ./ -name ".bz" -delete
find ./ -name "
.bz2" -delete
find ./ -name ".Z" -delete
find ./ -name "
.tar" -delete
find ./ -name ".lha" -delete
find ./ -name "
.cab" -delete
find ./ -name "*.z" -delete

GPL:check-image-folder change_tools os zimage boot bimage clear-file

Well ... I will sacrifice my switch: build from scratch using the toolchain. Hoping to add telnet or SSH to able to gain serial access ...

I am installaling the requested Ubuntu 10.04 i386 in KVM and trying to compile all firmwares to make them available.

Edit : Dlink has been working on different versions of the 1210P switch for more than 10 years. i am running the first version of the 1210P, firmware A1 and it compiles with ... Redhat9 or Fedora code 3. This is back in 2004!!! And we are in 2017 at the time of writing. This shows how important it would be to support a line of "old" switches and make run under LEDE. The kernel of my 1210P-A1 must be full of bugs ...DLink has so many different products that it can hardly upgrade them all ...

Anyway, it is great to see all this open-source. I will build all versions and make them available to allow flashing switches (I am still dreaming it is possible).

I had a lot of fun installing this old Fedora Core 3 and it made the job.
Hopefully, I have been using GNU/Linux since RH7...

Here is the build script:

The only problem is the last command to create an image. It fails with an error!

Furthermore, this image does not seem (?) to be usable. It is just a kernel build.
What would you recommend? Starting from scratch using kernel config and making a custom LEDE firmware?

I am quite lost, although this could be quite easy as this seems non-proprietary.
I really wonder why there is nearly zero unbricked DLink switch runnning under LEDE.

By the way, I really need serial console, because after/if loading finally LEDE, there will be probably zero network configuration, thus a need for a console ...

Apparently, the switch has an emergency TFTP boot procedure.
Also included partial .config file

Anyone interested, go ahead and buy one of those switches.
They are cheap ...

Example, in UK;

16 ports = 20 GDB + shipment

Before buying, verify that GPL source code is available:

Then contact me in this thread.

I will now try to compile a custom LEDE release for my D-Link switch.

Do I miss something or everything is available for a LEDE? What could happen worse now? What if I boot in LEDE and i don't have any network? What do you think of network and switch, is it well supported in your opinion?

Hi All.
Not sure if you are still interested by finding the serial console port...

I was playing with my DGS 1210-10P which has POE board broken. Yet, despite only the POE pcb (which is independent from the main pcb) the whole stuff refuse to boot correctly.
So I hack to find if I could simply configure somewhere there is no poe board...

Well the serial console is a RS232 one. CON2 is link to a ADM3202 RS232/TTL converter (at the back of the pcb)

115200 bauds. Uboot console available, just hit a key to stop the boot. Looks like being able to boot from nfs...



I am looking at getting one of these (1210-28P) and I would very much like to have OpenWrt on it. Has there been any progress on this?