wn578A2 repeater support

Hey,

I have an old 2.4/5 Ghz repeater which however is a complete fail, because it crash as soon you try to configure it.

  • Sticker: WN576A2-A SilverCrest (LIDL brand) 8G01/2787-1 [brand model: swv 733 b1]
  • PCB: WS-WN578A2-A-V1.2
  • CPU: Mediatek MT7628AN
  • WiFi: Mediathek MT7610EN
  • Flash: AH1731 25Q64CS163 (64M-bit)
  • RAM: Zentel A3R12E40DBF-AH ( 512Mb DDRII SDRAM)

possible information:

However, the device works so far with the tftp upgrade.

sudo uftpd -n -l info -o tftp=69 /home/koelner/tftp/
Starting FTP server on port 21 ...
Starting TFTP server on port 69 ...
Serving files from /home/koelner/tftp ...

tftp RRQ 'firmware.bin' from 192.168.10.101:2691

system boots up, power led is on
all (?) leds are on for a short time
the tftp firmware.bin is taken
WPS led flashes fast for 5 minutes/forever

hard reboot
power led
Power, WPS and second WiFi strength led (LAN related) is steady on

  1. at the back there are two pin pads (right under the cpu package), are those TX/RX?
  2. any hint to debug this?
1 Like

Due the restriction:

I have the SWV 733 A1 (I believe based off the Wavlink WN578B2). Telnet is open on port 23 and I am able to log in with the default user admin password admin. Looking in /etc/passwd there is no root user, but admin is UID 0!

I will post more details when I get round to it.

Thanks for looking after this. The problem is, I can't get an IP from the device after flashing openwrt, using the the default range 192.168.1.1/24 didn't work either.
I was hoping for an uart access to get the bootlog

Which firmware was it that you flashed? I think your device, mine, and the already supported WN575A3 are identical, but I'm not sure. They all use the same SoC, WLAN5 chip and same size Flash / RAM.

As for those contacts, I have no idea. I wouldn't think so, as usually there's three or four (TX, RX, GND and sometimes VCC). Measure them with a multimeter.

I took this one: http://downloads.openwrt.org/snapshots/targets/ramips/mt76x8/openwrt-ramips-mt76x8-wavlink_wl-wn577a2-squashfs-sysupgrade.bin

But I will try the WN575A3

//Edit Did not work so far, the sysupgrade was copied from the tftp server, but I can't get a connect over ethernet neither a wifi AP spawns.

Okay, I have opened mine. Interestingly, the sticker inside shows WN578A2-A, which is not a product listed on Wavlink's site. The PCB is nearly identical to yours, with an extra RJ45 and no ribbon cable on the back. The PCB even shows WS-WN578A2-A-V1.1, same as yours with a .1 version difference.

I really do not want to meet the person who named these things.

Photo:

Edit: After more digging I found out a company called Winstars is the real OEM, but Wavlink (who I originally thought to be the OEM) is simply a brand, operated by Winstars. Wavlink's model names start "WL-" and Winstars' "WS-".

Most builds have WiFi disabled by default. As for ethernet, that should work. It could be that the the 575A3 and 577A2 have a different ethernet switch, but I'm not sure. Or, it may be because you only have one ethernet port on your device and others models two. Depending on how it's configured by default, OpenWRT might think the ethernet port is meant to be the wan port and attaches it to the wan interface, instead of br-lan. Ssh isn't available on wan by default and DHCP obviously won't work.

I'll try on my own device and see what happens. If it doesn't work, I might try making an image with a custom network config, with WiFi enabled.

I have compiled some firmware which should have wifi enabled on first boot.

Not sure if it will work, but it should do. The target profile is WL-WN577A2, LEDs may be broken, and it will probably show a nonexistent second ethernet port. I've not changed any of the default included packages, other than adding LuCI. Download is here.

Upload via the same method of tftp.

Ok, I think the device is bricked. the tftp method does not work further more.

Hmm, that isn't good. That means the bootloader is probably broken.

Let's remain hopeful and presume the bootloader is still in some useable state. You need to connect via serial. Going back to your original question, those pads on the back of the PCB, near the SoC, are indeed UART. I just checked myself. On your image, the lower one is RX and the upper is TX.

Otherwise, basically the only option left is to reprogram the flash chip manually.

Ok, bootlog is working. [factory broken uart adapter grml]

