TP-Link TL-SG2210P v3

Under Construction!
This page is currently under construction. You can edit the article to help completing it.

The TP-Link TL-SG2210P v3 is an RTL8380M based switch with two SFP slots, and PoE 802.3af on all eight RJ-45 ports.

Generic Router

Install OpenWrt (generic explanation)

FIXME Please add the installation procedure here.

FIXME Find out flash layout, then add the flash layout table here (copy, paste, modify the example).

Please check out the article Flash layout. It contains examples and explanations that describe how to document the flash layout.

There is no known way to install OpenWRT from the OEM firmware. Use the TFTP method below.

The U-Boot firmware drops to a TP-Link specific “BOOTUTIL” shell at 38400 baud. There is no known way to exit out of this shell, and no way to do anything useful.

Ideally, one would trick the bootloader into flashing the sysupgrade image first. However, if the image exceeds 6MiB in size, it will not work. To install OpenWRT:

Prepare a tftp server with:

  1. server address: 192.168.0.146
  2. the image as: “uImage.img”

Power on device, and stop boot by pressing any key. Once the shell is active:

  1. Ground out the CLK (pin 16) of the ROM (U6)
  2. Select option “3. Start”
  3. Bootloader notes that “The kernel has been damaged!”
  4. Release CLK as soon as bootloader thinks image is corrupted.
  5. Bootloader enters automatic recovery -- details printed on console
  6. Watch as the bootloader flashes and boots OpenWRT.

Front:
Insert photo of front of the casing

Back:
Insert photo of back of the casing

Backside label:
Insert photo of backside label

Note: This will void your warranty!

FIXME Describe what needs to be done to open the device, e.g. remove rubber feet, adhesive labels, screws, ...

  • To remove the cover and open the device, do a/b/c

Main PCB:
Insert photo of PCB

port.serial general information about the serial port, serial port cable, etc.

How to connect to the Serial Port of this specific device:
Insert photo of PCB with markings for serial port

FIXME Replace EXAMPLE by real values.

Serial connection parameters
for TP-Link TL-SG2210P v3
38400, 8N1, 3.3V

No known JTAG port is present on this device.

None so far.

Space for additional notes, links to forum threads or other resources.

Power over Ethernet control

By default, PoE is disabled. To enable PoE on boot, first install i2c-tools, then edit /etc/rc.local and add the following lines:

echo 0-0030 > /sys/bus/i2c/drivers/tps23861/unbind 
i2cset -y 0 0x30 0x12 0xff
echo tps23861 0x28 > /sys/bus/i2c/devices/i2c-0/new_device 

for poe_enable in $(ls /sys/class/hwmon/hwmon*/in*_enable); do
        echo 1 > $poe_enable
done

exit 0

LED control

To enable the status LEDs automatically on boot, copy the following to /etc/init.d/realtek_leds and run

 /etc/init.d/realtek_leds enable 
#!/bin/sh /etc/rc.common

START=11

# Enable hardware LED controller on tplink SG2000 series switches
#         ___________________________________________________________
#        |                                                           |
#        | This is a temporary stand-in for an RTL LED controller    |
#        | driver. It will be obsolete once a kernel driver becomes  |
#        | available.                                                |
#        |___________________________________________________________|
#
# Crash course on LED controller:
# -------------------------------
#
# From a software perspective, the device has 11 groups with (3) LEDs each.
# We're trying to map the network ports to the LEDs:
#  ______
# |      |
# | 20-1 |
# |______|                    ______ ______ ______ ______ ______ ______ ______ ______
# |      |                   |      |      |      |      |      |      |      |      |
# | 20-0 |                   | 15-2 | 14-2 | 13-2 | 12-2 | 11-2 | 10-2 |  9-2 |  8-2 |
# |______|      ______ ______|______|______|______|______|______|______|______|______|
# |      |     | 26-1 | 24-1 | 15-1 | 14-1 | 13-1 | 12-1 | 11-1 | 10-1 |  9-1 |  8-1 |
# | N/A  |     | 26-0 | 24-0 | 15-0 | 14-0 | 13-0 | 12-0 | 11-0 | 10-0 |  9-0 |  8-0 |
# |______|     |______|______|______|______|______|______|______|______|______|______|
#
# The port numbering is flexible, but the ordering is fixed. The 'led_p_en_ctrl'
# register is a bitmask that controls which switch ports send status data.
# In this example, Enabling the desired ports results in the bitmask 0x0510ff00
# If there are more bits set than LED groups the extra (LSB) bits are discarded.
#
# LED[0] and LED[1] are bi-color LEDS
#     - LED[0] = amber, LED[1] = green
#     - Both on or both off turns off the LED
# 0xef: Turn LED1 on 1G, LED 0 on 100M.
#
# Switch port 20 is not used. The LEDs for port 20 are thus switched to manual
# mode by writing (1 << 20) bitmask in led0_sw_p_en_ctrl, and led0_sw_p_en_ctrl.
#
# LED[2] in each group is used for PoE or other functions, so they are all set
# to manual mode via the 'led2_sw_p_en_ctrl' register.
#
tplink_sg2xxx_init_leds()
{
        local leds="/sys/kernel/debug/rtl838x/led"

        if [ ! -d "$leds" ]; then
                echo "tplink_sg2xxx_init_leds: Could not find $leds in sysfs" > /dev/kmsg
                return
        fi

        echo 0x00a4014f > "$leds"/led_mode_ctrl
        echo 0x0510ff00 > "$leds"/led_p_en_ctrl
        echo 0x00100000 > "$leds"/led0_sw_p_en_ctrl
        echo 0x00100000 > "$leds"/led1_sw_p_en_ctrl
        echo 0x0fffffff > "$leds"/led2_sw_p_en_ctrl

        # Turn on system LED to confirm this script is running
        echo 0x005 > "$leds"/led_sw_p_ctrl.20
}

boot() {
        case $(board_name) in
        tplink,sg2008p-v1|\
        tplink,sg2210p-v3)
                tplink_sg2xxx_init_leds
                ;;
        esac
}
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
  • Last modified: 2024/07/17 16:26
  • by mrnuke