OpenWrt Forum Archive

Topic: TP-LINK Region Code Solution - Error 18005 Fix TL-WR710N and others

The content of this topic has been archived on 29 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

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...)

"

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.

Time consuming? Not really, far easier and less chance to goof.
Besides, NO command lines (or similar) for the 75-90% that prefer not to go that route mostly because it's too complicated and/or confusing.

Use the factory-to-ddwrt-us bin to get rid of the 'locked' TP_Link F/W (from Oct or Nov 2015), then the wdr3600v1_webrevert (your model number) bin to revert back to the origibal TP-Link F/W and lastly, your choice of the replacement Openwrt or dd-wrt F/W.

The discussion might have continued from here.