I have an EAP225 v4 with 5.1.0 and tried the same thing by specifying version 5.1.1 but I got the same result. I did a binary comparison of version 5.1.0 with my own image and I noticed that the partition layout is a little different, the soft-version and support-list partitions are swapped:
5.1.0:
fwup-ptn partition-table base 0x00800 size 0x00800
fwup-ptn support-list base 0x01000 size 0x000fb
fwup-ptn soft-version base 0x010fb size 0x00018
fwup-ptn os-image base 0x01113 size 0x144458
fwup-ptn file-system base 0x14556b size 0x5fb000
Openwrt:
fwup-ptn partition-table base 0x00800 size 0x00800
fwup-ptn soft-version base 0x01000 size 0x00018
fwup-ptn support-list base 0x01018 size 0x000d5
fwup-ptn os-image base 0x010ed size 0x236840
fwup-ptn file-system base 0x23792d size 0x430004
Maybe that's not a problem. Later on in the image the data for those two partitions are indeed in a different order. The 24 bytes of soft-version are after the support-list in 5.1.0 and before support-list in openwrt. This is the hex data for both soft-versions:
5.1.0:
00 00 00 10 00 00 00 00 FF 05 01 00 20 22 09 26 00 00 F3 F8 00 00 00 02
Openwrt:
00 00 00 10 00 00 00 00 FF 05 01 01 20 23 06 26 00 00 5B 9C 00 00 00 01
The pad1 (FF), version_major(05) version_minor(01) and version_patch(01) look good. The year_hi(20) year_lo(23) month(06) day(26) are also ok.
Next is the rev (00 00 5B 9C), not sure what thats about. compat_level (00 00 00 01) looks wrong. I changed that to 2 (.soft_ver_compat_level = 2). After that it accepted the file and went through the flashing process from the GUI.
Here's an updated tplink-safeloader patch if someone wants to clean it up and do something with it:
--- firmware-utils-2023-05-18-02cdbc6a/src/tplink-safeloader.c Fri Jun 30 08:35:40 2023
+++ firmware-utils-2023-05-18-02cdbc6a/src/tplink-safeloader.c Thu May 18 01:01:59 2023
@@ -1898,7 +1898,7 @@
"EAP225-Outdoor(TP-Link|UN|AC1200-D):1.0\r\n"
"EAP225-Outdoor(TP-Link|UN|AC1200-D):3.0 CA,JP\r\n",
.part_trail = PART_TRAIL_NONE,
- .soft_ver = SOFT_VER_DEFAULT,
- .soft_ver_compat_level = 1,
+ .soft_ver = SOFT_VER_NUMERIC(5, 1, 1),
+ .soft_ver_compat_level = 2,
.partitions = {