m2 for 5g moudle not show up on my openwrt build
Any progress on this? I bought the same router.
If you can give dump for some partion i will back to work
My device you can send me mail
[Admin edit: email removed. Please use PMs to coordinate]
I have a semi working OpenWrt snapshot for WS1610. I have fixed most of the dts
5G modem works, Wifi works, 1G Lan port works.
However the 2.5G LAN/WAN port RTL8221 is a b*tch. The stock firmware seems to use some out of tree “glue” to make it work and right now I haven’t been able to figure it out.
If anybody else is interested in working on this device I can push my stuff to git so others can take a look.
Well seems like I fixed that last issue too
1 Like
Been running Openwrt on this router for 2 weeks now and it has been stable. I fixed my PR and all of the test passed. I’d be glad if anybody else would like to test on their device / review the PR so it could be merged.
main ← MayorBug:ws1610
opened 10:57AM - 10 Jan 26 UTC
Add initial support for the Huasifei WS1610 router (board ID: M01K45) based on t… he MediaTek MT7981B SoC.
## Hardware overview
- Device: Huasifei WS1610 (vendor board ID: M01K45)
- SoC: MediaTek MT7981B (dual-core, ~1.3 GHz)
- RAM: 1 GiB DDR4
- Flash: 256 MiB SPI NAND (NMBM)
- Wi-Fi: MT7976CN, dual-band 2.4 GHz + 5 GHz (AX3000 class)
- Ethernet: 2.5G (RTL8221B, 2500base-x) + 1G (internal PHY)
- SIM: 2x Nano SIM (active SIM selected via modem AT commands)
- M.2 and PCIe slot: both USB-modem oriented
- LEDs: power (un-managed), wifi, lan, sim1, sim2, 4g, 5g
- Button: reset
## Flash layout (SPI NAND, NMBM)
Based on the U-Boot MTD layout:
```
bl2 0x00000000 - 0x00100000
u-boot-env 0x00100000 - 0x00180000 (unused)
factory 0x00180000 - 0x00380000
fip 0x00380000 - 0x00580000
woem 0x00580000 - 0x00620000 (boot slot selector)
ubi 0x00620000 - 0x07620000 (slot A)
ubi2 0x07620000 - 0x0e620000 (slot B)
wtinfo 0x0e620000 - 0x0e680000
nvram 0x0e680000 - 0x0e6e0000
```
## A/B slot behavior (vendor)
The device uses a vendor A/B UBI scheme:
- Slot A: `ubi` (mtd6)
- Slot B: `ubi2` (mtd7)
Boot selection is controlled via metadata in the `woem` partition:
- Header: `WTUP` at offset 0x0
- Slot byte at offset 0x4:
- `0x00` boots `ubi`
- `0x01` boots `ubi2`
Vendor tooling:
- `wtoem -r` toggles the active slot.
- The stock upgrader always calls `wtoem -r`, even if flashing fails.
## Flashing options
### 1) Initramfs boot (safest)
Important limitations:
- Stock U-Boot never brings up Ethernet (`mdio_register … No ethernet found`).
- TFTP boot is not possible.
- All image transfers must be done over serial (YMODEM).
Requirements:
- Confirm the device is booting from `ubi` (check boot log).
- Serial access using `tio`.
- YMODEM support via `lrzsz`.
- Keep baud rate at 115200 (higher rates are rejected).
- U-Boot ignores shell variable expansion, so literal addresses must be used.
Transfer and boot:
```
setenv loadaddr 0x46000000
loady 0x46000000 115200
# In `tio` session:
# 1. Press `Ctrl+t` then `y`.
# 2. paste path to initramfs `~/openwrt-mediatek-filogic-huasifei_ws1610-initramfs-kernel.bin` enter
# 3. Wait ~15 min for the image to transfer, when U-Boot prints the byte count:
bootm 0x46000000
```
If transfer stalls with `......??????`, power-cycle the board, verify UART wiring, and retry.
Once initramfs is running, flash OpenWrt using `sysupgrade`.
### 2) U-Boot firmware recovery / update (UART) - (Easy)
U-Boot provides a menu-based firmware upgrade path:
1) Power on the device.
2) Press Esc to stop autoboot.
3) Type `bootmenu` and press Enter.
4) Quickly press Down to select **Upgrade firmware** (menu times out quickly).
5) Choose YMODEM.
6) Send the OpenWrt factory image.
7) U-Boot writes both slots and reboots.
8) Sets boot selector to `ubi`
This is the most reliable recovery path.
### 3) Vendor flashing behavior from stock (Easiest, with risks!)
Stock firmware always flashes the inactive slot, then flips to it.
To reliably flash OpenWrt from stock firmware:
1) Confirm the device is booting from `ubi2` (check boot log).
2) If booting from `ubi`, flash stock vendor firmware again to flip slots safely.
3) Copy the OpenWrt factory image to `/tmp`.
4) SSH in and Run:
```
sysupgrade -n -F /tmp/openwrt-mediatek-filogic-huasifei_ws1610-squashfs-factory.bin
```
Stock writes `ubi` and flips to it.
Flashing via the vendor web UI fails due to RSA signature verification.
If flashing occurs while booted from `ubi`, the device will flip away from the freshly written OpenWrt slot and will be left in an unusable state (mixed up kernel and rootfs). Recovery via U-Boot is required.
## Manual slot control in U-Boot
The active slot can be forced by editing the `woem` partition:
```
mtd read woem 0x46000000 0x0 0x20000
md.b 0x46000000 0x10
# Boot ubi2
mw.b 0x46000000+4 0x01
mtd write woem 0x46000000 0x0 0x20000
# Boot ubi
mw.b 0x46000000+4 0x00
mtd write woem 0x46000000 0x0 0x20000
```
## Current OpenWrt upgrade behavior
OpenWrt sysupgrade writes a single UBI partition and does not modify the vendor slot selector.
This means a freshly flashed OpenWrt image may not boot until the slot selector is updated.
## Known quirks
- No Ethernet support in stock U-Boot.
- From Vendor firmware upgrade always flips slots, even on failure.
- 2.5G port LEDs require mdio-bus commands to enable/disable.
# Enable LED1 for 2.5G
mdio mdio-bus 0x06:0x1f 0xd034 0x0020
# Enable LED2 for 2.5G
mdio mdio-bus 0x06:0x1f 0xd032 0x0020
# Disable LED1 for 2.5G
mdio mdio-bus 0x06:0x1f 0xd034 0x0000
# Disable LED2 for 2.5G
mdio mdio-bus 0x06:0x1f 0xd032 0x0000
Default is off and these LED settings are not retained accross reboots