I am struggling to convert my Deco P9 to OpenWrt. @bobthebuilder and @KinteLiX did a great job on M4R porting, which boots and runs nicely, the wifi works, and there is a default config booting up.
Looking at how Tp-link configure the network in default, I cannot work out the equivalent for 21.02 with DSA mode, and the porting instructions seem incomplete at this time.
I don't think that DSA is active on KinteLiX's build. Do you still have a "Network->Switch" entry? If so then your build is still using swconfig and not DSA.
And the default config is something straight from OpenWrt. Nobody of us tinkered with that.
I do have to say that I can't really read config files. So far I've only done everything in luci.
What is it that you want to accomplish?
(Also using the Powerline functionality of the P9 is out of the question with our builds. You would have to build your own firmware that has the additional switch port added the Powerline chip is connected to.)
I managed to fix it eventually, next job is trying to boot the PLC, but need to figure out how to add it in the device tree, it seems to be on port 2 of the switch, which is missing. Job for tomorrow.
Once I get them configured using your build I'll fork it and move to a P9 dedicated config.
@dietcoke73 How far along are you on running OpenWRT on your Deco P9?
I have a Deco P9 (US) Ver: 1.8 and would like to look into running OpenWRT on it to gain access to "advanced" features such as VLANS, Multi SSID Access Points...
He is still figuring out the Powerline part. (You can of course always help and try to get it to work on your own. If so then you can base your own firmware on the latest M4R firmware I have linked below.)
If you don't need the Powerline feature then you can always just install the Deco M4R version. The flash layout for all M4R V1 and V2 and P9 V1 and V2 is the same and the hardware is the same apart from the Powerline chip so that is going to work. You just lose the Powerline capabilities with that firmware.
Well I could live without my Deco P9 supporting powerline, it would just make my setup slightly more involved.
At the moment I have 2/4 TL-PA8010's used to bridge the PPPoE connection from my router to my modem, so I "could" use powerline indirectly.
First, am I correct that VLANs are working? Second, is there any configuration or something I should take a note of, (before flashing) that may be of use later? Third, can you point to suggested sources regarding PLC? I won't have time to tinker with it till next week but, I would be interested to at least learn.
VLAN's are working,
Note the MAC addresses of the original config, only the base Mac from the flash is being read, TP Link increment that MAC during boot.
flashing using MTD is straight forward, follow @KinteLiX instructions to split the sys upgrade firmware.
The PLC is on a switch port and is up and running, but I have found no way to configure it, I've tried https://github.com/serock/pla-util and open-plc-tools, but neither find it.
I disabled all wireless and could still reach the other deco at around 20mbps, the tpPLC utility says the connection was around 200mbps at the physical level, so that seems about right.
In the end I've not got the time to work through the issues I had though.
WIFI throughput significantly lower than stock. Stock reaches 200mps on my MacBook, Openwrt default config barely reached 60mbps on 5ghz in exactly the same location.
802.11s mesh routing worked enabled ok at 5ghz ( apart from speed )
Batman-add routing worked, and I was able to bond 2.4 and 5 wifi radios into a bat0 interface, however no increase in speed was found. I am not expert enough to workout why
batctl tp bat0 to the remote showed good throughput in theory but it did not translate to the client, I must be missing something in the config.
I had lots of Mac collision warnings in the log messages, and also lots of MTU size warnings for Batman packets being fragmented, could be the cause of the speed issues.
I could not see the remote devices using batman-adv over Powerline. Could not debug.
add the other ports to the config file 02_network incrementally, I simply added all of them and saw that the plc port is always up at 1000mbps duplex, you can find the m4r config and add them all sequentially. Ports 2, 3, and 5 are in use in the stock firmware. in the M4R config They are currently set as
In short, I'd love to run this instead of TP-Link's firmware, but I'm not able to get the performance level where it needs to be to replace the OEM firmware.
The main problem here is always going to be the wireless driver. TP-Link is of course definitely using a closed source driver directly from the manufacturer of the chips they're using while we have to rely on ath10k-firmware-qca9888-ct for the 5GHz radio and whatever ath9k driver the device is using for the 2.4GHz radio.
You might want to try the non-ct version and see if that gives better performance.
I also don't know how TP-Link is doing the wifi backhaul between the individual devices but in OpenWrt the driver has to constantly switch between Access Point mode and Mesh Network mode so the usual route for that is to use one radio for the backhaul and one for the Access Point, but not both on the same radio to prevent the constant switching. If you still do it then you will have bad performance (because of the constant switching).
But in the end this isn't a Deco-specific problem but one that all devices running OpenWrt with that radio driver face.
Note the MAC addresses of the original config, only the base Mac from the flash is being read, TP Link increment that MAC during boot.
I'm unsure what you mean. eth0 and the 2.4GHz radio's first SSID are going to use the label MAC on the label on the bottom of the device. Additional SSIDs will count up the first byte of the MAC and the first 5GHz SSID will count the last byte done by one.
In the end this isn't THAT important because iPhones for instance generate a random MAC (periodically) anyway. But it's a good thing to do to prevent collisions between different Decos with the same firmware.
WIFI throughput significantly lower than stock.
I just did a speedtest on speedtest.net with my 4 years old 250€ phone and got 245Mbps down and 163Mbps up on the 5GHz radio. The uplink of that Deco M4R is of course a wired gigabit connection. So I can only guess that the 60Mbps are a result of you using batman meshing?
TP-Link is using Qualcomm's hyfi sdk for it from what I can see, it has created hidden SSID's for the backhaul that are statically configured and pass info through some hyfi proprietary solution.
I had this setup without using the CT driver and firmware due to warnings about it not liking 802.11s, so the performance numbers I saw reflect that, others may wish to try the latest CT driver and check.
The MAC address issues, yes the 2.4 and ETH0 use the label MAC's but the firmware after boot gave everything else the same MAC address as those. The problem with the MAC was only what I saw with Batman warnings. TP-Link's default firmware created a huge! number of virtual ports each of which was some increment on the labelled Mac address.
Hard to say if the performance was or was not the mesh, I had one node hard wired to the modem, and even on that I maxed out at 100mbps, couldn't get near to the WAN link speed of 350. I suspect just poor configuration on my side, but as said don't have enough time to spend debugging.
I'm guessing you mean the interfaces under Network->Interfaces? Since there is only eth0, every interface there is of course going to be derived from that and will thus have the same MAC. But that too is a OpenWrt "problem" and not specific to your device.
If that doesn't work for you then you can of course always override the MAC address per interface. In the end the only devices seeing those MACs are within your private network so you just have to make sure that you don't give every device the same MACs and you should be fine even when using something like 12:34:56:78:90:12.
yes, the devices listed in the interfaces page, and what I manually did was give every conflicting device a unique MAC and changed MTU, but since I have, and most others who bought the P9 will, have a 3 pack of Deco's, some boot scripts need to be written to set MAC address and MTU on everything correctly, based on the stored Mac in the non volatile partition
Didn't even think about using any of the Decos as actual routers. My bad.
My devices are all setup as dumb APs with wireless and wired connections bridged. I mainly use them for multiple SSIDs that lead to multiple VLANs. I don't even have a WAN interface anymore and am not using the firewall.
So yes, definitely activate Software flow offloading in Network->Firewall if you don't need SQM. That should give you speeds comparable to simply bridging the networks.
Open the most recent stock firmware for your device with a text editor. That's where those special ids, the version and the partitions come from. Some are right at the beginning of the first partition and some you have to search for.
Also since the P9 is a copy of the M4R with an addon, I would suggest creating a .dtsi with the common infos and then include that in the .dts of the P9 and the .dts of the M4R.
Because if you're going to create a PR then you might as well add the M4R too while you're at it anyway.
The OpenWrt device page for both should be the same too. No sense in creating two separate pages.
I've pushed the config for PLC as an update to the GitHub project above. At this moment I am likely to abandon this work, and leave it up on GitHub for others to continue. It seems that without hardware NAT support and DSA being enabled I cannot get the required performance for my WAN speed.
Using ethernet, the board is maxed out at 281mbps with CPU saturation due to high IRQ load. And with WIFI although the Atheros reached 866mbps at the physical layer, the throughput from WIFI to LAN using IPERF3 maxed at 70mbps between a wired laptop, and a wireless laptop client.
I don't think the SoC is powerful enough without the full HW acceleration turned on. If I get some spare time, I'll take a look at DSA and enabling it, which seems on other boards to provide about 50% improvement. Unless I can get this to run 350mbps like the stock, then its a non starter for me.