Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
toh:etisalat:s3 [2023/01/12 16:01] – [Return to Stock] csharper2005toh:etisalat:s3 [2023/10/16 20:12] – [Installation] csharper2005
Line 5: Line 5:
 /* USE https://openwrt.org/meta/create_new_device_page */ /* USE https://openwrt.org/meta/create_new_device_page */
  
-{{page>meta:infobox:construction&noheader&nofooter&noeditbtn}} 
  
 OEM: Sercomm S3 OEM: Sercomm S3
Line 11: Line 10:
 Etisalat S3 is a wireless router based on the MT7621 platform with USB 3.0 port. Etisalat S3 is a wireless router based on the MT7621 platform with USB 3.0 port.
  
-{{media:sercomm_s3_front.jpg?400|Etisalat S3}}+{{media:sercomm:sercomm_s3_front.jpg?400|Etisalat S3}}
  
  
Line 40: Line 39:
 ===== Installation ===== ===== Installation =====
 /* stable release */ /* stable release */
-/* uncomment once stable release is available+
 ---- datatable ---- ---- datatable ----
 cols    : Model, Versions, Supported Current Rel, Firmware OpenWrt Install URL_url, Firmware OpenWrt Upgrade URL_url, Firmware OEM Stock URL_url cols    : Model, Versions, Supported Current Rel, Firmware OpenWrt Install URL_url, Firmware OpenWrt Upgrade URL_url, Firmware OEM Stock URL_url
 headers : Model, Version, Current Release, Firmware OpenWrt Install, Firmware OpenWrt Upgrade, Firmware OEM Stock headers : Model, Version, Current Release, Firmware OpenWrt Install, Firmware OpenWrt Upgrade, Firmware OEM Stock
-align   : c,c,c 
-filter  : Brand=Etisalat 
-filter  : Model=S3 
----- 
-*/ 
- 
- 
-/* snapshot */ 
-/* delete once stable release is available */ 
----- datatable ---- 
-cols    : Model, Versions, Supported Current Rel, Firmware OpenWrt snapshot Install URL_url, Firmware OpenWrt snapshot Upgrade URL_url, Firmware OEM Stock URL_url 
-headers : Model, Version, Current Release, Firmware OpenWrt snapshot Install, Firmware OpenWrt snapshot Upgrade, Firmware OEM Stock 
 align   : c,c,c align   : c,c,c
 filter  : Brand=Etisalat filter  : Brand=Etisalat
Line 71: Line 58:
 cfgtool.py -u configurationBackup.cfg cfgtool.py -u configurationBackup.cfg
 </code> </code>
 +
 +<hidden cfgtool.py>
 +<code bash>
 +"""
 +Copyright (c) 2022 r3d5ky
 +
 +Permission is hereby granted, free of charge, to any person obtaining a copy
 +of this software and associated documentation files (the "Software"), to deal
 +in the Software without restriction, including without limitation the rights
 +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 +copies of the Software, and to permit persons to whom the Software is
 +furnished to do so, subject to the following conditions:
 +
 +The above copyright notice and this permission notice shall be included in all
 +copies or substantial portions of the Software.
 +
 +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
 +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
 +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
 +OR OTHER DEALINGS IN THE SOFTWARE.
 +"""
 +
 +import zlib
 +import sys
 +import argparse
 +
 +def unpack(cfg_file, raw):
 +    with open(cfg_file, 'rb') as f:
 +        infile = f.read()
 +
 +    unpacked = zlib.decompress(infile[4:])
 +    config = unpacked[unpacked.find(b'\x3c\x44\x41\x54\x41'):-6]
 +    userdata = unpacked[:unpacked.find(b'\x3c\x44\x41\x54\x41')]
 +    
 +    if raw:
 +        with open(cfg_file[:-4] + '_raw.txt', 'wb') as f:
 +            f.write(unpacked)
 +
 +    with open(cfg_file[:-4] + '.xml', 'wb') as f:
 +        f.write(config)
 +    with open(cfg_file[:-4] + '_userdata.bin', 'wb') as f:
 +        f.write(userdata)
 +
 +
 +def pack(xml_file, endianness):
 +    with open(xml_file, 'rb') as f:
 +        rawconfig = f.read() + b'\x0a\x00'
 +    with open(xml_file[:-4] + '_userdata.bin', 'rb') as f:
 +        userdata = f.read()
 +    endian = "little"
 +    if endianness:
 +        endian = "big"
 +    crc = zlib.crc32(rawconfig).to_bytes(4, endian)
 +    config = userdata + rawconfig + crc
 +    
 +    with open(sys.argv[2][:-4] + '_changed.cfg', 'wb') as f: 
 +        f.write(len(config).to_bytes(4, endian) + zlib.compress(config))
 +
 +
 +def main():
 +    parser = argparse.ArgumentParser(description="Sercomm backup config packer/unpacker")
 +    group = parser.add_mutually_exclusive_group(required=True)
 +    group.add_argument("-u","--unpack", action='store_true', help="unpack .cfg file to .xml + header")
 +    group.add_argument("-p","--pack", action='store_true', help="pack .xml + header back to .cfg")
 +    parser.add_argument("-r","--raw", action='store_true', help="create additional file with raw unpacked data (optional)")
 +    parser.add_argument("-b","--big", action='store_true', help="pack for Big Endian arch (default is Little Endian)")
 +    parser.add_argument('file', type=str, help="path to .cfg/.xml file for unpacking/packing")
 +    args = parser.parse_args()
 +    
 +    if args.unpack:
 +        unpack(args.file, args.raw)
 +    elif args.pack:
 +        pack(args.file, args.big)
 +
 +    print("Done!")
 +
 +
 +if __name__ == '__main__':
 +    main()
 +</code>
 +</hidden>
 +
  
 4.  Open configurationBackup.xml and find the following line: 4.  Open configurationBackup.xml and find the following line:
