TPLink EAP225-Outdoor V1 revert to factory firmware

Hello friends, I'm a newbie here, but would like to flash EAP225-Outdoor with OpenWRT firmware to play with 802.11r. But I would like to have an option to roll back to original firmware. I did not find detailed recipe of how to do it. As I understood correctly I can not just provide tplink firmware to luci for upgrade interface or it will brick my device and need a specially generated sysupgrade image made from tplink firmware. Can someone describe me how to do that for this device, cause recipes look different from model to model. Or maybe someon has a ready rollback sysupgrade fw available for download for this model. thanks in advance.

There is a procedure to backup the current config in the device page.I am not sure about how to restore it though.

There is sense in it only if restore method available.

Maybe @svanheule knows how to revert to OEM firmware?

Another user wanted to do the same just last week:

However, if you are still on the vendor firmware, there is another way. I just realised this from reading the backup instructions on the wiki. :slight_smile:

Following the backup instructions, you can extract the two firmware partitions:

  • kernel partition (should be mtd3, ca. 1.5MB): will identify as an ELF file, first bytes 0x79 0x7F 'E' 'L' 'F'
  • rootfs partition (should be mtd4, ca. 13MB): will identify as a squashfs archive, first bytes "hsqs"

If these two partitions are concatenated, you have effectively created a sysupgrade file you can use from OpenWrt.

Edit: I've added both methods to the wiki page. That should help future users.

2 Likes

Does this model have TFTP recovery? And is it in a format where you can simply TFTP in the stock firmware bin file?

No, the EAP-series does not support TFTP-recovery. Although the EAP245v3 has a different bootloader, which will start an http-server for recovery when it fails to boot.

Should I just append one file to another ? I will try to make backup files and send you to check whether it is done correctly. I think such ready file will be useful for other users who has already flashed openwrt and want to roll back. Also it could be a great idea to put such original firmware restoring binaries for each router in the database near with ramfs and sysupgrade :slight_smile:

Found an answer in your wiki update, thanks

cat mtdblock3 mtdblock4 > eap225-stock-sysupgrade.bin

I have followed you guide and it looks like I created that magic binary

A few fixes for the guide.

  • This command gives an error
    tftp -l /tmp/logdump/eap225-outdoor.tar <your tftp-server>
    and this one instead of it is working:
    tftp -p -l /tmp/logdump/eap225-outdoor.tar -r eap225-outdoor.tar <your tftp-server>

  • partitions from my device are:

dev:    size   erasesize  name
mtd0: 00020000 00010000 "u-boot"
mtd1: 00010000 00010000 "pation-table"
mtd2: 00010000 00010000 "product-info"
mtd3: 00180000 00010000 "kernel"
mtd4: 00d40000 00010000 "rootfs"
mtd5: 00030000 00010000 "config"
mtd6: 00080000 00010000 "mutil-log"
mtd7: 00040000 00010000 "oops"
mtd8: 00010000 00010000 "ART"

so as I understand we should concat mtd3 and mt4

That's on latest vendor fw 5.0.3 Build 20210316 Rel. 67358(4555)

  • ELF header starts with 0x7F, but not 0x79

  • Also this can be added for dummies or copypasters:

cd /tmp/logdump
cat ./fw-backup/mtdblock3.bin ./fw-backup/mtdblock4.bin > ./eap225-stock-sysupgrade.bin
tftp -p -l /tmp/logdump/eap225-stock-sysupgrade.bin -r eap225-stock-sysupgrade.bin <your tftp-server>
1 Like

File's info, pls check, are they correct ?

mtdblock3.bin 1,50 MB (1 572 864 bytes):

ELF Header

  Class:      ELF32
  Encoding:   Big endian
  ELFVersion: Current
  Type:       Executable file
  Machine:    MIPS R3000 (officially, big-endian only)
  Version:    Current
  Entry:      0x80306850
  Flags:      0x70001001

