mirror of
https://github.com/openwrt-xiaomi/xmir-patcher.git
synced 2026-09-22 22:57:55 +03:00
Add support RB03 (firmware v1.2.7)
This commit is contained in:
+1
-1
@@ -39,7 +39,7 @@ if dn == 'R3600' and gw.rom_version == '1.0.17':
|
||||
import connect2
|
||||
sys.exit(0)
|
||||
|
||||
if dn in 'R3600 RA69 RA70 RA72':
|
||||
if dn in 'R3600 RA69 RA70 RA72 RB03':
|
||||
import connect3
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
+32
-14
@@ -212,24 +212,42 @@ def telnet_connect(xqpass):
|
||||
return None
|
||||
|
||||
|
||||
flasher = ExFlasher(gw)
|
||||
xqpass = calc_xqpassword(flasher.syslog.device_sn)
|
||||
flasher = None
|
||||
device_sn = None
|
||||
|
||||
if dn == 'RB03':
|
||||
if gw.rom_version != '1.2.7':
|
||||
die('First you need to install firmware version 1.2.7 (without saving settings)')
|
||||
info = gw.get_init_info()
|
||||
if not info or info["code"] != 0:
|
||||
die('Cannot get init_info')
|
||||
device_sn = info["id"]
|
||||
else:
|
||||
flasher = ExFlasher(gw)
|
||||
device_sn = flasher.syslog.device_sn
|
||||
|
||||
print(f'Device Serial Number: {device_sn}')
|
||||
xqpass = calc_xqpassword(device_sn)
|
||||
print('Default Telnet password: "{}"'.format(xqpass))
|
||||
|
||||
if not gw.check_telnet():
|
||||
bdata = flasher.get_bdata_env()
|
||||
if not 'telnet_en' in bdata.var or bdata.var['telnet_en'] != '1':
|
||||
flasher.patch_bdata()
|
||||
|
||||
if not gw.check_telnet():
|
||||
die('The Telnet server could not be activated.')
|
||||
if flasher:
|
||||
if not gw.check_telnet():
|
||||
bdata = flasher.get_bdata_env()
|
||||
if not 'telnet_en' in bdata.var or bdata.var['telnet_en'] != '1':
|
||||
flasher.patch_bdata()
|
||||
if not gw.check_telnet():
|
||||
die('The Telnet server could not be activated.')
|
||||
else:
|
||||
if not gw.check_telnet():
|
||||
die('Telnet server not respond.')
|
||||
|
||||
'''
|
||||
print('Connect to telnet ...')
|
||||
if not telnet_connect(xqpass):
|
||||
print('Can\'t connect to Telnet server.')
|
||||
device_factory_reset()
|
||||
flasher.wait_reboot(75)
|
||||
if flasher:
|
||||
print('Connect to telnet ...')
|
||||
if not telnet_connect(xqpass):
|
||||
print('Can\'t connect to Telnet server.')
|
||||
device_factory_reset()
|
||||
flasher.wait_reboot(75)
|
||||
'''
|
||||
|
||||
print('Connect to Telnet ...')
|
||||
|
||||
Reference in New Issue
Block a user