-
Notifications
You must be signed in to change notification settings - Fork 346
Downgrade Firmware
Original author @serrj-sv and community. Discuss here.
Gateway keeps the previous firmware before the update and you can be loaded from it.
If you update twice to a bad firmware, this method does not work.
If you have bad firmware from the factory - this method does not work.
-
Open Gateway
-
Solder USB UART adapter (GND to GND, RX to TX, TX to RX)
-
Connect adapter to USB. UART setting: 38400 8n1, disable flow control (rts/cts)
-
Power gateway with build-in USB power
-
Сheck if boot is OK and there are no artifacts in console. If there are artifacts - check the wires, change the USB UART.
-
Turn off gateway power
-
Connect TP17 to ground (example USB case)
Don't solder TP17. It may brake UART data.
-
Power gateway with build-in USB power
-
Remove TP17/GND wire after
<RealTek>
shows in console.
Attention: ALWAYS keep all UART logs and/or backups!
-
Enable flash
<RealTek>snwbi
-
Read boot_info from nand to memory
<RealTek>snwbrecc a0000000 140 800
-
Display boot_info in memory
<RealTek>db a0000000 40
You will get something similar:
[Addr] .0 .1 .2 .3 .4 .5 .6 .7 .8 .9 .A .B .C .D .E .F A0000000: 7C 91 00 00 E4 58 01 01 01 01 00 20 EC 04 C8 CF |....X..... .... A0000010: 00 00 20 EC 04 CB 19 00 00 82 80 04 62 C6 00 00 .. .........b... A0000020: 9A 40 04 72 E8 00 00 00 01 31 2E 30 2E 32 2E 30 [email protected] A0000030: 30 35 00 00 00 00 00 FF FF FF FF FF FF FF FF FF 05..............
-
Copy data to this calculator:
Scroll down to Swapped bootinfo dump section
It should change 6 bytes for first line:
__ __ __ __ XX XX YY YY YY YY __ __ __ __ __ __
-
Paste response from calculator:
<RealTek>eb a000000 7C 91 00 00 E6 5A 00 00 00 00 00 20 EC 04 C8 CF
-
Check changes. Repeat step 3. The first line should be changed
-
Clear nand before write
<RealTek>snwbeb 140
-
Write boot_info from memory to nand
<RealTek>snwbwecc a0000000 140 800
-
Reboot gateway (power off/on)
Gateway should starts with previous firmware.