https://iliasa.eu/blog/feed.xml

Upgrade TP-Link PowerLine adapter firmware

2021-01-05

This post covers the procedure of upgrading the firmware of TP-LINK TL-WPA4226KIT v4 PowerLine adapters.

The TP-LINK TL-WPA4226KIT v4 consists of two units:

  • TL-PA4020P (2xRJ45, passthru unit)
  • TL-WPA4220 v4 (2xRJ45, WiFi unit)

I got frequent drops of connection, averaging from 2 to 5 times a day. Like 2 minutes operation interruptions. The rest network worked fine and I concluded that the problem was in the connection between those two units.
Upgrading the firmware from TP-Link's website didn't fix the problem.

It seems that TP-Link's updates hadn't upgraded the units' firmware since 27/10/2017 (TL-WPA4220) and 28/04/2016 (TL-PA4020P).

I bumped into this post in TP-Link's forum which links to files that include newer firmware/drivers than the one in TP-Link’s official updates.
Keep in mind that this new firmware is not flashable with the conventional tpPLC utility.

Upgrade procedure

Make sure you have directly connected your PC/laptop to the receiver unit (TL-WPA4220 in my case) with an ethernet cable.

New firmware file

The first step is to download the new firmware file (FW-QCA7420-1.5.0.0026-02-CS-20200114.nvm) from the post I linked above.

Install open-plc-utils

open-plc-utils GitHub repository can be found here.

git clone https://github.com/qca/open-plc-utils
cd open-plc-utils
make

You will probably get errors regarding missing libraries.
You need to work it out using the package manager of your linux distribution and rerun make.

Once you have successfully built the open-plc-utils program, it is time to install it.

sudo make install

Optionally, install manpages:

sudo make manuals

Collect the .pib files that will be used in flashing

Firstly, find out the interface name of your network card (NIC).
Mine was enp3s0. You can find yours with:

ip addr

Then, we need to identify the PL units along with some info.
The sudo plcstat -t -i enp3s0 command provides what we need:

P/L NET TEI ------ MAC ------ ------ BDA ------  TX  RX CHIPSET FIRMWARE
LOC STA 002 D8:47:32:C8:73:39 D4:BE:D9:D9:BB:4A n/a n/a QCA7420 MAC-QCA7420-1.4.0.20-00-20171027-CS
REM CCO 001 98:48:27:63:5C:F9 8C:68:C8:F4:BE:27 128 094 QCA7420 MAC-QCA7420-1.3.1.2141-00-20160428-CS

D8:47:32:C8:73:39 is the address of my WPA4220 with firmware version MAC-QCA7420-1.4.0.20-00-20171027-CS
98:48:27:63:5C:F9 is the address of my PA4020P with firmware version MAC-QCA7420-1.3.1.2141-00-20160428-CS

To identify which address belongs to which unit, you can match it with the address written on the sticker on each unit.

Getting the .pib files

For PA4020P:

sudo plctool -i enp3s0 -p TL-PA4020P.pib 98:48:27:63:5C:F9

For WPA4220:

sudo plctool -i enp3s0 -p TL-WPA4220.pib D8:47:32:C8:73:39

We've got two .pib files:

  • TL-WPA4220.pib
  • TL-PA4020P.pib

Flashing the new firmware

In this step we will use the .nvm file from earlier and the two .pib files we acquired in the previous step.

For TL-PA4020P

sudo plctool -i enp3s0 -P TL-PA4020P.pib -N FW-QCA7420-1.5.0.0026-02-CS-20200114.nvm -R 98:48:27:63:5C:F9

Which outputs a long wall of text ending with:

.
.
MODULE_SUB_ID 0x0000
MODULE_LENGTH 1132
MODULE_OFFSET 0x046C0000
enp3s0 98:48:27:63:5C:F9 Close Session
enp3s0 98:48:27:63:5C:F9 Reset Device
enp3s0 98:48:27:63:5C:F9 Resetting ...

Congratulations! We have successfully flashed the new firmware on our TL-PA4020P!

For TL-WPA4220

sudo plctool -i enp3s0 -P TL-WPA4220.pib -N FW-QCA7420-1.5.0.0026-02-CS-20200114.nvm -R D8:47:32:C8:73:39
.
.
.
MODULE_SUB_ID 0x0000
MODULE_LENGTH 1132
MODULE_OFFSET 0x046C0000
enp3s0 D8:47:32:C8:73:39 Close Session
enp3s0 D8:47:32:C8:73:39 Reset Device
enp3s0 D8:47:32:C8:73:39 Resetting ...

Congratulations! We have successfully flashed the new firmware on our TL-WPA4220!

Checking the firmware version

sudo plcstat -t -i enp3s0
P/L NET TEI ------ MAC ------ ------ BDA ------  TX  RX CHIPSET FIRMWARE
LOC STA 006 D8:47:32:C8:73:39 D4:BE:D9:D9:BB:4A n/a n/a QCA7420 MAC-QCA7420-1.5.0.26-02-20200114-CS
REM CCO 004 98:48:27:63:5C:F9 7C:64:56:8A:82:5A 169 107 QCA7420 MAC-QCA7420-1.5.0.26-02-20200114-CS

Notice the new firmware version for both units:

MAC-QCA7420-1.5.0.26-02-20200114-CS

Conclusion

Since the upgrade, no connection interruptions have occurred.

TP-Link needs to provide updates that include newer firmware/drivers for their products.