1. 28 8月, 2023 1 次提交
    • R
      ramips: add support for D-Link DRA-1360 · a4eb1ea3
      Rani Hod 提交于
      The DRA-1360 rev A is a wall-plug AC1300 repeater.
      Hardware is identical (same FCC ID, black case instead of white)
      to D-Link DAP-1620 rev B, which is already supported, but a
      different model name, revision, and hardware ID are needed.
      Thus, the bulk of the DAP-1620 device tree is extracted to a
      common dtsi included by the two models' device trees.
      
      Repeating specs and installation instructions from e4c7703d:
      (note that the RAM size mentioned there was incorrect, oops)
      
      Specs:
      - SoC: MT7621AT (880MHz dual-core MIPS1004Kc)
      - Memory: 128 MiB RAM, 16 MiB NOR SPI
      - WiFi: MT7615DN 2x2 802.11n + 2x2 802.11ac (DBDC)
      - Ethernet: 1 RJ45 port 10/100/1000
      - Power/status LED: red+green
      - LED RSSI bargraph: 2x green, 1x red+green
      
      Installation:
      - Keep reset button pressed during plug-in
      - Web Recovery Updater is at 192.168.0.50
        (pings are ignored, it listens only for http)
      - Upload factory.bin, confirm flashing
        (seems to work best with Chromium-based browsers)
      
      Revert to OEM firmware:
      - tail -c+117 DRA1360A1_FW112B03.bin | \
        openssl aes-256-cbc -d -md md5 -out decrypted.bin \
        -k c471706398cb147c6619f8a04a18d53e9c17ede8
      - flash decrypted.bin via D-Link Web Recovery
      Signed-off-by: NRani Hod <rani.hod@gmail.com>
      a4eb1ea3
  2. 01 7月, 2023 2 次提交
    • M
      ramips: add support for Sercomm S1500 devices · 2d6784a0
      Mikhail Zhilkin 提交于
      This commit adds support for following wireless routers:
       - Beeline SmartBox PRO (Serсomm S1500 AWI)
       - WiFire S1500.NBN (Serсomm S1500 BUC)
      
      This commit is based on this PR:
       - Link: https://github.com/openwrt/openwrt/pull/4770
       - Author: Maximilian Weinmann <x1@disroot.org>
      The opening of this PR was agreed with author.
      
      My changes:
      - Sorting, minor changes and some movings between dts and dtsi
      - Move leds to dts when possible
      - Recipes for the factory image
      - Update of the installation/recovery/return to stock guides
      - Add reset GPIO for the pcie1
      
      Common specification
      --------------------
      SoC:        MediaTek MT7621AT (880 MHz, 2 cores)
      Switch:     MediaTek MT7530 (via SoC MT7621AT)
      Wireless:   2.4 GHz, MT7602EN, b/g/n, 2x2
      Wireless:   5 GHz, MT7612EN, a/n/ac, 2x2
      Ethernet:   5 ports - 5×GbE (WAN, LAN1-4)
      Mini PCIe:  via J2 on PCB, not soldered on the board
      UART:       J4 -> GND[], TX, VCC(3.3V), RX
      BootLoader: U-Boot SerComm/Mediatek
      
      Beeline SmartBox PRO specification
      ----------------------------------
      RAM (Nanya NT5CB128M16FP): 256 MiB
      NAND-Flash (ESMT F59L2G81A): 256 MiB
      USB ports: 2xUSB2.0
      LEDs: Status (white), WPS (blue), 2g (white), 5g (white) + 10 LED Ethernet
      Buttons: 2 button (reset, wps), 1 switch button (ROUT<->REP)
      Power: 12 VDC, 1.5 A
      PCB Sticker: 970AWI0QW00N256SMT Ver. 1.0
      CSN: SG15********
      MAC LAN: 94:4A:0C:**:**:**
      Manufacturer's code: 0AWI0500QW1
      
      WiFire S1500.NBN specification
      ------------------------------
      RAM (Nanya NT5CC64M16GP): 128 MiB
      NAND-Flash (ESMT F59L1G81MA): 128 MiB
      USB ports: 1xUSB2.0
      LEDs: Status (white), WPS (white), 2g (white), 5g (white) + 10 LED Ethernet
      Buttons: 2 button (RESET, WPS)
      Power: 12 VDC, 1.0 A
      PCB Sticker: 970BUC0RW00N128SMT Ver. 1.0
      CSN: MH16********
      MAC WAN: E0:60:66:**:**:**
      Manufacturer's code: 0BUC0500RW1
      
      MAC address table (PRO)
      -----------------------
      use   address   source
      LAN   *:23      factory 0x1000 (label)
      WAN   *:24      factory $label +1
      2g    *:23      factory $label
      5g    *:25      factory $label +2
      
      MAC addresses (NBN)
      -------------------
      use   address   source
      LAN   *:0e      factory 0x1000
      WAN   *:0f      LAN +1 (label)
      2g    *:0f      LAN +1
      5g    *:10      LAN +2
      
      OEM easy installation
      ---------------------
      1. Remove all dots from the factory image filename (except the dot
         before file extension)
      2. Upload and update the firmware via the original web interface
      3. Two options are possible after the reboot:
         a. OpenWrt - that's OK, the mission accomplished
         b. Stock firmware - install Stock firmware (to switch booflag from
            Sercomm0 to Sercomm1) and then OpenWrt factory image.
      
      Return to Stock
      ---------------
      1. Change the bootflag to Sercomm1 in OpenWrt CLI and then reboot:
         printf 1 | dd bs=1 seek=7 count=1 of=/dev/mtdblock2
         reboot
      2. Install stock firmware via the web OEM firmware interface
      
      Recovery
      --------
      Use sercomm-recovery tool.
      Link: https://github.com/danitool/sercomm-recoveryTested-by: NPavel Ivanov <pi635v@gmail.com>
      Tested-by: NDenis Myshaev <denis.myshaev@gmail.com>
      Tested-by: NOleg Galeev <olegingaleev@gmail.com>
      Tested-By: NIvan Pavlov <AuthorReflex@gmail.com>
      Co-authored-by: NMaximilian Weinmann <x1@disroot.org>
      Signed-off-by: NMikhail Zhilkin <csharper2005@gmail.com>
      2d6784a0
    • W
      ramips: add support for Netgear EAX12 series · 32ea8a9a
      Wenli Looi 提交于
      Netgear EAX12, EAX11v2, EAX15v2 are wall-plug 802.11ax (Wi-Fi 6)
      extenders that share the SoC, WiFi chip, and image format with the
      WAX202.
      
      Specifications:
      * MT7621, 256 MiB RAM, 128 MiB NAND
      * MT7915: 2.4/5 GHz 2x2 802.11ax (DBDC)
      * Ethernet: 1 port 10/100/1000
      * UART: 115200 baud (labeled on board)
      
      All LEDs and buttons appear to work without state_default.
      
      Installation:
      * Flash the factory image through the stock web interface, or TFTP to
        the bootloader. NMRP can be used to TFTP without opening the case.
      
      Revert to stock firmware:
      * Flash the stock firmware to the bootloader using TFTP/NMRP.
      
      References in GPL source:
      https://www.downloads.netgear.com/files/GPL/EAX12_EAX11v2_EAX15v2_GPL_V1.0.3.34_src.tar.gz
      
      * target/linux/ramips/dts/mt7621-rfb-ax-nand.dts
        DTS file for this device.
      Signed-off-by: NWenli Looi <wlooi@ucalgary.ca>
      32ea8a9a
  3. 11 6月, 2023 1 次提交
    • M
      ramips: Add support for Beeline SmartBox TURBO+ · 8fcfb21b
      Maximilian Weinmann 提交于
      This adds support for Beeline Smart Box TURBO+ (Serсomm S3 CQR) router.
      
      Device specification
      --------------------
      SoC Type: MediaTek MT7621AT (880 MHz, 2 cores)
      RAM (Nanya NT5CC64M16GP): 128 MiB
      Flash (Macronix MX30LF1G18AC): 128 MiB
      Wireless 2.4 GHz (MT7603EN): b/g/n, 2x2
      Wireless 5 GHz (MT7615N): a/n/ac, 4x4
      Ethernet: 5 ports - 5×GbE (WAN, LAN1-4)
      USB ports: 1xUSB3.0
      Buttons: 2 button (reset, wps)
      LEDs: Red, Green, Blue
      Zigbee (EFR32MG1B232GG): 3.0
      Stock bootloader: U-Boot 1.1.3
      Power: 12 VDC, 1.5 A
      
      Installation (fw 2.0.9)
      -----------------------
      1.  Login to the web interface under SuperUser (root) credentials.
          Password: SDXXXXXXXXXX, where SDXXXXXXXXXX is serial number of the
          device written on the backplate stick.
      2.  Navigate to Setting -> WAN. Add:
             Name - WAN1
             Connection Type - Static
             IP Address - 172.16.0.1
             Netmask - 255.255.255.0
          Save -> Apply. Set default: WAN1
      3.  Enable SSH and HTTP on WAN. Setting -> Remote control. Add:
             Protocol - SSH
             Port - 22
             IP Address - 172.16.0.1
             Netmask - 255.255.255.0
             WAN Interface - WAN1
          Save ->Apply
          Add:
             Protocol - HTTP
             Port - 80
             IP Address - 172.16.0.1
             Netmask - 255.255.255.0
             WAN interface - WAN1
          Save -> Apply
      4.  Set up your PC ethernet:
             Connection Type - Static
             IP Address - 172.16.0.2
             Netmask - 255.255.255.0
             Gateway - 172.16.0.1
      5.  Connect PC using ethernet cable to the WAN port of the router
      6.  Connect to the router using SSH shell under SuperUser account
      7.  Make a mtd backup (optional, see related section)
      8.  Change bootflag to Sercomm1 and reboot:
              printf 1 | dd bs=1 seek=7 count=1 of=/dev/mtdblock3
              reboot
      9.  Login to the router web interface under admin account
      10. Remove dots from the OpenWrt factory image filename
      11. Update firmware via web using OpenWrt factory image
      
      Revert to stock
      ---------------
      Change bootflag to Sercomm1 in OpenWrt CLI and then reboot:
         printf 1 | dd bs=1 seek=7 count=1 of=/dev/mtdblock3
      
      mtd backup
      ----------
      1. Set up a tftp server (e.g. tftpd64 for windows)
      2. Connect to a router using SSH shell and run the following commands:
            cd /tmp
            for i in 0 1 2 3 4 5 6 7 8 9 10; do nanddump -f mtd$i /dev/mtd$i; \
            tftp -l mtd$i -p 172.16.0.2; md5sum mtd$i >> mtd.md5; rm mtd$i; done
            tftp -l mtd.md5 -p 171.16.0.2
      
      Recovery
      --------
      Use sercomm-recovery tool.
      Link: https://github.com/danitool/sercomm-recovery
      
      MAC Addresses (fw 2.0.9)
      ------------------------
      +-----+------------+---------+
      | use | address    | example |
      +-----+------------+---------+
      | LAN | label      | *:e8    |
      | WAN | label + 1  | *:e9    |
      | 2g  | label + 4  | *:ec    |
      | 5g  | label + 5  | *:ed    |
      +-----+------------+---------+
      The label MAC address was found in Factory 0x21000
      
      Factory image format
      --------------------
      +---+-------------------+-------------+--------------------+
      | # | Offset            | Size        | Description        |
      +---+-------------------+-------------+--------------------+
      | 1 | 0x0               | 0x200       | Tag Header Factory |
      | 2 | 0x200             | 0x100       | Tag Header Kernel1 |
      | 3 | 0x300             | 0x100       | Tag Header Kernel2 |
      | 4 | 0x400             | SIZE_KERNEL | Kernel             |
      | 5 | 0x400+SIZE_KERNEL | SIZE_ROOTFS | RootFS(UBI)        |
      +---+-------------------+-------------+--------------------+
      Co-authored-by: NMikhail Zhilkin <csharper2005@gmail.com>
      Signed-off-by: NMaximilian Weinmann <x1@disroot.org>
      8fcfb21b
  4. 07 5月, 2023 1 次提交
    • M
      ramips: add support for SNR-CPE-ME1 · ecdb2481
      Maximilian Weinmann 提交于
      SNR-CPE-ME1 is a wireless WiFi 5 router manufactured by SNR/NAG company.
      
      Specification:
          - SoC           : MediaTek MT7621A
          - RAM           : DDR3 256 MiB
          - Flash         : SPI-NOR 16 MiB (GD25Q128CSIG)
          - WLAN          : 2.4 GHz (MediaTek MT7603EN)
                            5 GHz (MediaTek MT7610EN)
          - Ethernet      : 10/100/1000 Mbps x5
            - Switch      : MediaTek MT7530 (in SoC)
          - USB           : 3.0 x1
          - UART          : through-hole on PCB
            - [J4] 3.3V, RX, TX, GND (57600n8)
          - Power         : 12 VDC, 2 A
      
      Flash instruction via TFTP:
          1. Boot SNR-CPE-ME1 to recovery mode
              (hold the reset button while power on)
          2. Send firmware via TFTP client:
             TFTP Server address: 192.168.1.1
             TFTP Client address: 192.168.1.131
          3. Wait ~120 seconds to complete flashing
          4. Do sysupgrade using web-interface
      Signed-off-by: NMaximilian Weinmann <x1@disroot.org>
      ecdb2481
  5. 30 4月, 2023 1 次提交
    • R
      ramips: add support for D-Link DAP-1620 B1 · e4c7703d
      Rani Hod 提交于
      The DAP-1620 rev B is a wall-plug AC1300 repeater.
      
      Specifications:
      - MT7621AT, 256 MiB RAM, 16 MiB SPI NOR
      - MT7615DN 2x2 802.11n +2x2 802.11ac (DBDC)
      - Ethernet: 1 port 10/100/1000
      - Status LEDs (1x red+green)
      - LED RSSI bargraph (2x green, 1x red+green)
      
      Installation:
      - Keep reset button pressed during plug-in
      - Web Recovery Updater is at 192.168.0.50
      - Upload factory.bin, confirm flashing
        (seems to work best with Chromium-based browsers)
      
      Revert to OEM firmware:
      - tail -c+117 DAP1620B1_FW212B03.bin | \
        openssl aes-256-cbc -d -md md5 -out decrypted.bin \
        -k 905503a4e0c3cd3c1ce062246de427a68962347e
      - flash decrypted.bin via D-Link Web Recovery
      Signed-off-by: NRani Hod <rani.hod@gmail.com>
      e4c7703d
  6. 15 3月, 2023 1 次提交
    • D
      ramips: add support for TP-Link Archer AX23 v1 · 7dceef5e
      David Bauer 提交于
      Hardware
      --------
      CPU:    MediaTek MT7621 DAT
      RAM:    128MB DDR3 (integrated)
      FLASH:  16MB SPI-NOR ()
      WiFi:   MediaTek MT7905 + MT7975 (2.4 / 5 DBDC) 802.11ax
      SERIAL: 115200 8N1
              LEDs - (3V3 - GND - RX - TX) - ETH ports
      
      Installation
      ------------
      
      Upload the factory image using the Web-UI.
      
      Web-Recovery
      ------------
      
      The router supports a HTTP recovery mode by holding the reset-button
      when powering on. The interface is reachable at 192.168.0.1 and supports
      installation using the factory image.
      Signed-off-by: NDavid Bauer <mail@david-bauer.net>
      7dceef5e
  7. 04 3月, 2023 1 次提交
    • H
      ramips: add support for D-Link Dir-853 A1 · e4519571
      Hang Zhou 提交于
      Specifications:
      * SoC: MT7621AT
      * RAM: 256MB (NT5CC64M16GP-DI)
      * Flash: 16MB NOR SPI flash (GD25Q127CSIG, using GD25Q128C driver)
      * WiFi: MT7615DN (2.4GHz+5Ghz) with DBDC
      * Ethernet: 4x1000M LAN, 1x 1000M WAN
      * LEDs: Power Blue+Orange,Wan Blue+Orange,WPS Blue,"2.4G"Blue, "5G" Blue,
        USB Blue
      * Buttons: Reset,WPS, Wifi
      * Serial interface: on board but not populated, pinout (from the DC jack
      side to the WAN port side) is "3.3V Input Output Gnd". Baud rate is 57600,
      settings are 8 data bits, no parity bit, one stop bit, and no flow control.
      
      Stock flash layout:
      ```
      GD25Q128C(c8 40180000) (16384 Kbytes)
      mtd .name = raspi, .size = 0x01000000 (16M) .erasesize = 0x00010000 (64K)
      .numeraseregions = 0
      Creating 7 MTD partitions on "raspi":
      0x000000000000-0x000001000000 : "ALL"
      0x000000000000-0x000000030000 : "Bootloader"
      0x000000030000-0x000000040000 : "Config"
      0x000000040000-0x000000050000 : "Factory"
      0x000000050000-0x000000060000 : "Config2"
      0x000000060000-0x000000fb0000 : "Kernel"
      0x000000fb0000-0x000001000000 : "Private"
      ```
      The kernel partition will be replaced with the OpenWrt image, the other
      partitions are left untouched.
      
      "Config2" seems to be the config storage used by the stock firmware.
      
      "Private" is a 320kB empty JFFS2 partition that comes with the stock
      firmware. One can get a larger space for OpenWrt by merging it with
      "Kernel".
      
      OpenWrt flash layout:
      ```
      0x000000000000-0x000000030000 : "u-boot"
      0x000000030000-0x000000040000 : "u-boot-env"
      0x000000040000-0x000000050000 : "factory"
      0x000000050000-0x000000060000 : "config2_stock"
      0x000000060000-0x000000fb0000 : "firmware"
      0x000000fb0000-0x000001000000 : "private_stock"
      ```
      
      The OpenWrt image must have 96 bytes of padding in the header.
      
      MAC addresses on OEM firmware:
      |      		| location on the flash 	| notes    	|
      |------		|-----------------------	|----------	|
      | lan (eth2) 	| factory + 0xe000      	| on label 	|
      | wan (eth3) 	| factory + 0xe006      	|          	|
      | 2.4g (rax0) 	| not on flash          	| lan + 1  	|
      | 5g (ra0) 	| not on flash          	| lan + 2  	|
      
      Mac addresses of the 2.4g and 5g interface are stored as ASCII strings in
      the u-boot-env partition, but they are not used. OpenWrt calculates
      Wifi Mac addresses based on the LAN Mac.
      
      Flash and test instructions:
      Flash the encrypted image (available in the OpenWrt forum) through the
      stock D-Dink web interface.
      
      1. Open the case, and solder the 4-pin header near the WAN port.
      2. Connect it to a USB-UART TTL (3.3V) adapter, no need to connect VCC.
      3. Open a terminal emulator (e.g. `screen /dev/ttyUSB0` on linux) with
      the settings mentioned above.
      4. Setup a TFTP server on your PC that can serve
      `xxx-ramips-mt7621-dlink_dir-853-a1-initramfs-kernel.bin`.
      5. Connect any LAN port to your PC and set a static IPv4 address to
      192.168.0.101 (netmask 255.255.255.0).
      6. Power on the device and keeps pressing 1 until you see the prompt.
      7. Use default IP addresses and enter the file name accordingly, then hit
      enter.
      8. Wait until it boots to OpenWrt, the default IP address is 192.168.1.1,
      you need to change your PC network adapter to use DHCP in order to access
      LUCI.
      9. So far, the OpenWrt runs in RAM and the flash contents are not touched.
      You can try OpenWrt without having to overwrite the stock firmware, a
      reboot clears all changes.
      10. Optionally, backup the stock firmware (the "firmware" partition) in
      Luci.
      11. To permantly install OpenWrt to the device , click
      on "System -> Backup/Flash Firmware" in Luci and flash
      `xxx-ramips-mt7621-dlink_dir-853-a1-squashfs-sysupgrade.bin`
      
      Known problems:
      * WLAN0 defaults to 5G after a fresh installation, to enable 2.4G network,
      you need to config it manually in LUCI.
      
      * If you see jffs2 related warnings/errors after updating from the stock
      web interface, you need to do a reset in LUCI. The error will be gone after
      a cold reboot.
      Signed-off-by: NHang Zhou <929513338qq@gmail.com>
      e4519571
  8. 19 2月, 2023 1 次提交
    • A
      ramips: add support for Huasifei WS1208V2 · efbb623d
      Arınç ÜNAL 提交于
      The Huasifei WS1208V2 is an AC1200 router featuring 5 Ethernet ports with a
      Quectel RM520N-GL cellular modem which supports QMI and MBIM modes.
      
      Specifications:
      - MT7621AT, 256 MiB RAM, 16 MiB SPI Flash
      - MT7603EN 2.4 GHz & MT7612EN 5 GHz WLAN
      - Quectel RM520N-GL Cellular Modem
      - 2 WLAN & 4 Cellular Antennas
      - 5 Gigabit Ethernet Ports
      - 1 USB 2.0 port
      - 1 PCI-E Slot
      - 1 M.2 slot
      - 1 SIM card slot
      - 1 SD card slot
      
      Installation:
      - Install sysupgrade image via ROOter OS.
      
      TFTP Recovery:
      - Connect to serial console.
      - Boot initramfs image by choosing option 1 when U-Boot prompts.
      - Install sysupgrade image via OpenWrt.
      
      Link: https://www.huasifei.com/a/Products/5G%20CPE/240.htmlSigned-off-by: NArınç ÜNAL <arinc.unal@arinc9.com>
      efbb623d
  9. 13 2月, 2023 1 次提交
    • K
      ramips: add support for ASUS RT-AX54 · 92276eef
      Karl Chan 提交于
      Specifications:
      - Device: ASUS RT-AX54 (AX1800S/HP,AX54HP)
      - SoC: MT7621AT
      - Flash: 128MB
      - RAM: 256MB
      - Switch: 1 WAN, 4 LAN (10/100/1000 Mbps)
      - WiFi: MT7905 2x2 2.4G + MT7975 2x2 5G
      - LEDs: 1x POWER (blue, configurable)
              1x LAN (blue, configurable)
              1x WAN (blue, configurable)
      	1x 2.4G (blue, not configurable)
      	1x 5G (blue, not configurable)
      
      Flash by U-Boot TFTP method:
      - Configure your PC with IP 192.168.1.2
      - Set up TFTP server and put the factory.bin image on your PC
      - Connect serial port(rate:115200) and turn on AP, then interrupt "U-Boot Boot Menu" by hitting any key
         Select "2. Upgrade firmware"
         Press enter when show "Run firmware after upgrading? (Y/n):"
         Select 0 for TFTP method
         Input U-Boot's IP address: 192.168.1.1
         Input TFTP server's IP address: 192.168.1.2
         Input IP netmask: 255.255.255.0
         Input file name: openwrt-ramips-mt7621-asus_rt-ax1800hp-squashfs-factory.bin
      - Restart AP aftre see the log "Firmware upgrade completed!"
      Signed-off-by: NKarl Chan <exkc@exkc.moe>
      92276eef
  10. 03 2月, 2023 1 次提交
    • M
      ramips: add support for TP-Link Deco M4R v4 · d4c63c77
      Mark Ceeha 提交于
      This commit adds support for the V4 hardware revision of the Deco M4R.
      V4 is a complete overhaul of the hardware compared to V1 and V2,
      and is much more similar to the Archer C6 V3 and C6U V1.
      
      Specifications:
      
        SoC: MediaTek MT7621AT (2 cores at 880 MHz, 4 threads)
        RAM: Kingston D1216ECMDXGJD (256 MB)
        Wireless 2.4 GHz: MediaTek MT7603EN
        Wireless 5 GHz: MediaTek MT7613BEN
        Flash: 16 MB SPI NOR
      
      Installation:
      
      Flash the *-factory.bin image in the U-Boot recovery webserver.
      You can trigger this webserver by holding the reset button until the LED
      flashes yellow, or by hooking up to serial pads on the board (clearly
      labeled GND, RX and TX) and pressing `x` early in boot.
      
      Once the factory image has been flashed, you can use the regular upgrade
      procedure with sysupgrade images for subsequent flashes.
      Signed-off-by: NMark Ceeha <hi@shiz.me>
      Tested-by: NMark Ceeha <hi@shiz.me>
      d4c63c77
  11. 29 1月, 2023 1 次提交
    • D
      ramips: mt7621: add support for Xiaomi Mi Router 4A Gigabit v2 · 39e4f03f
      Dmitry Sokolov 提交于
      Device is the same as Xiaomi Mi Router 4A Gigabit, except of:
      - 5G WiFi is MT7663
      - addresses of leds, wifi and eth ports are slightly changed
      
      Specs:
        SoC:  MT7621
        CPU:  2 x 880 MHz
        ROM:  16 MB
        RAM:  128 MB
        WLAN: MT7603, MT7663
      
      MAC addresses:
        WAN     ****  factory 0xe006 (label)
        LAN     *:f7  factory 0xe000
        2.4 GHz *:f8  factory 0x0000+0x4 (mtd-eeprom+0x4)
        5 GHz   *:f9  factory 0x8000+0x4 (mtd-eeprom+0x4)
      
      Installation:
      
      Factory firmware is based on a custom OpenWrt 17.x.
      Installation is the same as for Xiaomi Mi Router 4A Gigabit.
      
      Probably the easiest way to install is to use the script from
      this repository: https://github.com/acecilia/OpenWRTInvasion/pull/155
      
      In a more advanced case, you can do everything yourself:
      - gain access to the device through one of the exploits described
        in the link above
      - upload sysupgrade image to /tmp
      - overwrite stock firmware:
        # mtd -e OS1 -r write /tmp/sysupgrade.bin OS1
      
      Recovery:
      
      Recovery procedure is the same as for Xiaomi Mi Router 4A Gigabit.
      Possible options can be found here:
      https://openwrt.org/inbox/toh/xiaomi/xiaomi_mi_router_4a_gigabit_edition
      
      One of the ways is to use another router with OpenWrt:
      - connect both routers by their LAN ports
      - download stock firmware from [1]
      - place it inside /tmp/test.bin on the main router
      - configure PXE/TFTP on the main router
      - power off 4Av2, hold Reset button, power on
      - as soon as image download via TFTP starts, Reset can be released
      - blinking blue wan LED will indicate the end of the flashing process,
        now router can be rebooted
      [1] http://cdn.cnbj1.fds.api.mi-img.com/xiaoqiang/rom/r4av2/miwifi_r4av2_firmware_release_2.30.28.binSigned-off-by: NDmitry Sokolov <e323w@proton.me>
      39e4f03f
  12. 15 1月, 2023 2 次提交
    • K
      ramips: add support for D-Link DIR-1935 A1 · c13263ca
      Keith Harrison 提交于
      Add support for D-Link DIR-1935 A1 based on similarities to DIR-882 A1,
      DIR-867 A1 and other DIR-8xx A1 models. Existing DIR-882 A1 openwrt
      "factory" firmware installs without modificaitons via the D-Link
      Recovery GUI and has no known incompatibilities with the DIR-1935 A1.
      
      Changes to be committed:
             new file:   target/linux/ramips/dts/mt7621_dlink_dir-1935-a1.dts
             modified:   target/linux/ramips/image/mt7621.mk
             modified:   target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
      
      Specifications:
      * Board: Not known
      * SoC: MediaTek MT7621 Family
      * RAM: 128 MB (DDR3)
      * Flash: 16 MB (SPI NOR)
      * WiFi: MediaTek MT7615 Family (x2)
      * Switch: 1 WAN, 4 LAN (Gigabit)
      * Ports: 1 USB 3.0
      * Buttons: Reset, WiFi Toggle, WPS
      * LEDs: Power (green/orange), Internet (green/orange), WiFi 2.4G (green),
              WiFi 5G (green)
      
      Notes:
      * 160MHz 5GHz is available in LuCi but does not appear to work (i.e. no
        SSID is visible in wifi scanning apps on other devices) with either
        official DIR-882 A1 firmware or a test build for the DIR-1935 A1 based
        on the 22.03.2 branch. 80 MHz 5GHz works.
      
      Serial port:
      * Untested (potential user damage/error)
      * Expected to be identical to other DIR-8xx A1 models:
      	* Parameters: 57600, 8N1
      	* Location: J1 header (close to the Reset, WiFi and WPS buttons)
      	* Pinout: 1 - VCC
      		  2 - RXD
      	          3 - TXD
      		  4 - GND
      
      Installation:
      * D-Link Recovery GUI: power down the router, press and hold the reset
        button, then re-plug it. Keep the reset button pressed until the power
        LED starts flashing orange, manually assign a static IP address under
        the 192.168.0.xxx subnet (e.g. 192.168.0.2) and go to http://192.168.0.1
      
      * Some modern browsers may have problems flashing via the Recovery GUI,
        if that occurs consider uploading the firmware through cURL:
      
          curl -v -i -F "firmware=@file.bin" 192.168.0.1
      Signed-off-by: NKeith Harrison <keithh@protonmail.com>
      c13263ca
    • M
      ramips: add basic support for TP-Link EC330-G5u v1 · 1a35edfb
      Mikhail Zhilkin 提交于
      This adds basic support for TP-Link EC330-G5u Ver:1.0 router (also known
      as TP-Link Archer C9ERT).
      
      Device specification
      --------------------
      SoC Type: MediaTek MT7621AT
      RAM: 128 MiB, Nanya NT5CC64M16GP-DI
      Flash: 128 MiB NAND, ESMT F59L1G81MA-25T
      Wireless 2.4 GHz (MediaTek MT7615N): b/g/n, 4x4
      Wireless 5 GHz (MediaTek MT7615N): a/n/ac, 4x4
      Ethernet: 5xGbE (WAN, LAN1, LAN2, LAN3, LAN4)
      USB ports: 1xUSB3.0
      Button: 4 (Led, WiFi On/Off, Reset, WPS)
      LEDs: 7 blue LEDs, 1 orange(amber) LED, 1 white(non-gpio) LED
      Power: 12 VDC, 2 A
      Connector type: Barrel
      Bootloader: First U-Boot (1.1.3), Main U-Boot (1.1.3). Additionally,
      original TP-Link firmware contains Image U-Boot (1.1.3).
      
      Serial console (UART)
      ---------------------
                                  V
      +-------+-------+-------+-------+
      | +3.3V |  GND  |  TX   |  RX   |
      +---+---+-------+-------+-------+
          |              J2
          |
          +--- Don't connect
      
      Installation
      ------------
      1. Rename OpenWrt initramfs image to test.bin and place it on tftp server
         with IP 192.168.0.5
      2. Attach UART, switch on the router and interrupt the boot process by
         pressing 't'
      3. Load and run OpenWrt initramfs image:
            tftpboot
            bootm
      4. Once inside OpenWrt, switch to the first boot image:
            fw_setenv BootImage 0
      5. Run 'sysupgrade -n' with the sysupgrade OpenWrt image
      
      Back to Stock
      -------------
      1. Run in the OpenWrt shell:
            fw_setenv BootImage 1
            reboot
      
      Recovery
      --------
      1. Press Reset button and power on the router
      2. Navigate to U-Boot recovery web server (http://192.168.0.1/) and upload
         the OEM firmware
      
      MAC addresses
      -------------
      +---------+-------------------+-------------------+-------------+
      |         | MAC example 1     | MAC example 2     | Algorithm   |
      +---------+-------------------+-------------------+-------------+
      | label   | 68:ff:7b:xx:xx:f4 | 50:d4:f7:xx:xx:da | label       |
      | LAN     | 68:ff:7b:xx:xx:f4 | 50:d4:f7:xx:xx:da | label       |
      | WAN     | 72:ff:7b:xx:xx:f5 | 54:d4:f7:xx:xx:db | label+1 [1] |
      | WLAN 2g | 68:ff:7b:xx:xx:f4 | 50:d4:f7:xx:xx:da | label       |
      | WLAN 5g | 68:ff:7b:xx:xx:f6 | 50:d4:f7:xx:xx:dc | label+2     |
      +---------+-------------------+-------------------+-------------+
      label MAC address was found in factory at 0x165 (text format
      xx:xx:xx:xx:xx:xx).
      
      Notes
      -----
      [1] WAN MAC address:
         a. First octet of WAN MAC is differ than others and OUI is not related
            to TP-Link company. This probably should be fixed.
         b. Flipping bits in first octet and hex delta are different for the
            different MAC examples:
            +-----------------+----------------+----------------+
            |                 | Example 1      | Example 2      |
            +-----------------+----------------+----------------+
            | LAN             | 68 = 0110 1000 | 50 = 0101 0000 |
            | MAC (1st octet) |         ^ ^ ^  |                |
            +-----------------+----------------+----------------+
            | WAN             | 72 = 0111 0010 | 54 = 0101 0100 |
            | MAC (1st octet) |         ^ ^ ^  |            ^   |
            +-----------------+----------------+----------------+
            | HEX delta       | 0xa            | 0x4            |
            +-----------------+----------------+----------------+
            | DEC delta       | 4              | 4              |
            +-----------------+----------------+----------------+
         c. DEC delta is a constant (4). This looks like a mistake in OEM
            firmware and probably should be fixed.
         Based on the above, I decided to keep correct OUI and make WAN MAC =
         label + 1.
      
      [2] Bootloaders
         The device contains 3 bootloaders:
         - First U-Boot: U-Boot 1.1.3 (Mar 18 2019 - 12:50:24). The First U-Boot
           located on NAND Flash to load next full-feature Uboot.
         - Main U-Boot + its backup: U-Boot 1.1.3 (Mar 18 2019 - 12:50:29). This
           bootloader includes recovery webserver. Requires special uImages to
           continue the boot process:
              0x00 (os0, os1) - firmware uImage
              0x40 (os0, os1) - standalone uImage (OpenWrt kernel is here)
         - Additionally, both slots of the original TP-Link firmware contains
           Image U-Boot: U-Boot 1.1.3 (Oct 16 2019 - 08:14:45). It checks image
           magics and CRCs. We don't use this U-Boot with OpenWrt.
      Signed-off-by: NMikhail Zhilkin <csharper2005@gmail.com>
      1a35edfb
  13. 08 1月, 2023 2 次提交
    • A
      ramips: do not use GPIO function on switch pins on certain devices · fc33c41c
      Arınç ÜNAL 提交于
      The pins of the MT7530 switch that translate to GPIO 0, 3, 6, 9 and 12 has
      got a function, by default, which does the same thing as the netdev
      trigger. Because of bridge offloading on DSA, the netdev trigger won't see
      the frames between the switch ports whilst the default function will.
      
      Do not use the GPIO function on switch pins on devices that fall under this
      category.
      
      Keep it for:
      
      mt7621_belkin_rt1800.dts: There's only one LED which is for the wan
      interface and there's no bridge offloading between the "wan" interface and
      other interfaces.
      
      mt7621_yuncore_ax820.dts: There's no bridge offloading between the "wan"
      and "lan" interfaces.
      Signed-off-by: NArınç ÜNAL <arinc.unal@arinc9.com>
      fc33c41c
    • S
      ramips: add support for D-Link DAP-X1860 A1 · 3c31f6b5
      Sebastian Schaper 提交于
      The DAP-X1860 is a wall-plug AX1800 repeater.
      
      Specifications:
      - MT7621, 256 MiB RAM, 128 MiB SPI NAND
      - MT7915 + MT7975 2x2 802.11ax (DBDC)
      - Ethernet: 1 port 10/100/1000
      - LED RSSI bargraph (2x green, 1x red/orange), status
        and RSSI LEDs are incorrectly populated red/orange
        (should be red/green according to documentation)
      
      Installation:
      - Keep reset button pressed during plug-in
      - Web Recovery Updater is at 192.168.0.50
      - Upload factory.bin, confirm flashing
        (seems to work best with Chromium-based browsers)
      
      Revert to OEM firmware:
      - tar -xvf DAP-X1860_RevA_Firmware_101b94.bin
      - openssl enc -d -md md5 -aes-256-cbc -in FWImage.st2 \
        -out FWImage.st1 -k MB0dBx62oXJXDvt12lETWQ==
      - tar -xvf FWImage.st1
      - flash kernel_DAP-X1860.bin via Recovery
      Signed-off-by: NSebastian Schaper <openwrt@sebastianschaper.net>
      3c31f6b5
  14. 05 1月, 2023 1 次提交
  15. 14 12月, 2022 1 次提交
    • M
      ramips: add support for Etisalat S3 · 0ec8d991
      Mikhail Zhilkin 提交于
      Etisalat S3 is a wireless WiFi 5 router manufactured by Sercomm company.
      
      Device specification
      --------------------
      SoC Type: MediaTek MT7621AT
      RAM: 256 MiB
      Flash: 128 MiB
      Wireless 2.4 GHz (MT7603EN): b/g/n, 2x2
      Wireless 5 GHz (MT7615E): a/n/ac, 4x4
      Ethernet: 5x GbE (WAN, LAN1, LAN2, LAN3, LAN4)
      USB ports: 1x USB3.0
      Button: 2 buttons (Reset & WPS)
      LEDs:
         - 1x Status (RGB)
         - 1x 2.4G (blue, hardware, mt76-phy0)
         - 1x 5G (blue, hardware, mt76-phy1)
      Power: 12 VDC, 1.5 A
      Connector type: barrel
      Bootloader: U-Boot
      
      Installation
      -----------------
      1.  Login to the router web interface under admin account
      2.  Navigate to Settings -> Configuration -> Save to Computer
      3.  Decode the configuration. For example, using cfgtool.py tool (see
          related section):
             cfgtool.py -u configurationBackup.cfg
      4.  Open configurationBackup.xml and find the following line:
          <PARAMETER name="Password" type="string" value="<your router serial \
             is here>" writable="1" encryption="1" password="1"/>
      5.  Insert the following line after and save:
      <PARAMETER name="Enable" type="boolean" value="1" writable="1" encryption="0"/>
      6.  Encode the configuration. For example, using cfgtool.py tool:
             cfgtool.py -p configurationBackup.xml
      7.  Upload the changed configuration (configurationBackup_changed.cfg) to
          the router
      8.  Login to the router web interface (SuperUser:ETxxxxxxxxxx, where
          ETxxxxxxxxxx is the serial number from the backplate label)
      9.  Navigate to Settings -> WAN -> Add static IP interface (e.g.
          10.0.0.1/255.255.255.0)
      10. Navigate to Settings -> Remote cotrol -> Add SSH, port 22,
          10.0.0.0/255.255.255.0 and interface created before
      11. Change IP of your client to 10.0.0.2/255.255.255.0 and connect the
          ethernet cable to the WAN port of the router
      12. Connect to the router using SSH shell under SuperUser account
      13. Run in SSH shell:
             sh
      14. Make a mtd backup (optional, see related section)
      15. Change bootflag to Sercomm1 and reboot:
             printf 1 | dd bs=1 seek=7 count=1 of=/dev/mtdblock3
             reboot
      16. Login to the router web interface under admin account
      17. Remove dots from the OpenWrt factory image filename
      18. Update firmware via web using OpenWrt factory image
      
      Revert to stock
      ---------------
      Change bootflag to Sercomm1 in OpenWrt CLI and then reboot:
         printf 1 | dd bs=1 seek=7 count=1 of=/dev/mtdblock3
      
      mtd backup
      ----------
      1. Set up a tftp server (e.g. tftpd64 for windows)
      2. Connect to a router using SSH shell and run the following commands:
            cd /tmp
            for i in 0 1 2 3 4 5 6 7 8 9 10; do nanddump -f mtd$i /dev/mtd$i; \
            tftp -l mtd$i -p 10.0.0.2; md5sum mtd$i >> mtd.md5; rm mtd$i; done
            tftp -l mtd.md5 -p 10.0.0.2
      
      Recovery
      --------
      Use sercomm-recovery tool.
      Link: https://github.com/danitool/sercomm-recovery
      
      MAC Addresses
      -------------
      +-----+------------+---------+
      | use | address    | example |
      +-----+------------+---------+
      | LAN | label      | *:50    |
      | WAN | label + 11 | *:5b    |
      | 2g  | label + 2  | *:52    |
      | 5g  | label + 3  | *:53    |
      +-----+------------+---------+
      The label MAC address was found in Factory 0x21000
      
      cfgtool.py
      ----------
      A tool for decoding and encoding Sercomm configs.
      Link: https://github.com/r3d5ky/sercomm_cfg_unpackerCo-authored-by: NKarim Dehouche <karimdplay@gmail.com>
      Co-authored-by: NMaximilian Weinmann <x1@disroot.org>
      Signed-off-by: NMikhail Zhilkin <csharper2005@gmail.com>
      0ec8d991
  16. 20 11月, 2022 1 次提交
    • M
      ramips: add support for Keenetic KN-3010 · 21762e46
      Maxim Anisimov 提交于
      Keenetic KN-3010 is a 2.4/5 Ghz band 11ac (Wi-Fi 5) router, based on MT7621DAT.
      
      Specification:
      - System-On-Chip: MT7621DAT
      - CPU/Speed: 880 MHz
      - Flash-Chip: Winbond w25q256
      - Flash size: 32768 KiB
      - RAM: 128 MiB
      - 5x 10/100/1000 Mbps Ethernet
      - 4x external, non-detachable antennas
      - UART (J1) header on PCB (115200 8n1)
      - Wireless No1 (2T2R): MT7603E 2.4 GHz 802.11bgn
      - Wireless No2 (2T2R): MT7613BE 5 GHz 802.11ac
      - 4x LED, 2x button, 1x mode switch
      
      Notes:
      - The device supports dual boot mode
      - The firmware partitions were concatinated into one
      - The FN button led indicator has been reassigned as the 2.4GHz
        wifi indicator.
      
      Flash instruction:
      The only way to flash OpenWrt image is to use tftp recovery mode in U-Boot:
      
      1. Configure PC with static IP 192.168.1.2/24 and tftp server.
      2. Rename "openwrt-ramips-mt7621-keenetic_kn-3010-squashfs-factory.bin"
         to "KN-3010_recovery.bin" and place it in tftp server directory.
      3. Connect PC with one of LAN ports, press the reset button, power up
         the router and keep button pressed until power led start blinking.
      4. Router will download file from server, write it to flash and reboot.
      Signed-off-by: NMaxim Anisimov <maxim.anisimov.ua@gmail.com>
      21762e46
  17. 14 11月, 2022 2 次提交
    • I
      ramips: Add support for D-Link DIR-3060 A1 · 6afc355b
      Ivaylo Ivanov 提交于
      Hardware specification:
      SoC: MediaTek MT7621AT
      Flash: Winbond W29N01HVSINA 128MB
      RAM: Micron MT41K128M16JT-125 256MB
      Ethernet: 4x 10/100/1000 Mbps
      WiFi1: MT7615DN 2.4GHz N 2x2:2
      WiFi2: MT7615DN 5GHz AC 2x2:2
      WiFi3: MT7615N 5GHz AC 4x4:4
      Button: WPS, Reset
      
      Flash instructions:
      OpenWrt can be installed via D-Link Recovery GUI:
      
          Push and hold reset button (on the bottom of the device) until power led starts flashing (about 10 secs or so) while plugging in the power cable.
          Give it ~30 seconds, to boot the recovery mode GUI
          Connect your client computer to LAN1 of the device
          Set your client IP address manually to 192.168.0.2 / 255.255.255.0.
          Call the recovery page for the device at http://192.168.0.1/
          Use the provided emergency web GUI to upload and flash a new firmware to the device
      Signed-off-by: NIvaylo Ivanov <iivailo@mail.bg>
      6afc355b
    • M
      ramips: add support for Rostelecom RT-SF-1 · 0cfd1555
      Mikhail Zhilkin 提交于
      Rostelecom RT-SF-1 is a wireless WiFi 5 router manufactured by Sercomm
      company.
      
      Device specification
      --------------------
      SoC Type: MediaTek MT7621AT
      RAM: 256 MiB
      Flash: 256 MiB, Micron MT29F2G08ABAGA3W
      Wireless 2.4 GHz (MT7603EN): b/g/n, 2x2
      Wireless 5 GHz (MT7615E): a/n/ac, 4x4
      Ethernet: 5xGbE (WAN, LAN1, LAN2, LAN3, LAN4)
      USB ports: 1xUSB3.0
      ZigBee: 3.0, EFR32 MG1B232GG
      Button: 2 buttons (Reset & WPS)
      LEDs:
         - 1x Status (RGB)
         - 1x 2.4G (blue, hardware, mt76-phy0)
         - 1x 5G (blue, hardware, mt76-phy1)
      Power: 12 VDC, 1.5 A
      Connector type: barrel
      Bootloader: U-Boot
      
      Installation
      -----------------
      1. Remove dots from the OpenWrt factory image filename
      2. Login to the router web interface
      3. Update firmware using web interface with the OpenWrt factory image
      4. If OpenWrt is booted, then no further steps are required. Enjoy!
         Otherwise (Stock firmware has booted again) proceed to the next step.
      5. Update firmware using web interface with any version of the Stock
         firmware
      6. Update firmware using web interface with the OpenWrt factory image
      
      Revert to stock
      ---------------
      Change bootflag to Sercomm1 in OpenWrt CLI and then reboot:
          printf 1 | dd bs=1 seek=7 count=1 of=/dev/mtdblock3
      
      Recovery
      --------
      Use sercomm-recovery tool.
      Link: https://github.com/danitool/sercomm-recovery
      
      MAC Addresses
      -------------
      +-----+------------+------------+
      | use | address    | example    |
      +-----+------------+------------+
      | LAN | label      | *:72, *:d2 |
      | WAN | label + 11 | *:7d, *:dd |
      | 2g  | label + 2  | *:74, *:d4 |
      | 5g  | label + 3  | *:75, *:d5 |
      +-----+------------+------------+
      The label MAC address was found in Factory 0x21000
      Signed-off-by: NMikhail Zhilkin <csharper2005@gmail.com>
      0cfd1555
  18. 13 11月, 2022 1 次提交
    • A
      ramips: add support for Mikrotik LtAP-2HnD · ffa4b528
      Arne Zachlod 提交于
      Mikrotik LtAP-2HnD is a outdoor/automotive WLAN 4 router with integrated GPS
      receiver and two mPCIe slots.
      
      Specifications:
      * SoC: MT7621A
      * RAM: 128 MiB Nanya NT5CC64M16GP-DI
      * Flash: 16 MiB winbond W25Q128JV
      * WLAN:
        * Atheros AR9382 with power amplifier SKY 85330 (2x2 internal antennas,
          with RF switches for external connectors)
      * Ethernet: 1 Gbps, single port
      * USB Host: USB 2.0 Speeds
      * Serial: 115200 baud
      * LEDs: Power, System, GPS, 5* RSSI
      *  mPCIe:
         * miniPCIe slot 1: PCIe and USB 2.0 Host (via switch shared with USB Host)
         * miniPCIe slot 2: USB 2.0 and 3.0
      * SIM Cards:
        * Slot 1 Connected to mPCIe slot 1
        * Slot 2 and 3 connected to mPCIe slot 2 via switch
      * GPS: MTK 3333 on serial port 2 (/dev/ttyS1), 115200 baud and PPS on gpio 14
      
      gpios are exposed to /sys/class/gpio:
      
      * usb-select: swithes USB 2.0 interface between external port and internal
      mPCIe slot 1 default is the external USB interface
      * gps-reset: resets the GPS interface chip
      * sim-select: switches between sim slot 2 and 3 connected to mPCIe slot 2
      * gps-ant-select: switches GPS antenna between internal antenna and SMA
      connected antenna
      * lte-reset: resets mPCIe slot 2
      
      Flashing:
       TFTP boot initramfs image and then perform sysupgrade. Follow common
       MikroTik procedure as in https://openwrt.org/toh/mikrotik/common.
      Signed-off-by: NArne Zachlod <arne@nerdkeller.org>
      ffa4b528
  19. 06 11月, 2022 1 次提交
    • L
      ramips: add support for TP-Link MR600 V2(EU) · 78110c3b
      Linos Giannopoulos 提交于
      MR600 V2(EU) is an LTE router that also supports 4G+ band aggregation
      etc. and can reportedly achieve higher bandwidth with it.
      
      - Specifications:
      
      * SoC: Mediatek MT7621DAT 880MHz
      * RAM: 128MB DDR3
      * Flash: 16MB SPI NOR flash (GD25Q128C)
      * LTE Modem: Qualcomm MDM9240
      * WiFi 5GHz: Mediatek MT7613BEN
      * WiFi 2.4GHz: Mediatek MT7603EN
      * Ethernet: MT7530, 4x 1000Base-T.
      * UART: Serial console (115200 8n1), J1(GND:3)
      * Buttons: Reset, WPS.
      * LED: Power, WAN, LTE, WiFi 2GHz and 5GHz, LAN, Signal1, Signal2,
        Signal3
      
      - MAC Addresses:
      
      OEM firmware configuration:
      54:af:97:xx:xx:7b : 2.4G
      54:af:97:xx:xx:7a : 5G
      54:af:97:xx:xx:7c : LTE
      54:af:97:xx:xx:7b : LAN (label)
      54:af:97:xx:xx:7c : WAN
      
      - Installation:
      
      1. Download the OpenWrt initramfs-image.
      
      Place it into a TFTP server root directory and rename it to openwrt.img
      Configure the TFTP server to listen at 192.168.0.5/24.
      
      3. Connect to the serial console.
      
      Attach power and interrupt the boot procedure when prompted (type `tpl`).
      
      Credentials are admin / 1234
      
      4. Configure U-Boot for booting OpenWrt from ram
      
       $ tftpboot
       $ bootm
      
      5. Transfer the OpenWrt sysupgrade image to the device.
      
      - LTE:
      
      In order to setup the wwan0 interface:
      1. Add a `qmi` proto interface under `/etc/config/network`, e.g.:
      ```
      config interface 'wwan0'
              option device '/dev/cdc-wdm0'
              option proto 'qmi'
              option pincode 'XXXX'
              option apn 'your_isp_apn'
      ```
      
      2. Add `wwan0` interface to the `wan` firewall zone
      3. `/etc/init.d/network restart`
      Signed-off-by: NLinos Giannopoulos <linosgian00@gmail.com>
      78110c3b
  20. 01 11月, 2022 1 次提交
    • V
      ramips: add support for YunCore FAP690 · 08e153c3
      Volodymyr Puiul 提交于
      It is an in-wall 802.11ax (Wi-Fi 6) router, based on MediaTek MT7621A.
      
      Specifications:
      - SoC: MT7621AT (880MHz, 2 Cores)
      - RAM: 128 MB
      - Flash: 16 MB SPI NOR
      - Wi-Fi:
          - MT7915DN + MT7905DAN: 2.4/5 GHz
      - Ethernet: 1x 1GiE via MT7530
      - UART: J4 (115200 baud)
          - Pinout: [3V3] (TXD) (RXD) (GND)
      
      - Bootloader: U-Boot
      - Buttons:
          - SW1 - no label on the box, combined with led
      - Led: Status. RGB controlled by
          - GPIO 14 - green color
          - GPIO 15 - red color
          - GPIO 16 - blue color
      
      Installation:
      OEM firmware is based on LEDE with custom UI and support standard sysupgrade
      variant of firmware. However it requires "*.ubin" extension for sysupgrade file.
      Always select "Factory reset" switch on upgrade to OpenWRT, otherwise
      it will not boot.
      
      MAC addresses as verified by OEM firmware:
      vendor   source
      LAN      factory 0x4 (label)
      5g       factory 0x4 (label)
      2g       label with flipped bits bit in 1-st byte and bits 5, 6, 7 in
      	4-th byte
      
      Example
      label:  44:xx:xx:b7:xx:xx
      lan:    44:xx:xx:b7:xx:xx
      2g      46:xx:xx:c7:xx:xx
      5g      44:xx:xx:b7:xx:xx
      Signed-off-by: NVolodymyr Puiul <volodymyr.puiul@gmail.com>
      08e153c3
  21. 18 9月, 2022 1 次提交
  22. 11 9月, 2022 2 次提交
    • R
      ramips: add support for Linksys E7350 · f4eef5f2
      Rosen Penev 提交于
      Linksys E7350 is an 802.11ax (Wi-Fi 6) router, based on MediaTek
      MT7621A.
      
      Specifications:
      - SoC: MT7621 (880MHz, 2 Cores)
      - RAM: 256 MB
      - Flash: 128 MB NAND
      - Wi-Fi:
        - MT7915D: 2.4/5 GHz (DBDC)
      - Ethernet: 5x 1GiE MT7530
      - USB: 1x USB 3.0
      - UART: J4 (57600 baud)
        - Pinout: [3V3] (TXD) (RXD) (blank) (GND)
      
      Notes:
      * This device has a dual-boot partition scheme, but this firmware works
        only on boot partition 1.
      
      Installation:
      
      Upload the generated factory.bin image via the stock web firmware
      updater.
      Signed-off-by: NRosen Penev <rosenp@gmail.com>
      f4eef5f2
    • R
      ramips: add support for Belkin RT1800 · 26a6a6a6
      Rosen Penev 提交于
      Belkin RT1800 is an 802.11ax (Wi-Fi 6) router, based on MediaTek
      MT7621A.
      
      Specifications:
      - SoC: MT7621 (880MHz, 2 Cores)
      - RAM: 256 MB
      - Flash: 128 MB NAND
      - Wi-Fi:
        - MT7915D: 2.4/5 GHz (DBDC)
      - Ethernet: 5x 1GiE MT7530
      - USB: 1x USB 3.0
      - UART: J4 (57600 baud)
        - Pinout: [3V3] (TXD) (RXD) (blank) (GND)
      
      Notes:
      * This device has a dual-boot partition scheme, but this firmware works
        only on boot partition 1.
      
      Installation:
      
      Upload the generated factory.bin image via the stock web firmware
      updater.
      Signed-off-by: NRosen Penev <rosenp@gmail.com>
      26a6a6a6
  23. 29 8月, 2022 1 次提交
  24. 21 8月, 2022 1 次提交
    • A
      ramips: fix GB-PC1 and GB-PC2 device support · 4807bd6a
      Arınç ÜNAL 提交于
      Change switch port labels to ethblack & ethblue.
      Change lan1 & lan2 LEDs to ethblack_act & ethblue_act and fix GPIO pins.
      Add the external phy with ethyellow label on the GB-PC2 devicetree.
      Do not claim rgmii2 as gpio, it's used for ethernet with rgmii2 function.
      Enable ICPlus PHY driver for IP1001 which GB-PC2 has got.
      Update interface name and change netdev function.
      Enable lzma compression to make up for the increased size of the kernel.
      Make spi flash bindings on par with mainline Linux to fix read errors.
      
      Tested on GB-PC2 by Petr.
      Tested-by: NPetr Louda <petr.louda@outlook.cz>
      Signed-off-by: NArınç ÜNAL <arinc.unal@arinc9.com>
      4807bd6a
  25. 14 8月, 2022 1 次提交
    • M
      ramips: add support for Beeline SmartBox TURBO · 85b41cbd
      Mikhail Zhilkin 提交于
      Beeline SmartBox TURBO is a wireless WiFi 5 router manufactured by
      Sercomm company.
      
      Device specification
      --------------------
      SoC Type: MediaTek MT7621AT
      RAM: 256 MiB
      Flash: 256 MiB, Micron MT29F2G08ABAGA3W
      Wireless 2.4 GHz (MT7603EN): b/g/n, 2x2
      Wireless 5 GHz (MT7615E): a/n/ac, 4x4
      Ethernet: 5xGbE (WAN, LAN1, LAN2, LAN3, LAN4)
      USB ports: 1xUSB3.0
      Button: 2 buttons (Reset & WPS)
      LEDs: 1 RGB LED
      Power: 12 VDC, 1.5 A
      Connector type: barrel
      Bootloader: U-Boot
      
      Installation
      -----------------
      1.  Login to the router web interface (admin:admin)
      2.  Navigate to Settings -> WAN -> Add static IP interface (e.g.
          10.0.0.1/255.255.255.0)
      3.  Navigate to Settings -> Remote cotrol -> Add SSH, port 22,
          10.0.0.0/255.255.255.0 and interface created before
      4.  Change IP of your client to 10.0.0.2/255.255.255.0 and connect the
          ethernet cable to the WAN port of the router
      5.  Connect to the router using SSH shell (SuperUser:SNxxxxxxxxxx, where
          SNxxxxxxxxxx is the serial number from the backplate label)
      6.  Run in SSH shell:
             sh
      7.  Make a mtd backup (optional, see related section)
      8.  Change bootflag to Sercomm1 and reboot:
             printf 1 | dd bs=1 seek=7 count=1 of=/dev/mtdblock3
             reboot
      9.  Login to the router web interface (admin:admin)
      10. Remove dots from the OpenWrt factory image filename
      11. Update firmware via web using OpenWrt factory image
      
      Revert to stock
      ---------------
      1. Change bootflag to Sercomm1 in OpenWrt CLI and then reboot:
            printf 1 | dd bs=1 seek=7 count=1 of=/dev/mtdblock3
      2. Optional: Update with any stock (Beeline) firmware if you want to
         overwrite OpenWrt in Slot 0 completely.
      
      mtd backup
      ----------
      1. Set up a tftp server (e.g. tftpd64 for windows)
      2. Connect to a router using SSH shell and run the following commands:
            cd /tmp
            for i in 0 1 2 3 4 5 6 7 8 9 10; do nanddump -f mtd$i /dev/mtd$i; \
            tftp -l mtd$i -p 10.0.0.2; md5sum mtd$i >> mtd.md5; rm mtd$i; done
            tftp -l mtd.md5 -p 10.0.0.2
      
      MAC Addresses
      -------------
      +-----+-----------+---------+
      | use | address   | example |
      +-----+-----------+---------+
      | LAN | label     | *:54    |
      | WAN | label + 1 | *:55    |
      | 2g  | label + 4 | *:58    |
      | 5g  | label + 5 | *:59    |
      +-----+-----------+---------+
      The label MAC address was found in Factory 0x21000
      Co-developed-by: NMaximilian Weinmann <x1@disroot.org>
      Signed-off-by: NMaximilian Weinmann <x1@disroot.org>
      Signed-off-by: NMikhail Zhilkin <csharper2005@gmail.com>
      85b41cbd
  26. 07 8月, 2022 1 次提交
    • A
      ramips: add support for ZyXEL LTE3301-Plus · 2cc50592
      André Valentin 提交于
      The ZyXEL LTE3301-PLUS is an 4G indoor CPE with 2 external LTE antennas.
      
      Specifications:
      
       - SoC: MediaTek MT7621AT
       - RAM: 256 MB
       - Flash: 128 MB MB NAND (MX30LF1G18AC)
       - WiFi: MediaTek MT7615E
       - Switch: 4 LAN ports (Gigabit)
       - LTE: Quectel EG506 connected by USB3 to SoC
       - SIM: 1 micro-SIM slot
       - USB: USB3 port
       - Buttons: Reset, WPS
       - LEDs: Multicolour power, internet, LTE, signal, Wifi, USB
       - Power: 12V, 1.5A
      
      The device is built as an indoor ethernet to LTE bridge or router with
      Wifi.
      
      UART Serial:
      
      57600N1
      Located on populated 5 pin header J5:
      
       [o] GND
       [ ] key - no pin
       [o] RX
       [o] TX
       [o] 3.3V Vcc
      
      MAC assignment:
      lan:  98:0d:67:ee:85:54 (base, on the device back)
      wlan: 98:0d:67:ee:85:55
      
      Installation from web GUI:
      
      - Log in as "admin" on http://192.168.1.1/
      - Upload OpenWrt initramfs-recovery.bin image on the
        Maintenance -> Firmware page
      - Wait for OpenWrt to boot and ssh to root@192.168.1.1
      - format ubi device: ubiformat /dev/mtd6
      - attach ubi device: ubiattach -m6
      - create rootfs volume: ubimkvol /dev/ubi0 -n0 -N rootfs -s 1MiB
      - rootfs_data volume: ubimkvol /dev/ubi0 -n1 -N rootfs_data -s 1MiB
      - run sysupgrade with sysupgrade image
      
      For more details about flashing see
      commit 2449a632 ("ramips: mt7621: Add support for ZyXEL NR7101").
      
      Please note that this commit is needed:
      firmware-utils: add marcant changes for ZyXEL NBG6716 and LTE3301-PLUS
      Signed-off-by: NAndré Valentin <avalentin@marcant.net>
      2cc50592
  27. 19 7月, 2022 1 次提交
    • W
      ramips: add support for Netgear WAX202 · 0f068e7c
      Wenli Looi 提交于
      Netgear WAX202 is an 802.11ax (Wi-Fi 6) router.
      
      Specifications:
      * SoC: MT7621A
      * RAM: 512 MiB NT5CC256M16ER-EK
      * Flash: NAND 128 MiB F59L1G81MB-25T
      * Wi-Fi:
        * MT7915D: 2.4/5 GHz (DBDC)
      * Ethernet: 4x 1GbE
        * Switch: SoC built-in
      * USB: None
      * UART: 115200 baud (labeled on board)
      
      Load addresses (same as ipTIME AX2004M):
      * stock
        * 0x80010000: FIT image
        * 0x81001000: kernel image -> entry
      * OpenWrt
        * 0x80010000: FIT image
        * 0x82000000: uncompressed kernel+relocate image
        * 0x80001000: relocated kernel image -> entry
      
      Installation:
      * Flash the factory image through the stock web interface, or TFTP to
        the bootloader. NMRP can be used to TFTP without opening the case.
      * Note that the bootloader accepts both encrypted and unencrypted
        images, while the stock web interface only accepts encrypted ones.
      
      Revert to stock firmware:
      * Flash the stock firmware to the bootloader using TFTP/NMRP.
      
      References in WAX202 GPL source:
      https://www.downloads.netgear.com/files/GPL/WAX202_V1.0.5.1_Source.rar
      
      * openwrt/target/linux/ramips/dts/mt7621-ax-nand-wax202.dts
        DTS file for this device.
      Signed-off-by: NWenli Looi <wlooi@ucalgary.ca>
      0f068e7c
  28. 04 7月, 2022 1 次提交
    • M
      ramips: add support for Beeline SmartBox GIGA · bd783fd6
      Mikhail Zhilkin 提交于
      Beeline SmartBox GIGA is a wireless WiFi 5 router manufactured by
      Sercomm company.
      
      Device specification
      --------------------
      SoC Type: MediaTek MT7621AT
      RAM: 256 MiB, Nanya NT5CC128M16JR-EK
      Flash: 128 MiB, Macronix MX30LF1G18AC
      Wireless 2.4 GHz (MT7603EN): b/g/n, 2x2
      Wireless 5 GHz (MT7613BE): a/n/ac, 2x2
      Ethernet: 3 ports - 2xGbE (WAN, LAN1), 1xFE (LAN2)
      USB ports: 1xUSB3.0
      Button: 1 button (Reset/WPS)
      PCB ID: DBE00B-1.6MM
      LEDs: 1 RGB LED
      Power: 12 VDC, 1.5 A
      Connector type: barrel
      Bootloader: U-Boot
      
      Installation
      -----------------
      1. Downgrade stock (Beeline) firmware to v.1.0.02;
      2. Give factory OpenWrt image a shorter name, e.g. 1001.img;
      3. Upload and update the firmware via the original web interface.
      
      Remark: You might need make the 3rd step twice if your running firmware
      is booted from the Slot 1 (Sercomm0 bootflag). The stock firmware
      reverses the bootflag (Sercomm0 / Sercomm1) on each firmware update.
      
      Revert to stock
      ---------------
      1. Change the bootflag to Sercomm1 in OpenWrt CLI and then reboot:
            printf 1 | dd bs=1 seek=7 count=1 of=/dev/mtdblock3
      2. Optional: Update with any stock (Beeline) firmware if you want to
         overwrite OpenWrt in Slot 0 completely.
      
      MAC Addresses
      -------------
      +-----+-----------+---------+
      | use | address   | example |
      +-----+-----------+---------+
      | LAN | label     | *:16    |
      | WAN | label + 1 | *:17    |
      | 2g  | label + 4 | *:1a    |
      | 5g  | label + 5 | *:1b    |
      +-----+-----------+---------+
      The label MAC address was found in Factory 0x21000
      
      Notes
      -----
      1. The following scripts are required for the build:
            sercomm-crypto.py - already exists in OpenWrt
            sercomm-partition-tag.py - already exists in OpenWrt
            sercomm-payload.py - already exists in OpenWrt
            sercomm-pid.py - new, the part of this pull request
            sercomm-kernel-header.py - new, the part of this pull request
      2. This device (same as other Sercomm S2,S3-based devices) requires
         special LZMA and LOADADDR settings for successful boot:
            LZMA_TEXT_START=0x82800000
            KERNEL_LOADADDR=0x81001000
            LOADADDR=0x80001000
      3. This device (same as several other Sercomm-based devices - Beeline,
         Netgear, Etisalat, Rostelecom) has partition map (mtd1) containing
         real partition offsets, which may differ from device to device
         depending on the number and location of bad blocks on NAND.
         "fixed-partitions" is used if the partition map is not found or
         corrupted. This behavour (it's the same as on stock firmware) is
         provided by MTD_SERCOMM_PARTS module.
      Signed-off-by: NMikhail Zhilkin <csharper2005@gmail.com>
      bd783fd6
  29. 29 6月, 2022 1 次提交
    • T
      ramips: add support for ASUS RP-AC87 · 74dd7f9c
      Tamas Balogh 提交于
      Asus RP-AC87 ac2600 Repeater
      2.4GHz 800Mbps
      5GHz 1733Mbps
      
      Hardware specifications:
      SoC: MT7621A 2 cores 4 threads @880MHz
      WiFi2G: MT7615E 2G 4x4 b/g/n
      Wifi5G: MT7615E 5G 4x4 n/ac
      DRAM: 128MB DDR3 @1200mhz
      Flash: 16MB MX25L12805D SPI-NOR
      LAN/WAN: MT7530 1x1000M
      
      MAC addresses as verified by OEM firmware:
      use address source
      Lan/W5G *:B0 factory 0x8004 (label)
      W2G *:B4 factory 0x0
      
      Installation:
      
      Asus windows recovery tool:
      
      install the Asus firmware restoration utility
      unplug the router, hold the reset button while powering it on
      release when the power LED flashes slowly
      specify a static IP on your computer:
      IP address: 192.168.1.75
      Subnet mask 255.255.255.0
      Start the Asus firmware restoration utility, specify the factory image
      and press upload
      Do not power off the device after OpenWrt has booted until the LED flashing.
      TFTP Recovery method:
      
      set computer to a static ip, 192.168.1.2
      connect computer to the LAN 1 port of the router
      hold the reset button while powering on the router for a few seconds
      send firmware image using a tftp client; i.e from linux:
      $ tftp
      tftp> binary
      tftp> connect 192.168.1.1
      tftp> put factory.bin
      tftp> quit
      Signed-off-by: NTamas Balogh <tamasbalogh@hotmail.com>
      74dd7f9c
  30. 24 4月, 2022 1 次提交
    • M
      ramips: add support for TP-Link RE650 v2 · 39799974
      Marcin Gordziejewski 提交于
      TP-Link RE650 v2 is largely similar to v1 that
      is already supported by OpenWrt. Notable differences
      is differnt SPI Flash - 8 MB instead of 16 MB
      (from cFeon instead of Winbond) and a different
      configuration of PCIE connections to wifi chips.
      Otherwise it's largely the same product as v1
      
      Hardware specification:
      
      - SoC 880 MHz - MediaTek MT7621AT
      - 128 MB of DDR3 RAM
      - 8 MB - cFeon QH64A-104HIP
      - 4T4R 2.4 GHz - MediaTek MT7615E
      - 4T4R 5 GHz - MediaTek MT7615E
      - 1x 1 Gbps Ethernet - MT7621AT integrated
      - 7x LEDs (Power, 2G, 5G, WPS(x2), Lan(x2))
      - 4x buttons (Reset, Power, WPS, LED)
      - UART pinout - GND, RX, TX, labeled in the middle of the PCB,
        requires soldering because they're not through holes.
      
        Serial console @ 57600,8n1
      
      Flash instructions:
      
      Upload
      openwrt-ramips-mt7621-tplink_re650-v2-squashfs-factory.bin
      from the RE650 web interface.
      
      TFTP recovery to stock firmware:
      I didn't try recovering back to the stock firmware, however,
      if there is such process for other RExxx devices, it seems like
      it could be similar here.
      Signed-off-by: NMarcin Gordziejewski <openwrt@flicksfix.com>
      39799974
  31. 17 4月, 2022 1 次提交
    • R
      ramips: add support for OrayBox X3A · 9a750aae
      Ray Wang 提交于
      OrayBox X3A is a 2.4/5GHz dual band AC router, based on MediaTek MT7621.
      
      Specification:
      * SoC: MT7621
      * RAM: DDR3 128 MiB
      * Flash: 16 MiB NOR (XM25Q128)
      * Wi-Fi: (single chip hosting both 2.4G and 5G)
        * 2.4GHz: MT7615
        * 5GHz: MT7615
      * Ethernet: 3x 1000Mbps
        * Switch: MT7530
      * LED:
        * Ethernet LEDs: On the back of the router, hardware-controlled.
        * Status LEDs: One "pixel-like" RGB LED in the front of the router,
                       which is actually made up of 3 individual LEDs (with
                       dedicated GPIO pins) with the color of Red, Green,
                       and Blue.
                       The OEM firmware only lights up one color at a time to
                       indicate status, but that's very boring, and the colors
                       actually look great when combined, so I've improvised a
                       little and made them indicate netdev activities.
                       My test results:
                       GPIO 13/14/15
                       000 white (actually more like bright green or cyan
                                  because the brightness of the green LED is
                                  higher than red and blue)
                       001 bright purple
                       010 bright green
                       011 red
                       100 bright cyan
                       101 blue
                       110 green
                       111 off
      
      Flash Layout:
       0x0000000-0x0030000 : "u-boot"
       0x0030000-0x0040000 : "u-boot-env"
       0x0040000-0x0050000 : "factory"
       0x0050000-0x0f50000 : "firmware"
       /*0x0f50000 to 0x0fe0000 is undefined, same as OEM firmware*/
       0x0fe0000-0x0ff0000 : "bdinfo"
       0x0ff0000-0x1000000 : "reserve"
      
      MAC address:
       MAC               Source                          Description    Fix
       A0:CX:XX:BX:XX:0D BDINFO_9                        LAN(LABEL)     DTS
       A0:CX:XX:BX:XX:0E BDINFO_9 + 1                    WAN            DTS
       A2:CX:XX:BX:XX:0F FACTORY_4                       WIFI2G         DTS
       A2:CX:XX:CX:XX:0F SETBIT 7 (FACTORY_4 + 0x100000) WIFI5G         HOTPLUG
       A6:CX:XX:BX:XX:0F N/A                             WIFI2G_CLIENT  N/A
       A6:DX:XX:BX:XX:0F N/A                             WIFI5G_CLIENT  N/A
      
      Stock dmesg:
      https://pastebin.com/2t2jwLdf
      
      Stock Dumps:
      https://pastebin.com/LDLxSWX3
      
      Installation via SSH (does not void your warranty):
      1.  -----UNLOCK SSH-----
      1.1 Set computer IP to DHCP mode, load 'http://10.168.1.1/cgi-bin/luci' in
          your browser. Password is 'admin'.
      1.2 Click the "备份且导出" (backup and export) button, and download the
          config file.
      1.3 Open the downloaded file with 7zip, navigate to '/etc/config/'.
      1.4 Edit the file './system'. Change the '0' into '1' under
          "config sys 'ssh'".
      1.5 Save the file.
      1.6 Upload the file by clicking the "导入且恢复" (import and recover)
          button. The router will automatically reboot.
      2.  -----FLASH THE OPENWRT FIRMWARE-----
      2.1 Use any scp tool to upload the 'sysupgrade' firmware to the '/tmp/'
          folder to your router. It should be root@10.168.1.1 and the password
          is 'admin'.
      2.2 SSH into the router, also root@10.168.1.1 and the password is 'admin'.
      2.3 **IMPORTANT** Type command 'dd if=/dev/mtd3 of=/tmp/firmware.bin', to
          backup the stock firmware. Since the OEM does not provide firmware
          download on their website, this is the only way to get it.
      2.3 **ALSO IMPORTANT** Use any scp tool to download your backed-up stock
          firmware from '/tmp/' to your local drive. Then you'd better use a hex
          reading tool to have a rough look at it to make sure nothing is
          corrupt. Or u can just back up again and cross check the MD5.
      2.4 Type command 'mtd write /tmp/XXX.bin firmware', and it should flash
          the firmware.
      2.5 Verify that nothing went wrong. If you're confident, type 'reboot' and
          reboot the router.
      
      Revert to stock firmware:
      1.  load stock firmware using mtd (make sure u have a backup).
      Signed-off-by: NRay Wang <raywang777@foxmail.com>
      9a750aae
  32. 19 3月, 2022 1 次提交
    • M
      ramips: add support for Beeline SmartBox Flash · f8b02130
      Mikhail Zhilkin 提交于
      Beeline SmartBox Flash is a wireless AC1300 (WiFi 5) router manufactured
      by Arcadyan company.
      
      Device specification
      --------------------
      SoC Type: MediaTek MT7621AT
      RAM: 256 MiB, Winbond W632GU6NB
      Flash: 128 MiB (NAND), Winbond W29N01HVSINF
      Wireless 2.4 GHz (MT7615DN): b/g/n, 2x2
      Wireless 5 GHz (MT7615DN): a/n/ac, 2x2
      Ethernet: 3xGbE (WAN, LAN1, LAN2)
      USB ports: 1xUSB3.0
      Button: 1 (Reset/WPS)
      LEDs: 1 RGB LED
      Power: 12 VDC, 1.5 A
      Connector type: Barrel
      Bootloader: U-Boot (Ralink UBoot Version: 5.0.0.2)
      OEM: Arcadyan WE42022
      
      Installation
      ------------
      1. Place *factory.trx on any web server (192.168.1.2 in this example)
      2. Connect to the router using telnet shell (no password required)
      3. Save MAC adresses to U-Boot environment:
         uboot_env --set --name eth2macaddr --value $(ifconfig | grep eth2 | \
          awk '{print $5}')
         uboot_env --set --name eth3macaddr --value $(ifconfig | grep eth3 | \
          awk '{print $5}')
         uboot_env --set --name ra0macaddr --value $(ifconfig | grep ra0 | \
          awk '{print $5}')
         uboot_env --set --name rax0macaddr --value $(ifconfig | grep rax0 | \
          awk '{print $5}')
      4. Ensure that MACs were saved correctly:
         uboot_env --get --name eth2macaddr
         uboot_env --get --name eth3macaddr
         uboot_env --get --name ra0macaddr
         uboot_env --get --name rax0macaddr
      5. Download and write the OpenWrt images:
         cd /tmp
         wget http://192.168.1.2/factory.trx
         mtd_write erase /dev/mtd4
         mtd_write write factory.trx /dev/mtd4
      6. Set 1st boot partition and reboot:
         uboot_env --set --name bootpartition --value 0
         reboot
      
      Back to Stock
      -------------
      1. Run in the OpenWrt shell:
         fw_setenv bootpartition 1
         reboot
      2. Optional step. Upgrade the stock firmware with any version to
         overwrite the OpenWrt in Slot 1.
      
      MAC addresses
      -------------
      +-----------+-------------------+----------------+
      | Interface | MAC               | Source         |
      +-----------+-------------------+----------------+
      | label     | 30:xx:xx:51:xx:09 | No MACs was    |
      | LAN       | 30:xx:xx:51:xx:09 | found on Flash |
      | WAN       | 30:xx:xx:51:xx:06 | [1]            |
      | WLAN_2g   | 30:xx:xx:51:xx:07 |                |
      | WLAN_5g   | 32:xx:xx:41:xx:07 |                |
      +-----------+-------------------+----------------+
      [1]:
      a. Label wasb't found neither in factory nor in other places.
      b. MAC addresses are stored in encrypted partition "glbcfg". Encryption
         key hasn't known yet. To ensure the correct MACs in OpenWrt, a hack
         with saving of the MACs to u-boot-env during the installation was
         applied.
      c. Default Ralink ethernet MAC address (00:0C:43:28:80:36) was found in
         "Factory" 0xfff0. It's the same for all Smartbox Flash devices. OEM
         firmware also uses this MAC when initialazes ethernet driver. In
         OpenWrt we use it only as internal GMAC (eth0), all other MACs are
         unique. Therefore, there is no any barriers to the operation of several
         Smartbox Flash devices even within the same broadcast domain.
      
      Stock firmware image format
      ---------------------------
      +--------------+---------------+----------------------------------------+
      | Offset       | 1.0.15        | Description                            |
      +==============+===============+========================================+
      | 0x0          | 5d 43 6f 74   | TRX magic "]Cot"                       |
      +--------------+---------------+----------------------------------------+
      | 0x4          | 00 70 ff 00   | Length (reverse)                       |
      +--------------+---------------+----------------------------------------+
      |              |               | htonl(~crc) from 0xc ("flag_version")  |
      | 0x8          | 72 b3 93 16   | to "Length"                            |
      +--------------+---------------+----------------------------------------+
      | 0xc          | 00 00 01 00   | Flags                                  |
      +--------------+---------------+----------------------------------------+
      |              |               | Offset (reverse) of Kernel partition   |
      | 0x10         | 1c 00 00 00   | from the start of the header           |
      +--------------+---------------+----------------------------------------+
      |              |               | Offset (reverse) of RootFS partition   |
      | 0x14         | 00 00 42 00   | from the start of the header           |
      +--------------+---------------+----------------------------------------+
      | 0x18         | 00 00 00 00   | Zeroes                                 |
      +--------------+---------------+----------------------------------------+
      | 0x1c         | 27 05 19 56 … | Kernel data + zero padding             |
      +--------------+---------------+----------------------------------------+
      |              |               | RootFS data (starting with "hsqs") +   |
      | 0x420000     | 68 73 71 73 … | zero padding to "Length"               |
      +--------------+---------------+----------------------------------------+
      |              |               | Some signature data (format is         |
      |              |               | unknown). Necessary for the fw         |
      | "Lenght"     | 00 00 00 00 … | update via oem fw web interface.       |
      +--------------+---------------+----------------------------------------+
      | "Lenght" +   |               | TRX magic "HDR0". U-Boot is            |
      | 0x10c        | 48 44 52 30   | checking it at every boot.             |
      +--------------+---------------+----------------------------------------+
      |              |               | 1.00:                                  |
      |              |               |   Zero padding to ("Lenght" + 0x23000) |
      |              |               | 1.0.12:                                |
      |              |               |   Zero padding to ("Lenght" + 0x2a000) |
      | "Lenght" +   |               | 1.0.13, 1.0.15, 1.0.16:                |
      | 0x110        | 00 00 00 00   |   Zero padding to ("Lenght" + 0x10000) |
      +--------------+---------------+----------------------------------------+
      Signed-off-by: NMikhail Zhilkin <csharper2005@gmail.com>
      f8b02130
  33. 09 3月, 2022 1 次提交
    • K
      ramips: mt7621: add support for Zbtlink ZBT-WG1608 · 2876f753
      Kim Namu 提交于
      Zbtlink ZBT-WG1608 is a Wi-Fi router intendent to use with WWAN (4G/5G)
      modems.
      
      Specifications:
      * SoC: MediaTek MT7621A
      * RAM: 256/512 MiB
      * Flash: 16/32 MiB (SPI NOR)
      * Wi-Fi:
        * MediaTek MT7603E : 2.4Ghz
        * MediaTek MT7613BE : 5Ghz
      * Ethernet: 10/100/1000 Mbps Ethernet x5 ports (4xLAN + WAN)
      * M.2: 1x slot with USB&SIM
        * EM7455/EM12-G/EM160R/RM500Q-AE
      * USB: 1x 3.0 Type-A port
      * External storage: 1x microSD (SDXC) slot
      * UART: console (115200 baud)
      * LED:
        * 1 power indicator
        * 1 WLAN 2.4G controlled (wlan 2G)
        * 3 SoC controlled (wlan 5G, wwan, internet)
        * 5 per Eth phy (4xLAN + WAN)
      
      MAC Addresses:
      * LAN    : f8:5e:3c:xx:xx:e0 (Factory, 0xe000 (hex))
      * WAN    : f8:5e:3c:xx:xx:e1 (Factory, 0xe006 (hex))
      * 2.4 GHz: f8:5e:3c:xx:xx:de (Factory, 0x0004 (hex))
      * 5 GHz  : f8:5e:3c:xx:xx:df (Factory, 0x8004 (hex))
      
      Installation:
      * Vendor's firmware is OpenWrt (LEDE) based, so the sysupgrade image can
        be directly used to install OpenWrt. Firmware must be upgraded using the
        'force' and 'do not save configuration' command line options (or
        correspondig web interface checkboxes) since the vendor firmware is from
        the pre-DSA era.
      
      Recovery Mode:
       * Press reset button, power up the device, wait for about 10sec.
       * Upload sysupgrade image through the firmware recovery mode web page at
        192.168.1.1.
      Signed-off-by: NKim Namu <namu@theseed.io>
      2876f753
  34. 07 3月, 2022 1 次提交
    • J
      ramips: Add support for TP-Link TL-WPA8631P v3 · 6c743c30
      Joe Mullally 提交于
      AV1300 Gigabit Passthrough Powerline ac Wi-Fi Extender
      
      Specifications
      --------------
      * SoC: MediaTek MT7621AT
      * CPU: 880 MHz MIPS 1004KEc dual-core CPU
      * RAM: 64 MiB DDR2 (Zentel A3R12E40DBF-8E)
      * Flash: 8 MiB SPI NOR (GigaDevice GD25Q64CSIG)
      * Ethernet: SoC built-in Switch 5x 1GbE
        * Port 0: PLC (connected through AR8035-A)
        * Port 1-3: LAN
      * WLAN: 2x2 2.4GHz 300 Mbps + 2x2 5GHz 867 Mbps (MT7603EN + MT7613BEN)
      * PLC: HomePlug AV2 (Qualcomm QCA7500)
      * PLC Flash: 2MiB SPI NOR (GigaDevice GD25Q16CSIG)
      * Buttons: Reset, LED, Pair, Wi-Fi
      * LEDs: Power (green), PLC (green/amber), LAN (green), 2.4G (green),
        5G (green)
      * UART: J1 (57600 baud)
        * Pinout: (3V3) (GND) (RX) (TX)
        * Visually identify GND from connection to PCB ground plane
      
      Installation
      ------------
      Installation is possible from the OEM web interface. Make sure to install
      the latest OEM firmware first, so that the PLC firmware is at the latest
      version. However, please first check the OpenWRT Wiki page for
      confirmation that your OEM firmware version is supported.
      Signed-off-by: NJoe Mullally <jwmullally@gmail.com>
      6c743c30
  35. 07 2月, 2022 1 次提交
    • R
      ramips: add support for Xiaomi Mi Router CR660x series · 3343ca7e
      Raymond Wang 提交于
      Xiaomi Mi Router CR6606 is a Wi-Fi6 AX1800 Router with 4 GbE Ports.
      Alongside the general model, it has three carrier customized models:
      CR6606 (China Unicom), CR6608 (China Mobile), CR6609 (China Telecom)
      
      Specifications:
      - SoC: MediaTek MT7621AT
      - RAM: 256MB DDR3 (ESMT M15T2G16128A)
      - Flash: 128MB NAND (ESMT F59L1G81MB)
      - Ethernet: 1000Base-T x4 (MT7530 SoC)
      - WLAN: 2x2 2.4GHz 574Mbps + 2x2 5GHz 1201Mbps (MT7905DAN + MT7975DN)
      - LEDs: System (Blue, Yellow), Internet (Blue, Yellow)
      - Buttons: Reset, WPS
      - UART: through-hole on PCB ([VCC 3.3v](RX)(GND)(TX) 115200, 8n1)
      - Power: 12VDC, 1A
      
      Jailbreak Notes:
      1. Get shell access.
         1.1. Get yourself a wireless router that runs OpenWrt already.
         1.2. On the OpenWrt router:
            1.2.1. Access its console.
            1.2.2. Create and edit
                   /usr/lib/lua/luci/controller/admin/xqsystem.lua
                   with the following code (exclude backquotes and line no.):
      ```
           1  module("luci.controller.admin.xqsystem", package.seeall)
           2
           3  function index()
           4      local page   = node("api")
           5      page.target  = firstchild()
           6      page.title   = ("")
           7      page.order   = 100
           8      page.index = true
           9      page   = node("api","xqsystem")
          10      page.target  = firstchild()
          11      page.title   = ("")
          12      page.order   = 100
          13      page.index = true
          14      entry({"api", "xqsystem", "token"}, call("getToken"), (""),
      103, 0x08)
          15  end
          16
          17  local LuciHttp = require("luci.http")
          18
          19  function getToken()
          20      local result = {}
          21      result["code"] = 0
          22      result["token"] = "; nvram set ssh_en=1; nvram commit; sed -i
      's/channel=.*/channel=\"debug\"/g' /etc/init.d/dropbear; /etc/init.d/drop
      bear start;"
          23      LuciHttp.write_json(result)
          24  end
      ```
            1.2.3. Browse http://{OWRT_ADDR}/cgi-bin/luci/api/xqsystem/token
                   It should give you a respond like this:
                   {"code":0,"token":"; nvram set ssh_en=1; nvram commit; ..."}
                   If so, continue; Otherwise, check the file, reboot the rout-
                   er, try again.
            1.2.4. Set wireless network interface's IP to 169.254.31.1, turn
                   off DHCP of wireless interface's zone.
            1.2.5. Connect to the router wirelessly, manually set your access
                   device's IP to 169.254.31.3, make sure
                   http://169.254.31.1/cgi-bin/luci/api/xqsystem/token
                   still have a similar result as 1.2.3 shows.
         1.3. On the Xiaomi CR660x:
              1.3.1. Login to the web interface. Your would be directed to a
                     page with URL like this:
                     http://{ROUTER_ADDR}/cgi-bin/luci/;stok={STOK}/web/home#r-
                     outer
              1.3.2. Browse this URL with {STOK} from 1.3.1, {WIFI_NAME}
                     {PASSWORD} be your OpenWrt router's SSID and password:
                     http://{MIROUTER_ADDR}/cgi-bin/luci/;stok={STOK}/api/misy-
                     stem/extendwifi_connect?ssid={WIFI_NAME}&password={PASSWO-
                     RD}
                     It should return 0.
              1.3.3. Browse this URL with {STOK} from 1.3.1:
                     http://{MIROUTER_ADDR}/cgi-bin/luci/;stok={STOK}/api/xqsy-
                     stem/oneclick_get_remote_token?username=xxx&password=xxx&-
                     nonce=xxx
         1.4. Before rebooting, you can now access your CR660x via SSH.
              For CR6606, you can calculate your root password by this project:
              https://github.com/wfjsw/xiaoqiang-root-password, or at
              https://www.oxygen7.cn/miwifi.
              The root password for carrier-specific models should be the admi-
              nistration password or the default login password on the label.
              It is also feasible to change the root password at the same time
              by modifying the script from step 1.2.2.
              You can treat OpenWrt Router however you like from this point as
              long as you don't mind go through this again if you have to expl-
              oit it again. If you do have to and left your OpenWrt router unt-
              ouched, start from 1.3.
      2. There's no official binary firmware available, and if you lose the
         content of your flash, no one except Xiaomi can help you.
         Dump these partitions in case you need them:
         "Bootloader" "Nvram" "Bdata" "crash" "crash_log"
         "firmware" "firmware1" "overlay" "obr"
         Find the corespond block device from /proc/mtd
         Read from read-only block device to avoid misoperation.
         It's recommended to use /tmp/syslogbackup/ as destination, since files
         would be available at http://{ROUTER_ADDR}/backup/log/YOUR_DUMP
         Keep an eye on memory usage though.
      3. Since UART access is locked ootb, you should get UART access by modify
         uboot env. Otherwise, your router may become bricked.
         Excute these in stock firmware shell:
          a. nvram set boot_wait=on
          b. nvram set bootdelay=3
          c. nvram commit
         Or in OpenWrt:
          a. opkg update && opkg install kmod-mtd-rw
          b. insmod mtd-rw i_want_a_brick=1
          c. fw_setenv boot_wait on
          d. fw_setenv bootdelay 3
          e. rmmod mtd-rw
      
      Migrate to OpenWrt:
       1. Transfer squashfs-firmware.bin to the router.
       2. nvram set flag_try_sys1_failed=0
       3. nvram set flag_try_sys2_failed=1
       4. nvram commit
       5. mtd -r write /path/to/image/squashfs-firmware.bin firmware
      
      Additional Info:
       1. CR660x series routers has a different nand layout compared to other
          Xiaomi nand devices.
       2. This router has a relatively fresh uboot (2018.09) compared to other
          Xiaomi devices, and it is capable of booting fit image firmware.
          Unfortunately, no successful attempt of booting OpenWrt fit image
          were made so far. The cause is still yet to be known. For now, we use
          legacy image instead.
      Signed-off-by: NRaymond Wang <infiwang@pm.me>
      3343ca7e