Rostelecom RT-FE-1A 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: No Button: 2 buttons (Reset & WPS) LEDs: - 1x Power (green, unmanaged) - 1x Status (green, gpio) - 1x 2.4G (green, hardware, mt76-phy0) - 1x 2.4G (blue, gpio) - 1x 5G (green, hardware, mt76-phy1) - 1x 5G (blue, gpio) - 5x Ethernet (green, hardware, 4x LAN & WAN) Power: 12 VDC, 1.5 A Connector type: barrel Bootloader: U-Boot Installation ----------------- 1. Login to the router web interface (default http://192.168.0.1/) 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 block: <OBJECT name="User." type="object" writable="1" encryption="0" > <OBJECT name="1." type="object" writable="1" encryption="0" > <PARAMETER name="Password" type="string" value="<some value>" writable="1" encryption="1" password="1" /> </OBJECT> 5. Replace <some value> by a new superadmin password and add a line which enabling superadmin login after. For example, the block after the changes: <OBJECT name="User." type="object" writable="1" encryption="0" > <OBJECT name="1." type="object" writable="1" encryption="0" > <PARAMETER name="Password" type="string" value="s0meP@ss" writable="1" encryption="1" password="1" /> <PARAMETER name="Enable" type="boolean" value="1" writable="1" encryption="0"/> </OBJECT> 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 (superadmin:xxxxxxxxxx, where xxxxxxxxxx is a new password from the p.5) 9. Enable SSH access to the router (Settings -> Access control -> SSH) 10. Connect to the router using SSH shell using superadmin account 11. Run in SSH shell: sh 12. Make a mtd backup (optional, see related section) 13. Change bootflag to Sercomm1 and reboot: printf 1 | dd bs=1 seek=7 count=1 of=/dev/mtdblock3 reboot 14. Login to the router web interface under admin account 15. Remove dots from the OpenWrt factory image filename 16. 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; do nanddump -f mtd$i /dev/mtd$i; \ tftp -l mtd$i -p 192.168.0.2; md5sum mtd$i >> mtd.md5; rm mtd$i; done tftp -l mtd.md5 -p 192.168.0.2 MAC Addresses ------------- +-----+------------+---------+ | use | address | example | +-----+------------+---------+ | LAN | label | f4:*:66 | | WAN | label + 11 | f4:*:71 | | 2g | label + 2 | f4:*:68 | | 5g | label + 3 | f4:*:69 | +-----+------------+---------+ 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_unpacker Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
179 lines
4.1 KiB
Bash
Executable file
179 lines
4.1 KiB
Bash
Executable file
#
|
|
# Copyright (C) 2010 OpenWrt.org
|
|
#
|
|
|
|
PART_NAME=firmware
|
|
REQUIRE_IMAGE_METADATA=1
|
|
|
|
RAMFS_COPY_BIN='fw_printenv fw_setenv'
|
|
RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock'
|
|
|
|
platform_check_image() {
|
|
return 0
|
|
}
|
|
|
|
platform_do_upgrade() {
|
|
local board=$(board_name)
|
|
|
|
case "$board" in
|
|
alfa-network,quad-e4g)
|
|
[ "$(fw_printenv -n dual_image 2>/dev/null)" = "1" ] &&\
|
|
[ -n "$(find_mtd_part backup)" ] && {
|
|
PART_NAME=backup
|
|
if [ "$(fw_printenv -n bootactive 2>/dev/null)" = "1" ]; then
|
|
fw_setenv bootactive 2 || exit 1
|
|
else
|
|
fw_setenv bootactive 1 || exit 1
|
|
fi
|
|
}
|
|
;;
|
|
ampedwireless,ally-00x19k|\
|
|
ampedwireless,ally-r1900k)
|
|
if [ "$(fw_printenv --lock / -n bootImage 2>/dev/null)" != "0" ]; then
|
|
fw_setenv --lock / bootImage 0 || exit 1
|
|
fi
|
|
;;
|
|
mikrotik,ltap-2hnd|\
|
|
mikrotik,routerboard-750gr3|\
|
|
mikrotik,routerboard-760igs|\
|
|
mikrotik,routerboard-m11g|\
|
|
mikrotik,routerboard-m33g)
|
|
[ "$(rootfs_type)" = "tmpfs" ] && mtd erase firmware
|
|
;;
|
|
asus,rt-ac65p|\
|
|
asus,rt-ac85p)
|
|
echo "Backing up firmware"
|
|
dd if=/dev/mtd4 bs=1024 count=4096 > /tmp/backup_firmware.bin
|
|
dd if=/dev/mtd5 bs=1024 count=52224 >> /tmp/backup_firmware.bin
|
|
mtd -e firmware2 write /tmp/backup_firmware.bin firmware2
|
|
;;
|
|
esac
|
|
|
|
case "$board" in
|
|
ampedwireless,ally-00x19k|\
|
|
ampedwireless,ally-r1900k|\
|
|
arcadyan,we420223-99|\
|
|
asus,rt-ac65p|\
|
|
asus,rt-ac85p|\
|
|
asus,rt-ax53u|\
|
|
asus,rt-ax54|\
|
|
beeline,smartbox-flash|\
|
|
beeline,smartbox-giga|\
|
|
beeline,smartbox-pro|\
|
|
beeline,smartbox-turbo|\
|
|
beeline,smartbox-turbo-plus|\
|
|
belkin,rt1800|\
|
|
dlink,covr-x1860-a1|\
|
|
dlink,dap-x1860-a1|\
|
|
dlink,dir-1960-a1|\
|
|
dlink,dir-2640-a1|\
|
|
dlink,dir-2660-a1|\
|
|
dlink,dir-3060-a1|\
|
|
dlink,dir-853-a3|\
|
|
etisalat,s3|\
|
|
h3c,tx1800-plus|\
|
|
h3c,tx1801-plus|\
|
|
h3c,tx1806|\
|
|
haier,har-20s2u1|\
|
|
hiwifi,hc5962|\
|
|
iptime,a3004t|\
|
|
iptime,ax2004m|\
|
|
iptime,t5004|\
|
|
jcg,q20|\
|
|
linksys,e5600|\
|
|
linksys,e7350|\
|
|
linksys,ea6350-v4|\
|
|
linksys,ea7300-v1|\
|
|
linksys,ea7300-v2|\
|
|
linksys,ea7500-v2|\
|
|
linksys,ea8100-v1|\
|
|
linksys,ea8100-v2|\
|
|
mts,wg430223|\
|
|
netgear,eax12|\
|
|
netgear,r6220|\
|
|
netgear,r6260|\
|
|
netgear,r6350|\
|
|
netgear,r6700-v2|\
|
|
netgear,r6800|\
|
|
netgear,r6850|\
|
|
netgear,r6900-v2|\
|
|
netgear,r7200|\
|
|
netgear,r7450|\
|
|
netgear,wac104|\
|
|
netgear,wac124|\
|
|
netgear,wax202|\
|
|
netis,wf2881|\
|
|
raisecom,msg1500-x-00|\
|
|
rostelecom,rt-fe-1a|\
|
|
rostelecom,rt-sf-1|\
|
|
sercomm,na502|\
|
|
sercomm,na502s|\
|
|
sim,simax1800t|\
|
|
tplink,ec330-g5u-v1|\
|
|
wifire,s1500-nbn|\
|
|
xiaomi,mi-router-3g|\
|
|
xiaomi,mi-router-3-pro|\
|
|
xiaomi,mi-router-4|\
|
|
xiaomi,mi-router-ac2100|\
|
|
xiaomi,mi-router-cr6606|\
|
|
xiaomi,mi-router-cr6608|\
|
|
xiaomi,mi-router-cr6609|\
|
|
xiaomi,redmi-router-ac2100|\
|
|
zyxel,nwa50ax|\
|
|
zyxel,nwa55axe)
|
|
nand_do_upgrade "$1"
|
|
;;
|
|
iodata,wn-ax1167gr2|\
|
|
iodata,wn-ax2033gr|\
|
|
iodata,wn-dx1167r|\
|
|
iodata,wn-dx2033gr)
|
|
iodata_mstc_set_flag "debugflag" "factory" "0xfe75" "0,1" "1"
|
|
iodata_mstc_set_flag "bootnum" "persist" "0x4" "1,2" "1"
|
|
nand_do_upgrade "$1"
|
|
;;
|
|
iodata,wn-deax1800gr)
|
|
iodata_mstc_set_flag "bootnum" "working" "0x4" "0,1" "0"
|
|
nand_do_upgrade "$1"
|
|
;;
|
|
iodata,wn-dx1200gr)
|
|
iodata_mstc_set_flag "debugflag" "factory" "0x1fe75" "0,1" "1"
|
|
iodata_mstc_set_flag "bootnum" "persist" "0x4" "1,2" "1"
|
|
nand_do_upgrade "$1"
|
|
;;
|
|
tplink,er605-v2)
|
|
echo "Upgrading tplink,er605-v2"
|
|
CI_UBIPART="firmware"
|
|
CI_KERNPART="kernel"
|
|
nand_do_upgrade "$1"
|
|
;;
|
|
ubnt,edgerouter-x|\
|
|
ubnt,edgerouter-x-sfp)
|
|
platform_upgrade_ubnt_erx "$1"
|
|
;;
|
|
zyxel,lte3301-plus|\
|
|
zyxel,lte5398-m904|\
|
|
zyxel,nr7101)
|
|
fw_setenv CheckBypass 0
|
|
fw_setenv Image1Stable 0
|
|
[ "$(fw_printenv -n BootingFlag)" = "0" ] || fw_setenv BootingFlag 0
|
|
CI_KERNPART="Kernel"
|
|
nand_do_upgrade "$1"
|
|
;;
|
|
zyxel,wap6805)
|
|
local kernel2_mtd="$(find_mtd_part Kernel2)"
|
|
[ "$(hexdump -n 4 -e '"%x"' $kernel2_mtd)" = "56190527" ] &&\
|
|
[ "$(hexdump -n 4 -s 104 -e '"%x"' $kernel2_mtd)" != "0" ] &&\
|
|
dd bs=4 count=1 seek=26 conv=notrunc if=/dev/zero of=$kernel2_mtd 2>/dev/null &&\
|
|
echo "Kernel2 sequence number was reset to 0"
|
|
CI_KERNPART="Kernel"
|
|
nand_do_upgrade "$1"
|
|
;;
|
|
zyxel,wsm20)
|
|
zyxel_mstc_upgrade_prepare
|
|
nand_do_upgrade "$1"
|
|
;;
|
|
*)
|
|
default_do_upgrade "$1"
|
|
;;
|
|
esac
|
|
}
|