Support for Strong 1200


#1

Current Status

  • :white_check_mark: Ethernet -> Description - Solution
  • :white_check_mark: WiFi 2.4 GHz & 5 GHz -> Solution (switch pcie0 and pcie1)
  • :white_check_mark: LEDs setup -> Solution
  • :ballot_box_with_check: Missing factory image - Workaround: flash 2 times
  • :white_check_mark: USB 3.0
  • :white_check_mark: VLAN
  • :white_check_mark: microSD

Flash OpenWrt

To flash OpenWrt image from OEM web interface, you must flash the firmware 2 time:

  1. In the OEM Web interface (192.168.1.1, psw:admin), go to System Tools > Firmware Upgrade and flash openwrt-ramips-mt7621-mtc_wr1201-initramfs-kernel.bin
  2. After 2min, open OpenWrt interface (192.168.1.1, psw:root), go to System > Backup/Flash Firmware > Flash new firmware image, uncheck Keep settings and flash openwrt-ramips-mt7621-mtc_wr1201-squashfs-sysupgrade.bin

:exclamation: Is crucial to flash initramfs-kernel from OEM or you will get a bootloop!

FIles

98ca472b4f4cd7bbe1ee63e8cfbecb96 openwrt-ramips-mt7621-mtc_wr1201-initramfs-kernel.bin
0e2a79458433321b4cbb66855be6bb48 openwrt-ramips-mt7621-mtc_wr1201-squashfs-sysupgrade.bin
f4a4b1b006adbc255946d848daec0c78 openwrt-ramips-mt7621-strong_wr1201-zc01-01-revert-oem.bin


Hello,

I'm trying to support the Dual Band Gigabit Router 1200 of Strong, a 39€ router :smiley:.

SoC CPU Mhz RAM MB Flash MB WLAN Hw WLAN2.4 WLAN5 100M ports Gbit ports USB microSD
MediaTek MT7621 880 128 16 MT7612EN, MT7602EN b/g/n a/n/ac - 4+1 1x 3.0 1

Board photo:

cat /proc/mtd

dev:    size   erasesize  name
mtd0: 01000000 00010000 "ALL"
mtd1: 00030000 00010000 "Bootloader"
mtd2: 00010000 00010000 "Config"
mtd3: 00010000 00010000 "Factory"
mtd4: 00fa0000 00010000 "Kernel"
mtd5: 00010000 00010000 "Second_Config"

cat /proc/partitions

major minor  #blocks  name

  31        0      16384 mtdblock0
  31        1        192 mtdblock1
  31        2         64 mtdblock2
  31        3         64 mtdblock3
  31        4      16000 mtdblock4
  31        5         64 mtdblock5

cat /proc/cmdline

console=ttyS1,57600n8 root=/dev/ram0 console=ttyS1,57600 root=/dev/ram0 rootfstype=squashfs,jffs2

cat /proc/cpuinfo


system type             : MT7621
processor               : 0
cpu model               : MIPS 1004Kc V2.15
BogoMIPS                : 583.68
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 32
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0000, 0x0000, 0x0000, 0x0000]
ASEs implemented        : mips16 dsp mt
shadow register sets    : 1
core                    : 0
VCED exceptions         : not available
VCEI exceptions         : not available

processor               : 1
cpu model               : MIPS 1004Kc V2.15
BogoMIPS                : 583.68
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 32
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0000, 0x0000, 0x0000, 0x0000]
ASEs implemented        : mips16 dsp mt
shadow register sets    : 1
core                    : 0
VCED exceptions         : not available
VCEI exceptions         : not available

Here is te dmesg: https://pastebin.com/X7VT9t4i

OEM bootlog

https://gist.github.com/vk496/4fe74c1b2f2649e33f9ad5e5c560b331#file-00_oem_bootlog

OpenWrt bootlog

https://gist.githubusercontent.com/vk496/4fe74c1b2f2649e33f9ad5e5c560b331/raw/8f48f63d4f770405eb784efb7e4d8f231cef439f/openwrt_bootlog2.txt

Thanks

Special thanks to Strong for giving me the device


ToH brand entry for Strong
5GHz wifi routers
Help with ramips microSD support
Why did probability appear in the startup process of 11nas router "INFO: rcu_sched self-detected stall on CPU"?
#2

I managed to boot OpenWrt. For now, I disabled:

CONFIG_MTD_NAND=y
CONFIG_MTD_NAND_ECC=y

https://gist.github.com/vk496/4fe74c1b2f2649e33f9ad5e5c560b331#file-openwrt-without-nand


#3

My fault, I suposed NAND when really was SPI. With this DTS I can boot into OpenWrt

https://github.com/vk496/openwrt/blob/strong1200/target/linux/ramips/dts/STRONG-1200.dts


#4

Hello,

I'm having issues with Ethernet. I have a assigned IP address, but there is no traffic with my computer (static IP config).

However, I can see ARP and Broadcast packages...

ifconfig