Section Headers:
[  Nr ] Type              Addr     Size     ES Flg Lk Inf Al Name
[    0] NULL              00000000 00000000 00     00 000 00                   
[    1] PROGBITS          80306850 000030d0 00 AX  00 000 10 .text             
[    2] PROGBITS          80309920 000002a4 01 A   00 000 04 .rodata.str1.4    
[    3] PROGBITS          80309bd0 0013a431 00 WA  00 000 10 .data             
[    4] NOBITS            80444010 00402010 00 WA  00 000 10 .bss              
[    5] ? (0x6ffffff5)    00000000 00000010 00     00 000 01 .gnu.attributes   
[    6] STRTAB            00000000 0000003b 00     00 000 01 .shstrtab         
Key to Flags: W (write), A (alloc), X (execute)


Segment headers:
[  Nr ] Type           VirtAddr PhysAddr FileSize Mem.Size Flags    Align
[    0] LOAD           80300000 80300000 00144001 00546020 RWX      00010000 

Section Data:
.text
[00000000] 00 80 80 21 00 a0 88 21 00 c0 90 21 00 e0 98 21
[00000010] 3c 04 80 44 24 84 40 10 3c 06 80 84 24 c6 60 20
[00000020] ac 80 00 00 14 c4 ff fe 24 84 00 04 3c 04 80 44
[00000030] 24 84 40 20 3c 1d 80 84 27 bd 60 20 3c 1f 80 30
.rodata.str1.4
[00000000] 69 6e 76 61 6c 69 64 20 64 69 73 74 61 6e 63 65
[00000010] 20 74 6f 6f 20 66 61 72 20 62 61 63 6b 00 00 00
[00000020] 69 6e 76 61 6c 69 64 20 64 69 73 74 61 6e 63 65
[00000030] 20 63 6f 64 65 00 00 00 69 6e 76 61 6c 69 64 20
.data
[00000000] 1f 8b 08 00 00 00 00 00 02 03 ec 5a 7d 6c 5b d7
[00000010] 75 3f ef f2 91 a2 65 c6 7e 92 59 85 49 e4 fa 3d
[00000020] eb 4a 62 6a c6 a1 13 62 10 12 22 a6 49 4a 71 87
[00000030] a0 50 32 a5 73 36 63 60 29 d9 31 50 af a0 db 2c
.gnu.attributes
[00000000] 41 00 00 00 0f 67 6e 75 00 01 00 00 00 07 04 03
.shstrtab
[00000000] 00 2e 73 68 73 74 72 74 61 62 00 2e 74 65 78 74
[00000010] 00 2e 72 6f 64 61 74 61 2e 73 74 72 31 2e 34 00
[00000020] 2e 64 61 74 61 00 2e 62 73 73 00 2e 67 6e 75 2e
[00000030] 61 74 74 72 69 62 75 74 65 73 00

Segment Data:
Segment # 0
[00000000] 7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00
[00000010] 00 02 00 08 00 00 00 01 80 30 68 50 00 00 00 34
[00000020] 00 14 40 4c 70 00 10 01 00 34 00 20 00 01 00 28
[00000030] 00 07 00 06 00 00 00 01 00 00 00 00 80 30 00 00

mtdblock4.bin 13,2 MB (13 893 632 bytes):

Unpacked Size     : 21 011 452
Packed Size       : 6 164 213
Compression ratio : 66%
Folders           : 76
Files             : 595
__________________________________________

Type              : SquashFS
Method            : XZ
Characteristics   : ALWAYS_FRAGMENTS DUPLICATES_REMOVED EXPORTABLE 0x600
Headers Size      : 16 486
Created           : 2021-03-16 13:42:37
Big-endian        : -
File System       : SquashFS 4.0

Correct, these are the partitions you need to build the sysupgrade file.

Anyone have a dump file on these device? My device got bricked. I accidentaly flash wrong openwrt firmware file.

Probably you need this one:
https://drive.google.com/file/d/1qUWN5eu1dl6v1ZLqAalOwh0G0rGNqsvN/view?usp=sharing

It is a firmware that I built for restoration from OpenWRT back to stock.

And also here is my archive with stock partitions:

https://drive.google.com/file/d/1U4ZQj-S_9gdLOuPBQHU0TOoipSkKlq1G/view?usp=sharing

hope it will help

Thank you soo much.

thank you for sharing this
can i use this firmware on eap225 v3 ?