bt -b 56700
No port specified, using ttyUSB0 (last registered). Use -l to list ports.
Trying port ttyUSB0... Connected to ttyUSB0 at 56737 bps.
Escape character is 'Ctrl-]'. Use escape followed by '?' for help.

[03080C0F][03080D08][887F0000][2428483F][00242848]
DU Setting Cal Done


U-Boot 1.1.3 (Feb  6 2018 - 14:51:57)

Board: Ralink APSoC DRAM:  64 MB
relocate_code Pointer at: 83fa0000
flash manufacture id: c8, device id 40 17
find flash: GD25Q64B
*** Warning - bad CRC, using default environment

============================================ 
Ralink UBoot Version: 5.0.0.0
-------------------------------------------- 
ASIC 7628_MP (Port5<->None)
DRAM component: 512 Mbits DDR, width 16
DRAM bus: 16 bit
Total memory: 64 MBytes
Flash component: SPI Flash
Date:Feb  6 2018  Time:14:51:57
============================================ 
icache: sets:512, ways:4, linesz:32 ,total:65536
dcache: sets:256, ways:4, linesz:32 ,total:32768 

 ##### The CPU freq = 580 MHZ #### 
 estimate memory size =64 Mbytes
RESET MT7628 PHY!!!!!!
Please choose the operation: 
   1: Load system code to SDRAM via TFTP. 
   2: Load system code then write to Flash via TFTP. 
   3: Boot system code via Flash (default).
   4: Enter boot command line interface.
   7: Load Boot Loader code then write to Flash via Serial. 
   9: Load Boot Loader code then write to Flash via TFTP. 
default: 3
 0 
81808100   
3: System Boot system code via Flash.
## Booting image at bc050000 ...
   Image Name:   MIPS OpenWrt Linux-5.4.109
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    2122529 Bytes =  2 MB
   Load Address: 80000000
   Entry Point:  80000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 64

Starting kernel ...