Line 91: Line 163:
 8.  Login to the router web interface (SuperUser:ETxxxxxxxxxx, where ETxxxxxxxxxx is the serial number from the backplate label) 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)+9.  Navigate to Settings -> Access Control -> Allow SSH (& Press apply)
  
-10. Navigate to Settings -> Remote control -> Add SSH, port 22, 10.0.0.0/255.255.255.0 and interface created before+10. Connect to the router using SSH shell under SuperUser account
  
-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 +11. Run in SSH shell:
- +
-12. Connect to the router using SSH shell under SuperUser account +
- +
-13. Run in SSH shell:+
 <code bash> <code bash>
 sh sh
 </code> </code>
  
-14. Make a mtd backup (optional, see related section)+12. Make a mtd backup (optional, see related section)
  
-15. Change bootflag to Sercomm1 and reboot:+13. Change bootflag to Sercomm1 and reboot:
 <code bash> <code bash>
 printf 1 | dd bs=1 seek=7 count=1 of=/dev/mtdblock3 printf 1 | dd bs=1 seek=7 count=1 of=/dev/mtdblock3
Line 112: Line 180:
 </code> </code>
  
-16. Login to the router web interface under admin account+14. Login to the router web interface under admin account
  
-17. Remove dots from the OpenWrt factory image filename+15. Remove dots from the OpenWrt factory image filename
  
-18. Update firmware via web using OpenWrt factory image+16. Update firmware via web using OpenWrt factory image
  
 ==== Backup ==== ==== Backup ====
Line 132: Line 200:
 </code> </code>
  
-===== Return to Stock =====+==== Return to Stock ====
 1. Change the bootflag to Sercomm1 in OpenWrt CLI and then reboot: 1. Change the bootflag to Sercomm1 in OpenWrt CLI and then reboot:
 <code bash> <code bash>
 printf 1 | dd bs=1 seek=7 count=1 of=/dev/mtdblock3 printf 1 | dd bs=1 seek=7 count=1 of=/dev/mtdblock3
 </code> </code>
-2. Optional: Update with any stock (Beeline) firmware if you want to overwrite OpenWrt in Slot 0 completely.+2. Optional: Update with any stock (Etisalat S3) firmware if you want to overwrite OpenWrt in Slot 0 completely.
 ==== Flash Layout ==== ==== Flash Layout ====
 <WRAP BOX> <WRAP BOX>
Line 195: Line 263:
 2. Connect the router with a cable and run sercomm-recovery: 2. Connect the router with a cable and run sercomm-recovery:
 <code bash> <code bash>
-sudo ./sercomm-recovery enp0s3 recovery_etisalat_s3.bin+sudo ./sercomm-recovery enp0s3 recovery_etisalat_s3_stock_slot1.bin
 </code> </code>
 where //enp0s3// - network interface connected the router, //ifconfig// - list on available network interfaces where //enp0s3// - network interface connected the router, //ifconfig// - list on available network interfaces
  
 +3. Wait until the router is flashed and rebooted.
 +
 +[[https://mega.nz/folder/tlIm1JLK#bBRJXq-DVkzJBOR2dC1K5w|Download ready recovery images]] for Sercomm devices.
 ===== Failsafe mode ===== ===== Failsafe mode =====
 -> [[docs:guide-user:troubleshooting:failsafe_and_factory_reset]] -> [[docs:guide-user:troubleshooting:failsafe_and_factory_reset]]
  • Last modified: 2024/09/05 19:04
  • by csharper2005