Support for TL-WR810N v2

@pepe2k Just tried it out. I have a TL-WR810N(US) ver 2.0 straight out of the box

Stock firmware, version:
Firmware Version:
3.16.9 Build 160509 Rel.49605n
Hardware Version:
WR810N v2 00000000

I tried uploading the file from snapshots
https://downloads.lede-project.org/snapshots/targets/ar71xx/generic/lede-ar71xx-generic-tl-wr810n-v2-squashfs-factory.bin
that I downloaded this morning via web console and got the dreaded error

Error code: 18005
Upgrade unsuccessfully because the version of the upgraded file was incorrect. Please check the file name.

I tried to serve the file in TFTP mode, changed the name appropriately, and it downloaded it (I watched in wireshark), but a few moments later it booted to normal firmware.

Well, that is 99% due to lack of regional metadata being appened.

I'm not author of the support for this device.

Right, I assumed the regional metadata would somehow be in there, since there are two versions of the file on the snapshots, one for EU and one with no region code, which I assumed was US. Is there anything useful I can do with this file or does someone who knows what they're doing with the build need to make a further patch and get it rebuilt overnight?

Should be able to append US and EU metadata.
I will give it a try tonight and build for someone to test

Here you go:
https://drive.google.com/drive/folders/1m50izzmQZ1ECxoiHpx_AY8lud6d1sT3D?usp=sharing

You will find EU and US factory images

If it works I will open PR for it

no dice, still the same 18005 error after trying to flash from the factory firmware web console.

Than there is something else missing other than regional metadata.
For example I now checked and TP Link did not change HWID from v1 like author of commit did.
Building another image for you to test

Here are new images to test:
https://drive.google.com/drive/folders/1m50izzmQZ1ECxoiHpx_AY8lud6d1sT3D?usp=sharing

Thanks ! but unfortunately still no dice, same complaint.

Have you tried generic factory image and US image?

no just the US, but I tried the generic just now and same story.

I am out of ideas.
It is hard when you dont have device next to you to test stuff

the version on the router is 160509 which is what is listed on the factory firmware download page, but then there's a big number 1474506175401q on the zip file, which makes me think there could concievably be a difference between my firmware and the latest thing on the factory site... any sense in upgrading the factory firmware first?

You can try it,cant hurt

yeah, no dice. it took the factory file, but after that it still gives the same error message when I try to give your file, either US or generic.

I'm sure this is just some simple check they are doing to see that the file has some particular info at some particular spot that indicates it's for this router and US version etc... but very hard to debug as you say. I'm sure a serial console would help here.

Who wrote the support patch? And what did they test it on? Is there someone we can tag here to request more info?

Well,from looking at stock firmware binary I can see that there is US written at 0x00000045 offset

I see that though at 0x44 if it's zero based addressing, just altered your US image to add that there. Any reason I shouldn't flash it? Are those bytes in use by the lede image?

well I guess I'm adventurous, I tried it, but no dice.

what if I just replace the first 45 bytes with the bytes from the stock factory firmware which says "TP-LINK Technologies ver 1.0 etc etc? any reason these bytes are critically important to function of LEDE or are they just labels?

I did a dd to copy the first 160 bytes of the factory file over the first 160 bytes of your US file, and it still complains... grr