[    0.000000] Linux version 5.4.109 (builder@buildhost) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r16407-1db4681617)) #0 Sun Apr 4 09:51:25 2021
[    0.000000] Board has DDR2
[    0.000000] Analog PMU set to hw control
[    0.000000] Digital PMU set to hw control
[    0.000000] SoC Type: MediaTek MT7628AN ver:1 eco:2
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019655 (MIPS 24KEc)
[    0.000000] MIPS: machine is Wavlink WL-WN575A3
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16240
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.000000] Writing ErrCtl register=00029e3e
[    0.000000] Readback ErrCtl register=00029e3e
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 56996K/65536K available (5066K kernel code, 202K rwdata, 1116K rodata, 1224K init, 205K bss, 8540K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 256
[    0.000000] intc: using register map from devicetree
[    0.000000] random: get_random_bytes called from start_kernel+0x308/0x4fc with crng_init=0
[    0.000000] CPU Clock: 580MHz
[    0.000000] timer_probe: no matching timers found
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6590553264 ns
[    0.000010] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
[    0.015389] Calibrating delay loop... 385.02 BogoMIPS (lpj=770048)
[    0.059445] pid_max: default: 32768 minimum: 301
[    0.068783] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.083115] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.104785] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.123993] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.137498] pinctrl core: initialized pinctrl subsystem
[    0.150744] NET: Registered protocol family 16
[    0.269744] mt7620-pci 10140000.pcie: Port 0 N_FTS = 1b105000
[    0.430582] PCI host bridge /pcie@10140000 ranges:
[    0.439927]  MEM 0x0000000020000000..0x000000002fffffff
[    0.450240]   IO 0x0000000010160000..0x000000001016ffff
[    0.483846] PCI host bridge to bus 0000:00
[    0.491886] pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
[    0.505417] pci_bus 0000:00: root bus resource [io  0xffffffff]
[    0.517101] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.530514] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.546224] pci 0000:00:00.0: [14c3:0801] type 01 class 0x060400
[    0.558072] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    0.570427] pci 0000:00:00.0: reg 0x14: [mem 0x00000000-0x0000ffff]
[    0.582888] pci 0000:00:00.0: supports D1
[    0.590716] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    0.603610] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.619560] pci 0000:01:00.0: [14c3:7650] type 00 class 0x028000
[    0.631383] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff]
[    0.643857] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    0.656085] pci 0000:01:00.1: [14c3:8650] type 00 class 0x0d1100
[    0.667904] pci 0000:01:00.1: reg 0x10: [mem 0x00000000-0x000fffff]
[    0.680368] pci 0000:01:00.1: supports D1
[    0.688153] pci 0000:01:00.1: PME# supported from D0 D1 D3hot D3cold
[    0.702201] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    0.715185] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 01
[    0.728262] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    0.741297] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    0.755059] pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x201fffff]
[    0.768475] pci 0000:00:00.0: BAR 1: assigned [mem 0x20200000-0x2020ffff]
[    0.781903] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x200fffff]
[    0.795315] pci 0000:01:00.1: BAR 0: assigned [mem 0x20100000-0x201fffff]
[    0.808728] pci 0000:00:00.0: PCI bridge to [bus 01]
[    0.818530] pci 0000:00:00.0:   bridge window [mem 0x20000000-0x201fffff]
[    0.832059] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    0.855981] clocksource: Switched to clocksource MIPS
[    0.867292] NET: Registered protocol family 2
[    0.876927] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.893413] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.908481] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.922410] TCP: Hash tables configured (established 1024 bind 1024)
[    0.935117] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.947974] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.962021] NET: Registered protocol family 1
[    0.970619] PCI: CLS 0 bytes, default 32
[    0.983058] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[    1.004465] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    1.015917] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    1.051342] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    1.069265] mt7621_gpio 10000600.gpio: registering 32 gpios
[    1.080525] mt7621_gpio 10000600.gpio: registering 32 gpios
[    1.091774] mt7621_gpio 10000600.gpio: registering 32 gpios
[    1.103062] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    1.118492] printk: console [ttyS0] disabled
[    1.126933] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 28, base_baud = 2500000) is a 16550A
[    1.144742] printk: console [ttyS0] enabled
[    1.144742] printk: console [ttyS0] enabled
[    1.161215] printk: bootconsole [early0] disabled
[    1.161215] printk: bootconsole [early0] disabled
[    1.181330] spi-mt7621 10000b00.spi: sys_freq: 193333333
[    1.203633] spi-nor spi0.0: gd25q64 (8192 Kbytes)
[    1.213079] 4 fixed-partitions partitions found on MTD device spi0.0
[    1.225667] Creating 4 MTD partitions on "spi0.0":
[    1.235169] 0x000000000000-0x000000030000 : "u-boot"
[    1.246146] 0x000000030000-0x000000040000 : "u-boot-env"
[    1.257865] 0x000000040000-0x000000050000 : "factory"
[    1.269081] 0x000000050000-0x000000800000 : "firmware"
[    1.284706] 2 uimage-fw partitions found on MTD device firmware
[    1.296497] Creating 2 MTD partitions on "firmware":
[    1.306363] 0x000000000000-0x000000206361 : "kernel"
[    1.317340] 0x000000206361-0x0000007b0000 : "rootfs"
[    1.328440] mtd: device 5 (rootfs) set to be root filesystem
[    1.341881] 1 squashfs-split partitions found on MTD device rootfs
[    1.354212] 0x0000004b0000-0x0000007b0000 : "rootfs_data"
[    1.366831] libphy: Fixed MDIO Bus: probed
[    1.386505] rt3050-esw 10110000.esw: link changed 0x00
[    1.398752] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[    1.417382] NET: Registered protocol family 10
[    1.430886] Segment Routing with IPv6
[    1.438375] NET: Registered protocol family 17
[    1.447265] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    1.472940] 8021q: 802.1Q VLAN Support v1.8
[    1.492046] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
[    1.512939] Freeing unused kernel memory: 1224K
[    1.521933] This architecture does not have kernel memory protection.
[    1.534687] Run /sbin/init as init process
[    1.735981] random: fast init done
[    2.523522] init: Console is alive
[    2.530680] init: - watchdog -
[    3.668861] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    3.854935] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.879838] init: - preinit -
[    5.738919] random: jshn: uninitialized urandom read (4 bytes read)
[    5.919882] random: jshn: uninitialized urandom read (4 bytes read)
[    6.202115] random: jshn: uninitialized urandom read (4 bytes read)
[    6.750166] rt3050-esw 10110000.esw: link changed 0x00
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    6.976336] urandom_read: 2 callbacks suppressed
[    6.976345] random: procd: uninitialized urandom read (4 bytes read)
[   11.224303] jffs2: notice: (453) jffs2_build_xattr_subsystem: complete building xattr subsystem, 8 of xdatum (0 unchecked, 3 orphan) and 9 of xref (3 dead, 0 orphan) found.
[   11.257005] mount_root: switching to jffs2 overlay
[   11.271111] overlayfs: upper fs does not support tmpfile.
[   11.289792] urandom-seed: Seeding with /etc/urandom.seed
[   11.433700] procd: - early -
[   11.440187] procd: - watchdog -
[   12.045243] procd: - watchdog -
[   12.052322] procd: - ubus -
[   12.186134] random: ubusd: uninitialized urandom read (4 bytes read)
[   12.256792] random: ubusd: uninitialized urandom read (4 bytes read)
[   12.272184] random: ubusd: uninitialized urandom read (4 bytes read)
[   12.288522] procd: - init -
Please press Enter to activate this console.
[   13.272220] kmodloader: loading kernel modules from /etc/modules.d/*
[   13.487081] Loading modules backported from Linux version v5.10.16-0-gde53befa79cf
[   13.502161] Backport generated by backports.git v5.10.16-1-0-g21d2a1d2
[   13.590798] xt_time: kernel timezone is -0000
[   13.828475] mt76_wmac 10300000.wmac: ASIC revision: 76280001
[   13.892797] urngd: v1.0.2 started.
[   14.094579] random: crng init done
[   14.101356] random: 1 urandom warning(s) missed due to ratelimiting
[   14.894146] mt76_wmac 10300000.wmac: Firmware Version: 20151201
[   14.905956] mt76_wmac 10300000.wmac: Build Time: 20151201183641
[   14.963994] mt76_wmac 10300000.wmac: firmware init done
[   15.296940] PPP generic driver version 2.4.2
[   15.321046] NET: Registered protocol family 24
[   15.372581] kmodloader: done loading kernel modules from /etc/modules.d/*
[   27.201816] br-lan: port 1(eth0.1) entered blocking state
[   27.212607] br-lan: port 1(eth0.1) entered disabled state
[   27.223737] device eth0.1 entered promiscuous mode
[   27.233283] device eth0 entered promiscuous mode
[   27.319079] br-lan: port 1(eth0.1) entered blocking state
[   27.329847] br-lan: port 1(eth0.1) entered forwarding state
[   28.212520] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready

root@OpenWrt:/etc/config# ip a
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
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN qlen 1000
    link/ether 80:3f:5d:91:34:4d brd ff:ff:ff:ff:ff:ff
    inet6 fe80::823f:5dff:fe91:344d/64 scope link 
       valid_lft forever preferred_lft forever
4: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN qlen 1000
    link/ether 80:3f:5d:91:34:4f 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 80:3f:5d:91:34:4d brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.1/24 brd 192.168.1.255 scope global br-lan
       valid_lft forever preferred_lft forever
    inet6 fd19:c20b:d37e::1/60 scope global noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 fe80::823f:5dff:fe91:344d/64 scope link 
       valid_lft forever preferred_lft forever
6: eth0.1@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether 80:3f:5d:91:34:4d 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 80:3f:5d:91:34:4e brd ff:ff:ff:ff:ff:ff
    inet6 fe80::823f:5dff:fe91:344e/64 scope link 
       valid_lft forever preferred_lft forever
root@OpenWrt:/etc/config# ip l
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 80:3f:5d:91:34:4d brd ff:ff:ff:ff:ff:ff
4: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN qlen 1000
    link/ether 80:3f:5d:91:34:4f 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 80:3f:5d:91:34:4d 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 80:3f:5d:91:34:4d 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 80:3f:5d:91:34:4e brd ff:ff:ff:ff:ff:ff

the br-lan should work, but it is not possible to get an ip from the dhcp. It seems that even the ethernet link does not work there. But I need to test it furthermore.

I don't know why but the bootloader needs now an input from the serial to boot from tftp, the button press while powering up is not enough.

Thank you for the support

Okay, that's odd. At least it's kinda working now.

I used this datasheet here: http://vonger.cn/upload/MT7628_Full.pdf
So far:
MT7628AN DR-QFN (12mm x 12mm) 156-PinPackage Diagram
UART0 Lite is connected to backside

  • 31 UART_RXD0
  • 30 UART_TXD0

Th SW3 (separate PCB for WPS button) is the same to to main pcb button right over the T9 marking. The 6th LED on the left side at the main pcb is not populated. The separeted pcb has three LEDs (WAN, PWR, WPS; LAN is not used)

However, the datasheet show under 2.3 pin sharing schemes. are those GPIO numbering schemes identical to those in the dts file?

@Weissnix4711 can you control the 6 populated LEDs on the right side?
I assume that the top three are the rssi strength, WAN, LAN, Power/WPS ?

Yes I can control all GPIOs, and you should be able to as well. If you wanted to configure the LEDs properly (ie. via uci), you would need to add support for the device in OpenWRT, by making a dts file.

I have been able to find the following information about my own device:

  • wifi-high 37
  • wifi-med 75
  • wifi-low mt76-phy0
  • wan GPIO 39
  • lan GPIO 40
  • wps 4

I would presume the dts numbers would be identical to those on the data sheet. Also the ones I listed should be identical for your device, although you said WPS wasn't populated. And you would use lan / wan as extra rssi LEDs.

I would be interested to see the second PCB with the button and leds. I don't imagine it to be particularly complex. Is the lan LED actually there, or has it been omitted entirely. If it is, you could control that as well. Not sure what purpose you would find for it, but hey, you could.

You're going to have to find out those GPIO pin numbers yourself for those extra LEDs. There's a little script here which should help you identify which pins.

I try next week to build a complete pull request for this device.

root@OpenWrt:~# dmesg | grep gpio
[    1.033932] mt7621_gpio 10000600.gpio: registering 32 gpios
[    1.045248] mt7621_gpio 10000600.gpio: registering 32 gpios
[    1.056493] mt7621_gpio 10000600.gpio: registering 32 gpios
root@OpenWrt:~# cd /sys/class/gpio/
root@OpenWrt:/sys/class/gpio# ls
export       gpiochip416  gpiochip448  gpiochip480  unexport
oot@OpenWrt:/sys/class/leds# ls
green:lan  green:wan  green:wps  mt76-phy0  mt76-phy1


40 green:lan wifi 1.
39 green:wan wifi 2.
 4 green:wps wps 
 5 wifi 5. (0 on)
12 wifi 3. (0 on)
 2 lan/wan (0 on)
11 wifi 4. (0 on)

and for the switch (maybe this could be useful):

9 repeater mode on (1 on)
10 access point mode on (1 on)

the git diff :

I completely forgot about the repeater / AP mode switch. That's a good call. I don't think it would be possible to make it functional in OpenWRT though? (That would require changing the config).

Btw in the DTS file, the GPIO numbers should be actual gpio# - base #. The base being /sys/class/gpio/[lowestgpiochip]/base. Or at least, that's what worked for me lol.

I tested the led with this script: https://openwrt.org/docs/techref/hardware/port.gpio#script_blink_all

The sysupgrade with the first build boots.
Some things do not work properly:

  • activate the AP per default
  • fix 5th wifi led [gpio 453/ base 448]
  • fix 3th wifi led [gpio 460/base 448]
  • fix button register/action mapping/slide-switch improvement
  • research stacktrace in kernellog
  • fix eth0 port to lan not wan per default
  • map wan/lan to active eth port

Edit the file target/linux/ramips/mt76x8/base-files/etc/board.d/02_network and add an entry in ramips_setup_interfaces(). The following should work, but I am not entirely sure whether it's port 3 or 4 which you're missing or using.

wavlink,wl-wn576a2)
	ucidef_add_switch "switch0" \
		"4:lan" "6@eth0"
	;;

Also add an entry for setting up the mac address. If our firmware matches, it'll be something along the lines of:

wavlink,wl-wn578a2)
	wan_mac=$(mtd_get_mac_binary factory 0x2e)
	label_mac=$(mtd_get_mac_binary factory 0x4)
	;;

You can check by doing hexdump on mtd2 (factory partition)

That I'm not so sure about. The way I did it on the firmware I built earlier was to add a custom network config file. That isn't the "official" way of doing things though. I presume you would add something to the 02_network file, but I honestly have no clue.

For me, it's also GPIO 453 and 460, although I wrote 37 and 44 in the DTS file (The base being 416). That seems to have worked.

The only one which I couldn't get to work was my wifi-med (your wifi-high). I know it's actually gpio491, but I'm unsure what that should be in the DTS file. I'll try what you used.

Oh and btw you should probably change ALT0_MODEL to SWV 733 B1, as that's what it's referred to on the box and label. Spaces don't matter in the makefile, in fact there's quite a few models with spaces in. Ofc in the DTS file, compatible section, you can't use spaces and they should be substituted with hyphens.