Support for TL-WR840N(ES) Ver 5.0 (EU)


#142

@robimarko, I have three questions, if you could answer I will be very gratefull.
1 - Any router accepts TFTP images. So does it only depends of the bootloader?
2 - What is the difference between a TFTP image and a non TFTP image?
3 - I have noticed via terminal console USB to UART that the bootloader of v5(BR) does not allow to access U-Boot console to use TFPT, so is this the manner to check ?


#143

Ok,let me reply to all of your questions.
@meistre I have padded LEDE image with extra 128kb which is the size of U-boot partition.
That is due to U-boot version used not writing images received over TFTP from begining of the received image but instead skips first 128kb and then writes rest.

I did not use 840N V4 U-boot purposelly,I received my router with that U-boot,so since we have now way of knowing which router uses which version without looking at U-boot console I decided not to include TFTP image and risk users bricking their boards.

And as for third question

  1. TFTP is just a simpler version of FTP protocol which is easy and usefull to implement for recovery purposes.
    Bootloader needs to have it included in order to use it for recovering from bootloader.
    2.This one is already anwsered in the first part.
  2. In order to use TFTP you need to hold reset button while turning on,and then you will see it in UART log.
    I repeat once again do not TFTP sysupgrade image,that will brick your board.
    Please go to U-boot console and write print and give me output of it.
    I can tell you if it is correct and if it is I can send you TFTP image to test.

#144

@meistre @robimarko it is easy to prepare sysupgrade image to flash it from web ui on this particular firmware. Just use this template for mt76x8.mk

define Device/tl-wr840n-v5
  DTS := TL-WR840NV5
  IMAGE_SIZE := 3840k
  DEVICE_TITLE := TP-Link TL-WR840N v5
  TPLINK_FLASHLAYOUT := 4Mmtk
  TPLINK_HWID := 0x08400005
  TPLINK_HWREV := 0x4c
  TPLINK_HWREVADD := 0x5
  TPLINK_HVERSION := 3
  KERNEL := $(KERNEL_DTB)
  KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-v2-header -e
  IMAGE/sysupgrade.bin := tplink-v2-image -s -e | append-metadata | \
	check-size $$$$(IMAGE_SIZE)
endef
TARGET_DEVICES += tl-wr840n-v5

#145

@xssa Thanks for reply!! How and where could I use this template?


#146

./target/linux/ramips/image/mt76x8.mk


#147

I dont understand you.
I added support for the device and sysupgrade can be easily flashed through web ui


#148

I'm about this regional version string.

This particular regional firmware doing check against it.


#150

You need flash dump?


#151

Yes flash dump


#152

You can find it here
https://drive.google.com/drive/folders/0B1VOQQ-_EIXKa1B0MERjVUk4TlU

Those are 3 exact dumps,so dont let that worry you.
I always take couple of dumps just to be sure they are the same


#153

Thanks bro


#154

Are these which i can use with my eeprom programmer


#155

They are full dumps of SPI flash.
You cant use EEPROM programmer for SPI flash.

Which programmer do you have?


#156

Name is ch3411 or like that


#157

That one you can use.
I use it all the time.
My recommendation is to use it with flashrom on Linux distro

Also,change the mac adress to one matching yours


#158

download this one


#159

Change mac address of what and what is flash rom


#160

Change MAC adress in dump to one matching yours on sticker.
I dont remember MAC of mine so you can flash it without changing it

Flashrom is tool for writing to SPI flash chips.
https://www.flashrom.org/Flashrom


#161

Ok I'll change according to mine


#162

I dont remember in which location it is in the dump.
But you can find it here:

So it should be at 0x3FF100 in the dump