OpenWrt/LEDE Project

  • Status Closed
  • Percent Complete
  • Task Type Bug Report
  • Category Base system
  • Assigned To
    Piotr Dymacz
  • Operating System All
  • Severity Low
  • Priority Very Low
  • Reported Version lede-17.01
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by mikabak - 13.06.2017
Last edited by Piotr Dymacz - 29.06.2017

FS#843 - Switch port order reversed on TL-WR740N (v2.5)

After upgrading from OpenWrt Chaos Calmer 15.05.1 to LEDE i noticed that the switch port order has been reversed. In OpenWrt the switch port order was correct on this device.

- Device problem occurs on
TP-Link TL-WR740N hardware version 2.5

- Software versions of LEDE release, packages, etc.
LEDE Reboot 17.01.2 r3435-65eec8bd5f
Firmware for model: TP-Link TL-WR740N/ND v1

- Steps to reproduce
Go to menu Switch and the error is obvious

Closed by  Piotr Dymacz
29.06.2017 09:29
Reason for closing:  Fixed
Additional comments about closing:  

Fixed in ht tps:// ad8fc69d4680c6c2d29289041ae

Jo-Philipp Wich commented on 13.06.2017 12:09

Please list which internal swconfig port corrsponds to which port on the enclosure, something like:

0 ⇒ 4
1 ⇒ 3
2 ⇒ 2
3 ⇒ 1
4 ⇒ 0
5 ⇒ cpu

But please do not guess but test the ports by plugging a cable and observing the link state.

mikabak commented on 14.06.2017 08:35

swconfig maps correctly to the ports on the enclosure like this:
(to the left swconfig output, to the right port number on enclosure)


The switch is at eth0 and the WAN port (eth1) is not part of the switch.

In LuCI however the port order is reversed like this:
(to the left labels in LuCI and to the right port number on enclosure)


Project Manager
Piotr Dymacz commented on 27.06.2017 11:34

Hello @mikabak,

I have a fix in my staging tree:;a=summary

Images (built is based on my staging tree, with LuCi included) are available here:

Could you please test and confirm that the mapping is now correct?


mikabak commented on 01.07.2017 09:38

Hi Piotr,

Thanks for taking the time to fix this.

When I go to Switch menu in LuCi I get this message on the top of the page:
Switch "switch0" has an unknown topology - the VLAN settings might not be accurate.

The port labeling in LuCi is still wrong but different from before:
(to the left labels in LuCI and to the right port number on enclosure)

Port1 → cpu
Port2 → 1
Port3 → 2
Port4 → 3
Port5 → 4
CPU (eth0) → ?

Seem to me that this firmware image believes that this switch has more ports than it actually has. Please note that the WAN port on this device is not part of the switch.

The output from swconfig is the same as before and seems ok to me:
# swconfig dev eth0 show
Global attributes:

enable_vlan: 1

Port 0:

pvid: 0
link: port:0 link:up speed:1000baseT full-duplex txflow rxflow 

Port 1:

pvid: 2
link: port:1 link:down

Port 2:

pvid: 2
link: port:2 link:down

Port 3:

pvid: 3
link: port:3 link:down

Port 4:

pvid: 4
link: port:4 link:down


vid: 0
ports: 0t 


vid: 1
ports: 0t 


vid: 2
ports: 0t 1 2 


vid: 3
ports: 0t 3 


vid: 4
ports: 0t 4
Project Manager
Piotr Dymacz commented on 01.07.2017 12:21

Hello @mikabak,

Please, try snapshot image as the fix was already pushed to master branch. Just make sure to use "sysupgrade -n" (without configuration preserved) and install LuCi manually after flash (snapshot images don't include LuCi).


mikabak commented on 11.07.2017 06:48

Hi Piotr,

I installed the latest snapshot from 10th July and I did reset the configuration to defaut in the process as you told me to. Unfortunately I was not able to install LuCi. I got error message "No space left on device".

"swconfig dev eth0 show" output is still correct.

Seems I need to compile an image by myself or wait for a release in order to test LuCi on this device.

mikabak commented on 12.07.2017 19:50


I managed to make an image with LuCi on it with the image builder from snapshot.

For the record this is how I built it:
make image PROFILE=tl-wr740n-v1 PACKAGES="luci luci-app-firewall luci-base luci-lib-ip luci-mod-admin-full luci-proto-ppp luci-theme-bootstrap uhttpd uhttpd-mod-ubus"

I copied the sysupgrade image to /tmp on the device then I ran:
sysupgrade -n lede-ar71xx-generic-tl-wr740n-v1-squashfs-sysupgrade.bin

It was successful and I could login with ssh and browser.

On this image the port mappings are correct (swconfig and LuCi).

Thank you very much!

Project Manager
Piotr Dymacz commented on 13.07.2017 07:29

Hello @mikabak,

Thanks for feedback, I will backport the fix to 17.01 branch.



Available keyboard shortcuts


Task Details

Task Editing