Boost your broadband access by combining xDSL/HFC & 4G/5G
Seamlessly transition between 4G/5G and Wi-Fi for a better user experience
Empowering remote workers with improved connectivity, now available!
An open source and standardised TCP extension
Enhanced 5G & WiFi seamless mobile connectivity
A step-by-step guide on how to Enable MPTCP and 0-RTT on the Xiaomi Pocophone F1…
To get the same environment as the one used to do the experiments presented in our blog Demonstrating Wi-Fi Cellular Convergence, you will need to set up a smartphone with MultiPath TCP (MPTCP) and 0-RTT Converter Protocol support.
First, we need to select a smartphone. Most smartphones today do not support MPTCP out-of-the-box. Some models support it — some Samsung, LG, Huawei, etc. — but very likely, its usage is restricted to specific applications. Unless you have “root permissions”, you will not be able to use MPTCP with your apps.
For this experiment, it is necessary to modify an existing phone to add MPTCP support in the kernel. We picked the Xiaomi Pocophone F1 because it is known to be developer friendly, it has a recent enough kernel (4.9) and it is available on the market.
Here are the instructions to enable MPTCP support on this phone:
On this PocoF1 phone, you will need to:
For the 3 first steps, the easiest way is to follow this guide: https://wiki.lineageos.org/devices/beryllium/install
Instead of installing the latest official Lineage OS version, install the one we built with MPTCP support: https://github.com/Tessares/android_kernel_xiaomi_sdm845/releases/tag/v4.9.169-mptcp
For steps 4 and 5, you can “adb sideload” the downloaded file, similar to what was done to install the ROM at the 3rd step. The links are provided here above.
Note that if you wish to build the whole image yourself, please follow this other guide: https://wiki.lineageos.org/devices/beryllium/build
You will need to follow the instructions to build Lineage OS 16 and replace the official kernel repo located in kernel/xiaomi/sdm845 folder by this one: https://github.com/Tessares/android_kernel_xiaomi_sdm845/tree/lineage-16.0-mptcp
First set SELinux to Permissive mode to be able to create any subflows without issues. You can do it using an app like SELinuxModeChanger.
To do the following modifications, you can:
You will likely need to set up routing rules to properly use each path as expected. For that, you can execute with the “root” user the script “ip_rule.sh” from https://github.com/Tessares/android_kernel_xiaomi_sdm845/releases/tag/v4.9.169-mptcp. You might have to re-launch this script each time a modification in the network is done.
Also you might want to configure some sysctl, e.g.
On the smartphone, we need to install a proxy to intercept the TCP connections and create new MPTCP connections to a HAG proxy server.
For that, we need to install a modified version of ShadowSocks for Android. We can find it here: https://github.com/Tessares/shadowsocks-android/releases/tag/v4.7.4-converter
For the PocoF1, you can download the arm64 version. Once downloaded on the smartphone, click on it to install it or use “adb install -r <apk>“ from your computer.
If you wish to build this app yourself, you can follow the instructions from the README file or import the repo in Android Studio.
Start by creating a new profile (the “+” at the top right), choose “Manual settings” and set:
In the settings of the application (“hamburger” button at the top left, “Settings”), make sure:
You can now go back to the main window:
After a reboot, only the last step is needed except if you have enabled the “Auto Connect” option in the settings.
That’s it, you have enabled MPTCP and 0-RTT on the Xiaomi Pocophone F1 and are ready to try it out!
By Matthieu Baerts