br-lan    Link encap:Ethernet  HWaddr 00:16:FB:C6:A3:8C  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::216:fbff:fec6:a38c/64 Scope:Link
          inet6 addr: fd69:6bbb:940f::1/60 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:2196 (2.1 KiB)

eth0      Link encap:Ethernet  HWaddr 00:16:FB:C6:A3:8C  
          inet6 addr: fe80::216:fbff:fec6:a38c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:25 errors:0 dropped:0 overruns:0 frame:0
          TX packets:445 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1530 (1.4 KiB)  TX bytes:145649 (142.2 KiB)
          Interrupt:17 

eth0.1    Link encap:Ethernet  HWaddr 00:16:FB:C6:A3:8C  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:2196 (2.1 KiB)

eth0.2    Link encap:Ethernet  HWaddr 00:16:FB:C6:A3:8D  
          inet6 addr: fe80::216:fbff:fec6:a38d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:417 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:137564 (134.3 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:288 errors:0 dropped:0 overruns:0 frame:0
          TX packets:288 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:19584 (19.1 KiB)  TX bytes:19584 (19.1 KiB)

swconfig list

Found: switch0 - mt7530

swconfig dev switch0 show

Global attributes:
	enable_vlan: 0
	mib: Switch MIB counters
PPE_AC_BCNT0: 0
PPE_AC_PCNT0: 0
PPE_AC_BCNT63: 0
PPE_AC_PCNT63: 0
PPE_MTR_CNT0: 0
PPE_MTR_CNT63: 0
GDM1_TX_GBCNT: 0
GDM1_TX_GPCNT: 0
GDM1_TX_SKIPCNT: 0
GDM1_TX_COLCNT: 0
GDM1_RX_GBCNT1: 0
GDM1_RX_GPCNT1: 0
GDM1_RX_OERCNT: 0
GDM1_RX_FERCNT: 0
GDM1_RX_SERCNT: 0
GDM1_RX_LERCNT: 0
GDM1_RX_CERCNT: 0
GDM1_RX_FCCNT: 0
GDM2_TX_GBCNT: 0
GDM2_TX_GPCNT: 0
GDM2_TX_SKIPCNT: 0
GDM2_TX_COLCNT: 0
GDM2_RX_GBCNT: 0
GDM2_RX_GPCNT: 0
GDM2_RX_OERCNT: 0
GDM2_RX_FERCNT: 0
GDM2_RX_SERCNT: 0
GDM2_RX_LERCNT: 0
GDM2_RX_CERCNT: 0
GDM2_RX_FCCNT: 0

Port 0:
	mib: Port 0 MIB counters
TxDrop     : 0
TxCRC      : 0
TxUni      : 0
TxMulti    : 52
TxBroad    : 437
TxCollision: 0
TxSingleCol: 0
TxMultiCol : 0
TxDefer    : 0
TxLateCol  : 0
TxExcCol   : 0
TxPause    : 0
Tx64Byte   : 0
Tx65Byte   : 21
Tx128Byte  : 31
Tx256Byte  : 436
Tx512Byte  : 0
Tx1024Byte : 1
TxByte     : 160875
RxDrop     : 0
RxFiltered : 0
RxUni      : 0
RxMulti    : 1
RxBroad    : 30
RxAlignErr : 0
RxCRC      : 0
RxUnderSize: 0
RxFragment : 0
RxOverSize : 0
RxJabber   : 0
RxPause    : 0
Rx64Byte   : 30
Rx65Byte   : 1
Rx128Byte  : 0
Rx256Byte  : 0
Rx512Byte  : 0
Rx1024Byte : 0
RxByte     : 2014
RxCtrlDrop : 0
RxIngDrop  : 0
RxARLDrop  : 0

	pvid: 0
	link: port:0 link:up speed:100baseT full-duplex 
Port 1:
	mib: Port 1 MIB counters
TxDrop     : 0
TxCRC      : 0
TxUni      : 0
TxMulti    : 0
TxBroad    : 0
TxCollision: 0
TxSingleCol: 0
TxMultiCol : 0
TxDefer    : 0
TxLateCol  : 0
TxExcCol   : 0
TxPause    : 0
Tx64Byte   : 0
Tx65Byte   : 0
Tx128Byte  : 0
Tx256Byte  : 0
Tx512Byte  : 0
Tx1024Byte : 0
TxByte     : 0
RxDrop     : 0
RxFiltered : 0
RxUni      : 0
RxMulti    : 0
RxBroad    : 0
RxAlignErr : 0
RxCRC      : 0
RxUnderSize: 0
RxFragment : 0
RxOverSize : 0
RxJabber   : 0
RxPause    : 0
Rx64Byte   : 0
Rx65Byte   : 0
Rx128Byte  : 0
Rx256Byte  : 0
Rx512Byte  : 0
Rx1024Byte : 0
RxByte     : 0
RxCtrlDrop : 0
RxIngDrop  : 0
RxARLDrop  : 0

	pvid: 0
	link: port:1 link:down
Port 2:
	mib: Port 2 MIB counters
TxDrop     : 0
TxCRC      : 0
TxUni      : 0
TxMulti    : 0
TxBroad    : 0
TxCollision: 0
TxSingleCol: 0
TxMultiCol : 0
TxDefer    : 0
TxLateCol  : 0
TxExcCol   : 0
TxPause    : 0
Tx64Byte   : 0
Tx65Byte   : 0
Tx128Byte  : 0
Tx256Byte  : 0
Tx512Byte  : 0
Tx1024Byte : 0
TxByte     : 0
RxDrop     : 0
RxFiltered : 0
RxUni      : 0
RxMulti    : 0
RxBroad    : 0
RxAlignErr : 0
RxCRC      : 0
RxUnderSize: 0
RxFragment : 0
RxOverSize : 0
RxJabber   : 0
RxPause    : 0
Rx64Byte   : 0
Rx65Byte   : 0
Rx128Byte  : 0
Rx256Byte  : 0
Rx512Byte  : 0
Rx1024Byte : 0
RxByte     : 0
RxCtrlDrop : 0
RxIngDrop  : 0
RxARLDrop  : 0

	pvid: 0
	link: port:2 link:down
Port 3:
	mib: Port 3 MIB counters
TxDrop     : 0
TxCRC      : 0
TxUni      : 0
TxMulti    : 0
TxBroad    : 0
TxCollision: 0
TxSingleCol: 0
TxMultiCol : 0
TxDefer    : 0
TxLateCol  : 0
TxExcCol   : 0
TxPause    : 0
Tx64Byte   : 0
Tx65Byte   : 0
Tx128Byte  : 0
Tx256Byte  : 0
Tx512Byte  : 0
Tx1024Byte : 0
TxByte     : 0
RxDrop     : 0
RxFiltered : 0
RxUni      : 0
RxMulti    : 0
RxBroad    : 0
RxAlignErr : 0
RxCRC      : 0
RxUnderSize: 0
RxFragment : 0
RxOverSize : 0
RxJabber   : 0
RxPause    : 0
Rx64Byte   : 0
Rx65Byte   : 0
Rx128Byte  : 0
Rx256Byte  : 0
Rx512Byte  : 0
Rx1024Byte : 0
RxByte     : 0
RxCtrlDrop : 0
RxIngDrop  : 0
RxARLDrop  : 0

	pvid: 0
	link: port:3 link:down
Port 4:
	mib: Port 4 MIB counters
TxDrop     : 0
TxCRC      : 0
TxUni      : 0
TxMulti    : 0
TxBroad    : 0
TxCollision: 0
TxSingleCol: 0
TxMultiCol : 0
TxDefer    : 0
TxLateCol  : 0
TxExcCol   : 0
TxPause    : 0
Tx64Byte   : 0
Tx65Byte   : 0
Tx128Byte  : 0
Tx256Byte  : 0
Tx512Byte  : 0
Tx1024Byte : 0
TxByte     : 0
RxDrop     : 0
RxFiltered : 0
RxUni      : 0
RxMulti    : 0
RxBroad    : 0
RxAlignErr : 0
RxCRC      : 0
RxUnderSize: 0
RxFragment : 0
RxOverSize : 0
RxJabber   : 0
RxPause    : 0
Rx64Byte   : 0
Rx65Byte   : 0
Rx128Byte  : 0
Rx256Byte  : 0
Rx512Byte  : 0
Rx1024Byte : 0
RxByte     : 0
RxCtrlDrop : 0
RxIngDrop  : 0
RxARLDrop  : 0

	pvid: 0
	link: port:4 link:down
Port 5:
	mib: Port 5 MIB counters
TxDrop     : 0
TxCRC      : 0
TxUni      : 0
TxMulti    : 0
TxBroad    : 0
TxCollision: 0
TxSingleCol: 0
TxMultiCol : 0
TxDefer    : 0
TxLateCol  : 0
TxExcCol   : 0
TxPause    : 0
Tx64Byte   : 0
Tx65Byte   : 0
Tx128Byte  : 0
Tx256Byte  : 0
Tx512Byte  : 0
Tx1024Byte : 0
TxByte     : 0
RxDrop     : 0
RxFiltered : 0
RxUni      : 0
RxMulti    : 0
RxBroad    : 0
RxAlignErr : 0
RxCRC      : 0
RxUnderSize: 0
RxFragment : 0
RxOverSize : 0
RxJabber   : 0
RxPause    : 0
Rx64Byte   : 0
Rx65Byte   : 0
Rx128Byte  : 0
Rx256Byte  : 0
Rx512Byte  : 0
Rx1024Byte : 0
RxByte     : 0
RxCtrlDrop : 0
RxIngDrop  : 0
RxARLDrop  : 0

	pvid: 0
	link: port:5 link:down
Port 6:
	mib: Port 6 MIB counters
TxDrop     : 0
TxCRC      : 0
TxUni      : 0
TxMulti    : 1
TxBroad    : 30
TxCollision: 0
TxSingleCol: 0
TxMultiCol : 0
TxDefer    : 0
TxLateCol  : 0
TxExcCol   : 0
TxPause    : 0
Tx64Byte   : 30
Tx65Byte   : 1
Tx128Byte  : 0
Tx256Byte  : 0
Tx512Byte  : 0
Tx1024Byte : 0
TxByte     : 2014
RxDrop     : 0
RxFiltered : 0
RxUni      : 0
RxMulti    : 52
RxBroad    : 438
RxAlignErr : 0
RxCRC      : 0
RxUnderSize: 0
RxFragment : 0
RxOverSize : 0
RxJabber   : 0
RxPause    : 0
Rx64Byte   : 0
Rx65Byte   : 21
Rx128Byte  : 31
Rx256Byte  : 437
Rx512Byte  : 0
Rx1024Byte : 1
RxByte     : 161225
RxCtrlDrop : 0
RxIngDrop  : 0
RxARLDrop  : 0

	pvid: 0
	link: port:6 link:up speed:1000baseT full-duplex 
Port 7:
	mib: Port 7 MIB counters
TxDrop     : 0
TxCRC      : 0
TxUni      : 0
TxMulti    : 0
TxBroad    : 0
TxCollision: 0
TxSingleCol: 0
TxMultiCol : 0
TxDefer    : 0
TxLateCol  : 0
TxExcCol   : 0
TxPause    : 0
Tx64Byte   : 0
Tx65Byte   : 0
Tx128Byte  : 0
Tx256Byte  : 0
Tx512Byte  : 0
Tx1024Byte : 0
TxByte     : 0
RxDrop     : 0
RxFiltered : 0
RxUni      : 0
RxMulti    : 0
RxBroad    : 0
RxAlignErr : 0
RxCRC      : 0
RxUnderSize: 0
RxFragment : 0
RxOverSize : 0
RxJabber   : 0
RxPause    : 0
Rx64Byte   : 0
Rx65Byte   : 0
Rx128Byte  : 0
Rx256Byte  : 0
Rx512Byte  : 0
Rx1024Byte : 0
RxByte     : 0
RxCtrlDrop : 0
RxIngDrop  : 0
RxARLDrop  : 0

	pvid: 0
	link: port:7 link:down

tcpdump from Router

# tcpdump -i eth0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
08:54:36.628027 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:fb:c6:a3:8d (oui Unknown), length 300
08:54:39.717987 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:fb:c6:a3:8d (oui Unknown), length 300
08:54:42.807959 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:fb:c6:a3:8d (oui Unknown), length 300
08:54:45.897952 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:fb:c6:a3:8d (oui Unknown), length 300
08:54:48.987958 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:fb:c6:a3:8d (oui Unknown), length 300
08:54:52.077976 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:fb:c6:a3:8d (oui Unknown), length 300
08:54:54.514600 ARP, Request who-has OpenWrt.lan tell 192.168.1.150, length 46
08:54:55.167982 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:fb:c6:a3:8d (oui Unknown), length 300
08:54:55.514804 ARP, Request who-has OpenWrt.lan tell 192.168.1.150, length 46
08:54:56.528171 ARP, Request who-has OpenWrt.lan tell 192.168.1.150, length 46
08:54:57.541517 ARP, Request who-has OpenWrt.lan tell 192.168.1.150, length 46
08:54:58.257964 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:fb:c6:a3:8d (oui Unknown), length 300
08:54:58.554834 ARP, Request who-has OpenWrt.lan tell 192.168.1.150, length 46
08:54:59.568158 ARP, Request who-has OpenWrt.lan tell 192.168.1.150, length 46
08:55:00.584747 ARP, Request who-has OpenWrt.lan tell 192.168.1.150, length 46
08:55:01.347968 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:fb:c6:a3:8d (oui Unknown), length 300
08:55:01.594768 ARP, Request who-has OpenWrt.lan tell 192.168.1.150, length 46
08:55:02.608058 ARP, Request who-has OpenWrt.lan tell 192.168.1.150, length 46
08:55:03.621519 ARP, Request who-has OpenWrt.lan tell 192.168.1.150, length 46
08:55:04.437964 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:fb:c6:a3:8d (oui Unknown), length 300
08:55:04.634753 ARP, Request who-has OpenWrt.lan tell 192.168.1.150, length 46
08:55:05.647972 ARP, Request who-has OpenWrt.lan tell 192.168.1.150, length 46
08:55:07.527963 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:fb:c6:a3:8d (oui Unknown), length 300
08:58:08.453070 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:96:e5:1f:1d (oui Unknown), length 300
08:58:09.847969 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:fb:c6:a3:8d (oui Unknown), length 300
08:58:12.937948 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:fb:c6:a3:8d (oui Unknown), length 300
08:58:14.942867 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:96:e5:1f:1d (oui Unknown), length 300
08:58:16.037969 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:fb:c6:a3:8d (oui Unknown), length 300
08:58:19.127954 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:fb:c6:a3:8d (oui Unknown), length 300
08:58:22.217941 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:fb:c6:a3:8d (oui Unknown), length 300
08:58:25.307947 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:fb:c6:a3:8d (oui Unknown), length 300
08:58:28.315886 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:96:e5:1f:1d (oui Unknown), length 300
08:58:28.397970 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:fb:c6:a3:8d (oui Unknown), length 300

I read that it could be a switch miss-configuration in the IRC, and discovered a OEM utility called switch:

switch -h

Usage:
 switch acl etype add [ethtype] [portmap]              - drop etherytype packets
 switch acl dip add [dip] [portmap]                    - drop dip packets
 switch acl dip meter [dip] [portmap][meter:kbps]      - rate limit dip packets
 switch acl dip trtcm [dip] [portmap][CIR:kbps][CBS][PIR][PBS] - TrTCM dip packets
 switch acl port add [sport] [portmap]           - drop src port packets
 switch acl L4 add [2byes] [portmap]             - drop L4 packets with 2bytes payload
 switch add [mac] [portmap]                  - add an entry to switch table
 switch add [mac] [portmap] [vlan id]        - add an entry to switch table
 switch add [mac] [portmap] [vlan id] [age]  - add an entry to switch table
 switch clear                                - clear switch table
 switch del [mac]                            - delete an entry from switch table
 switch del [mac] [fid]			 - delete an entry from switch table
 switch dip add [dip] [portmap]                  - add a dip entry to switch table
 switch dip del [dip]	                     - del a dip entry to switch table
 switch dip dump                                 - dump switch dip table
 switch dip clear                                - clear switch dip table
 switch dump		- dump switch table
 switch ingress-rate on [port] [Kbps]        - set ingress rate limit on port 0~4 
 switch egress-rate on [port] [Kbps]         - set egress rate limit on port 0~4 
 switch ingress-rate off [port]              - del ingress rate limit on port 0~4 
 switch egress-rate off [port]               - del egress rate limit on port 0~4
 switch filt [mac]                           - add a SA filtering entry (with portmap 1111111) to switch table
 switch filt [mac] [portmap]                 - add a SA filtering entry to switch table
 switch filt [mac] [portmap] [vlan id]       - add a SA filtering entry to switch table
 switch filt [mac] [portmap] [vlan id] [age] - add a SA filtering entry to switch table
 switch igmpsnoop on [Query Interval] [default router portmap] - turn on IGMP snoop and  router port learning (Query Interval 1~255)
 switch igmpsnoop off                                  - turn off IGMP snoop and router port learning
 switch igmpsnoop enable [port#]                       - enable IGMP HW leave/join/Squery/Gquery
 switch igmpsnoop disable [port#]                      - disable IGMP HW leave/join/Squery/Gquery
 switch mymac [mac] [portmap]                  - add a mymac entry to switch table
 switch mirror monitor [portnumber]            - enable port mirror and indicate monitor port number
 switch mirror target [portnumber] [0:off, 1:rx, 2:tx, 3:all]  - set port mirror target
 switch phy [phy_addr]			 - dump phy register of specific port
 switch phy					 - dump all phy registers
 switch pvid [port] [pvid]                - set pvid on port 0~4 
 switch reg r [offset]                       - register read from offset
 switch reg w [offset] [value]               - register write value to offset
 switch sip add [sip] [dip] [portmap]            - add a sip entry to switch table
 switch sip del [sip] [dip]		             - del a sip entry to switch table
 switch sip dump                                 - dump switch sip table
 switch sip clear                                - clear switch sip table
 switch tag on [port]                        - keep vlan tag for egress packet on prot 0~4
 switch tag off [port]                       - remove vlan tag for egress packet on port 0~4
 switch vlan dump                            - dump switch table
 switch vlan set [vlan idx (NULL)][vid] [portmap]  - set vlan id and associated member

switch dump

hash  port(0:6)   fid   vid  age   mac-address     filter my_mac
3c4:   ---- --1-    0     1  139  0016fbc6a38e     -     -
3e4:   1--- ----    0     1  134  001696e51f1d     -     -
found the last entry 2 (not ready)

switch phy

SPEC defined Register
[Port 0]===============
00: 1040 01: 796D 02: 03A2 03: 9412 04: 05E1 05: 4DE1 06: 0005 07: 2801 
08: 0000 09: 0600 10: 4000 11: 0000 12: 0000 13: 401F 14: 1177 15: 2000 
[Port 1]===============
00: 1040 01: 7949 02: 03A2 03: 9412 04: 05E1 05: 0000 06: 0004 07: 2001 
08: 0000 09: 0600 10: 4000 11: 0000 12: 0000 13: 401F 14: 1177 15: 2000 
[Port 2]===============
00: 1040 01: 7949 02: 03A2 03: 9412 04: 05E1 05: 0000 06: 0004 07: 2001 
08: 0000 09: 0600 10: 4000 11: 0000 12: 0000 13: 401F 14: 1177 15: 2000 
[Port 3]===============
00: 1040 01: 7949 02: 03A2 03: 9412 04: 05E1 05: 0000 06: 0004 07: 2001 
08: 0000 09: 0600 10: 4000 11: 0000 12: 0000 13: 401F 14: 1177 15: 2000 
[Port 4]===============
00: 1040 01: 7949 02: 03A2 03: 9412 04: 05E1 05: 0000 06: 0004 07: 2001 
08: 0000 09: 0600 10: 4000 11: 0000 12: 0000 13: 401F 14: 1177 15: 2000 

Global Register Page 0
===============
16: 9000 17: 0000 18: 0048 19: 0000 20: 0000 21: 0000 22: 3000 23: 00B0 
24: 0000 25: 0000 26: 0000 27: 0000 28: 8000 29: 0028 30: 0000 31: 0000 


Global Register Page 1
===============
16: 9000 17: 0000 18: 0048 19: 0000 20: 0000 21: 0000 22: 3000 23: 00B0 
24: 0000 25: 0000 26: 0000 27: 0000 28: 8000 29: 0028 30: 0000 31: 0000 


Global Register Page 2
===============
16: 9000 17: 0000 18: 0048 19: 0000 20: 0000 21: 0000 22: 3000 23: 00B0 
24: 0000 25: 0000 26: 0000 27: 0000 28: 8000 29: 0028 30: 0000 31: 0000 


Global Register Page 3
===============
16: 9000 17: 0000 18: 0048 19: 0000 20: 0000 21: 0000 22: 3000 23: 00B0 
24: 0000 25: 0000 26: 0000 27: 0000 28: 8000 29: 0028 30: 0000 31: 0000 


Global Register Page 4
===============
16: 9000 17: 0000 18: 0048 19: 0000 20: 0000 21: 0000 22: 3000 23: 00B0 
24: 0000 25: 0000 26: 0000 27: 0000 28: 8000 29: 0028 30: 0000 31: 0000 


Local Register Port 0 Page 0
===============
16: 9000 17: 0000 18: 0048 19: 0000 20: 0000 21: 0000 22: 3000 23: 00B0 
24: 0000 25: 0000 26: 0000 27: 0000 28: 8000 29: 0028 30: 0000 31: 0000 


Local Register Port 0 Page 1
===============
16: 9000 17: 0000 18: 0048 19: 0000 20: 0000 21: 0000 22: 3000 23: 00B0 
24: 0000 25: 0000 26: 0000 27: 0000 28: 8000 29: 0028 30: 0000 31: 0000 


Local Register Port 0 Page 2
===============
16: 9000 17: 0000 18: 0048 19: 0000 20: 0000 21: 0000 22: 3000 23: 00B0 
24: 0000 25: 0000 26: 0000 27: 0000 28: 8000 29: 0028 30: 0000 31: 0000 


Local Register Port 0 Page 3
===============
16: 9000 17: 0000 18: 0048 19: 0000 20: 0000 21: 0000 22: 3000 23: 00B0 
24: 0000 25: 0000 26: 0000 27: 0000 28: 8000 29: 0028 30: 0000 31: 0000 


Local Register Port 1 Page 0
===============
16: 0000 17: 0000 18: 0048 19: 0000 20: 0000 21: 0000 22: 3000 23: 00B0 
24: 0006 25: 0000 26: 0000 27: 0000 28: 8000 29: 0000 30: 0000 31: 0000 


Local Register Port 1 Page 1
===============
16: 0000 17: 0000 18: 0048 19: 0000 20: 0000 21: 0000 22: 3000 23: 00B0 
24: 0006 25: 0000 26: 0000 27: 0000 28: 8000 29: 2000 30: 0000 31: 0000 


Local Register Port 1 Page 2
===============
16: 0000 17: 0000 18: 0048 19: 0000 20: 0000 21: 0000 22: 3000 23: 00B0 
24: 0000 25: 0000 26: 0000 27: 0000 28: 8000 29: 2000 30: 0000 31: 0000 


Local Register Port 1 Page 3
===============
16: 0000 17: 0000 18: 0048 19: 0000 20: 0000 21: 0000 22: 3000 23: 00B0 
24: 0000 25: 0000 26: 0000 27: 0000 28: 8000 29: 0000 30: 0000 31: 0000 


Local Register Port 2 Page 0
===============
16: 0000 17: 0000 18: 0048 19: 0000 20: 0000 21: 0000 22: 3000 23: 00B0 
24: 0000 25: 0000 26: 0000 27: 0000 28: 8000 29: 2000 30: 0000 31: 0000 


Local Register Port 2 Page 1
===============
16: 0000 17: 0000 18: 0048 19: 0000 20: 0000 21: 0000 22: 3000 23: 00B0 
24: 0006 25: 0000 26: 0000 27: 0000 28: 8000 29: 2000 30: 0000 31: 0000 


Local Register Port 2 Page 2
===============
16: 0000 17: 0000 18: 0048 19: 0000 20: 0000 21: 0000 22: 3000 23: 00B0 
24: 0006 25: 0000 26: 0000 27: 0000 28: 8000 29: 2000 30: 0000 31: 0000 


Local Register Port 2 Page 3
===============
16: 0000 17: 0000 18: 0048 19: 0000 20: 0000 21: 0000 22: 3000 23: 00B0 
24: 0006 25: 0000 26: 0000 27: 0000 28: 8000 29: 0000 30: 0000 31: 0000 


Local Register Port 3 Page 0
===============
16: 0000 17: 0000 18: 0048 19: 0000 20: 0000 21: 0000 22: 3000 23: 00B0 
24: 0000 25: 0000 26: 0000 27: 0000 28: 8000 29: 0000 30: 0000 31: 0000 


Local Register Port 3 Page 1
===============
16: 0000 17: 0000 18: 0048 19: 0000 20: 0000 21: 0000 22: 3000 23: 00B0 
24: 0000 25: 0000 26: 0000 27: 0000 28: 8000 29: 0000 30: 0000 31: 0000 


Local Register Port 3 Page 2
===============
16: 0000 17: 0000 18: 0048 19: 0000 20: 0000 21: 0000 22: 3000 23: 00B0 
24: 0006 25: 0000 26: 0000 27: 0000 28: 8000 29: 2000 30: 0000 31: 0000 


Local Register Port 3 Page 3
===============
16: 0000 17: 0000 18: 0048 19: 0000 20: 0000 21: 0000 22: 3000 23: 00B0 
24: 0006 25: 0000 26: 0000 27: 0000 28: 8000 29: 2000 30: 0000 31: 0000 


Local Register Port 4 Page 0
===============
16: 0000 17: 0000 18: 0048 19: 0000 20: 0000 21: 0000 22: 3000 23: 00B0 
24: 0000 25: 0000 26: 0000 27: 0000 28: 8000 29: 0000 30: 0000 31: 0000 


Local Register Port 4 Page 1
===============
16: 0000 17: 0000 18: 0048 19: 0000 20: 0000 21: 0000 22: 3000 23: 00B0 
24: 0000 25: 0000 26: 0000 27: 0000 28: 8000 29: 0000 30: 0000 31: 0000 


Local Register Port 4 Page 2
===============
16: 0000 17: 0000 18: 0048 19: 0000 20: 0000 21: 0000 22: 3000 23: 00B0 
24: 0006 25: 0000 26: 0000 27: 0000 28: 8000 29: 0000 30: 0000 31: 0000 


Local Register Port 4 Page 3
===============
16: 0000 17: 0000 18: 0048 19: 0000 20: 0000 21: 0000 22: 3000 23: 00B0 
24: 0006 25: 0000 26: 0000 27: 0000 28: 8000 29: 0000 30: 0000 31: 0000

I understand that there must be some switch post-config, but not sure how to manage it. Any help?


#5

You need to add the entry for your router to base-files/etc/board.d/02_network (line 118).

	sk-wb8|\
 +	strong,wr1200|\
	u7621-06-256M-16M|\

#6

Thanks for the notes!

Already built and tested, with no luck :frowning:. Same behavior.

Salu2


#7

For that entry in 02_network, you need to use the compatile string in the dts.
So, for your device, if compatible = "strong,strong-wr1201" you need to describe as follows to 02_network:

strong,strong-wr1201

#8

Bingo!

Works like a charm. Thnks!


#9

And, the string based on compatible is used for define Device/{model} in image/mt7621.mk.
Since this string is used for compatibility information added to the firmware, sysupgrade can not be performed if it contains an error.

If compatible = "strong,strong-wr1201", use strong_strong-wr1201 for it.

define Device/strong_strong-wr1201
  DTS := STRONG-1201
  ...
endef

#10

For TARGET_DEVICES += strong-wr1201 should be the same, strong_strong-wr1201 ?


#12

Okay, thnks for the explanation! :grinning:


#13

Sorry, also need to change TARGET_DEVICES += strong-wr1201 to TARGET_DEVICES += strong_strong-wr1201. I had a misunderstanding...


#14

Correct, or no option in make menuconfig... :grin:


#15

Hello,

Anyone know how to get the mask_port of a switch for the leds?

Related to base-files/etc/board.d/01_leds:

strong,strong-wr1201)
	ucidef_set_led_switch "lan_link" "lan_link" "$boardname:green:lan_link" "switch0" "0x01"

I tried different values: 0x01, 0x03, 0x08, 0x10, 0xa, ...

All of them simulate data traffic (or directly not work).

Also, ip link show don't display any difference when the rj45 is connected or disconnected:

RJ45 ON

# ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN qlen 1000
    link/ether 00:16:fb:c6:a3:8c brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 00:16:fb:c6:a3:8c brd ff:ff:ff:ff:ff:ff
4: wlan1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 00:16:fb:c6:b3:8c brd ff:ff:ff:ff:ff:ff
5: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 00:16:fb:c6:a3:8c brd ff:ff:ff:ff:ff:ff
6: eth0.1@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether 00:16:fb:c6:a3:8c brd ff:ff:ff:ff:ff:ff
7: eth0.2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 00:16:fb:c6:a3:8d brd ff:ff:ff:ff:ff:ff

RJ45 OFF

# ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN qlen 1000
    link/ether 00:16:fb:c6:a3:8c brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 00:16:fb:c6:a3:8c brd ff:ff:ff:ff:ff:ff
4: wlan1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 00:16:fb:c6:b3:8c brd ff:ff:ff:ff:ff:ff
5: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 00:16:fb:c6:a3:8c brd ff:ff:ff:ff:ff:ff
6: eth0.1@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether 00:16:fb:c6:a3:8c brd ff:ff:ff:ff:ff:ff
7: eth0.2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 00:16:fb:c6:a3:8d brd ff:ff:ff:ff:ff:ff

This implies that the netdev rule also not work:

ucidef_set_led_netdev "lan_link" "lan_link" "$boardname:green:lan_link" "eth0.1" "link"

In the forum didn't found any info related to this issue...


#16

Hello,

I made some progress. Right now WiFi is working (2.4 and 5 GHz). However, I have problems with SD card reader. After installed drivers for mount fs, I get this error when insert the microSD:

[  173.767665] mtk-sd 1e130000.sdhci: no support for card's volts
[  173.779318] mmc0: error -22 whilst initialising SDIO card
[  173.791941] mtk-sd 1e130000.sdhci: no support for card's volts
[  173.803598] mmc0: error -22 whilst initialising MMC card
[  173.877989] mtk-sd 1e130000.sdhci: no support for card's volts
[  173.889610] mmc0: error -22 whilst initialising SDIO card
[  173.902535] mtk-sd 1e130000.sdhci: card claims to support voltages below defined range
[  173.918337] mtk-sd 1e130000.sdhci: no support for card's volts
[  173.929975] mmc0: error -22 whilst initialising MMC card
[  173.998351] mtk-sd 1e130000.sdhci: no support for card's volts
[  174.009972] mmc0: error -22 whilst initialising SDIO card
[  174.023202] mtk-sd 1e130000.sdhci: no support for card's volts
[  174.034820] mmc0: error -22 whilst initialising MMC card

Is a general bug for kmod-sdhci-mt7620?

Salu2


#17

To my knowledge the SD driver for MT7620/MT7621 is quite dodgy so don't expect it to be working/stable.


#18

Tried another microSD card and work like a charm.

Further details in a different post: Help with ramips microSD support


#19

Hello,

After some research, I think I understand why flash squashfs.bin images from the OEM web interface is not working.

When you upload a firmware to the webpage, it get the full size from uImage Data header and not the file size.

That mean, if the full OpenWrt firmware is 7 MB, in the uImage header will appear a size of ~1,8 MB, corresponding to the Kernel.

The main problem is that doing some hacks (set uImage header to 7 MB) WILL flash the whole image, BUT OpenWrt will supose that the Kernel is 7 MB (instead of 1,8 MB) and the boot will fail:

[    2.861104] spi-mt7621 1e000b00.spi: sys_freq: 50000000
[    2.872486] m25p80 spi0.0: mx25l12805d (16384 Kbytes)
[    2.882661] 5 fixed-partitions partitions found on MTD device spi0.0
[    2.895328] Creating 5 MTD partitions on "spi0.0":
[    2.904883] 0x000000000000-0x000000030000 : "Bootloader"
[    2.916770] 0x000000030000-0x000000040000 : "Config"
[    2.927854] 0x000000040000-0x000000050000 : "Factory"
[    2.939132] 0x000000050000-0x000000ff0000 : "firmware"
[    2.951865] random: fast init done
[    2.991139] 0x000000ff0000-0x000001000000 : "Second_Config"
[    3.004283] libphy: Fixed MDIO Bus: probed
[    3.076818] libphy: mdio: probed
[    4.483005] mtk_soc_eth 1e100000.ethernet: loaded mt7530 driver
[    4.495632] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 17
[    4.515354] NET: Registered protocol family 10
[    4.525766] Segment Routing with IPv6
[    4.533132] NET: Registered protocol family 17
[    4.542097] 8021q: 802.1Q VLAN Support v1.8
[    4.553483] hctosys: unable to open rtc device (rtc0)
[    4.564464] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    4.579369] Please append a correct "root=" boot option; here are the available partitions:
[    4.596007] 1f00             192 mtdblock0 
[    4.596014]  (driver?)
[    4.609009] 1f01              64 mtdblock1 
[    4.609015]  (driver?)
[    4.622015] 1f02              64 mtdblock2 
[    4.622021]  (driver?)
[    4.635030] 1f03           16000 mtdblock3 
[    4.635036]  (driver?)
[    4.648030] 1f04              64 mtdblock4 
[    4.648035]  (driver?)
[    4.659316] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
[    4.672633] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    4.690729] Rebooting in 1 seconds..

Not sure if is possible to force OpenWrt to ignore uImage header data size...


#20

WiFi LEDs fixed!

https://forum.openwrt.org/t/why-some-mt7621-leds-are-not-working/23939/2


#21

FYI - snapshot support for MTC Wireless Router WR1201 (aka STRONG Dual Band Gigabit Router 1200) has been added with https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=30a7ab8f61c8a5f1a4428f8c7cf9a1d6a12b096b

snapshot images are available for download.