Hello dear community - sure this has been covered before but it was intensely difficult to find, and since I got help via email from Matthias Schiffer regarding this solution, I decided to post it publicly.
TP-Link, as BrainSlayer points out in post viewtopic.php?id=63123 in the forum, has a verification, of sorts, that results in the dreaded 18005 error when flashing from stock to openwrt or LEDE.
One fix was to add a USB with a script, and have it run via modification of the WIFI SSID (too complicated but actually rather brilliant),
Another fix, rather time consuming, was to flash dd-wrt (with the region fix incorporated), flash back to stock (pre-region-code-validation), and then flash OpenWRT.
And this new Fix, which is actually here >
git lede-project org/?p=lede/neoraider/staging.git;a=commitdiff;h=72fd20205fe26b434b6a292926ccc569c6b1ce0c
Which all it does is add this line:
IMAGE/factory.bin := append-rootfs | mktplinkfw factory -C US
right before "endef" inside target/linux/ar71xx/image/tp-link.mk
Example Before for TL-WR710N:
define Device/tl-wr710n-v1
$(Device/tplink-8mlzma)
DEVICE_TITLE := TP-LINK TL-WR710N v1
DEVICE_PACKAGES := kmod-usb-core kmod-usb2
BOARDNAME := TL-WR710N
DEVICE_PROFILE := TLWR710
TPLINK_HWID := 0x07100001
CONSOLE := ttyATH0,115200
endef
Example After:
define Device/tl-wr710n-v1
$(Device/tplink-8mlzma)
DEVICE_TITLE := TP-LINK TL-WR710N v1
DEVICE_PACKAGES := kmod-usb-core kmod-usb2
BOARDNAME := TL-WR710N
DEVICE_PROFILE := TLWR710
TPLINK_HWID := 0x07100001
CONSOLE := ttyATH0,115200
IMAGE/factory.bin := append-rootfs | mktplinkfw factory -C US
endef
THAT'S IT!
The more in depth explanation from Matthias is:
"
Correct.
The default IMAGE/factory.bin definition used for TP-Link devices doesn't
set a region code (the default is defined in Device/tplink, which is
included by Device/tplink-nolzma, which is included by Device/tplink-8m,
included by Device/tl-wr710n-v1). The arguments '-C US' are passed to the
mktplinkfw tool (through the Build/mktplinkfw definition, but that's a bit
more complex...)
"