Skip to content

Instantly share code, notes, and snippets.

@Kyuunex
Last active April 9, 2025 12:58
Show Gist options
  • Save Kyuunex/b6eb17969ff9a3a36aec3cafc432bad4 to your computer and use it in GitHub Desktop.
Save Kyuunex/b6eb17969ff9a3a36aec3cafc432bad4 to your computer and use it in GitHub Desktop.
Fixing WWAN on TP-Link MR6400 V5 under OpenWrt

If you have installed OpenWrt on your TP-Link MR6400 V5 WWAN LTE router, you would have noticed that the WWAN functionality does not work out of the box because it is not configured, functionally turning your $80 router into a $10 router.

Here is how to fix it

It is better to make a custom build and flash it, rather than messing around in the web interface and over SSH. This way, this configuration survies a factory reset.

  • Head over to the OpenWrt firmware selector
  • Find the exact router you have
  • Press Customize installed packages and/or first boot script
  • add luci-proto-qmi to Installed Packages
  • and in the next field where the script goes, put the script you see bellow.
#!/bin/sh

uci set network.wwan=interface
uci set network.wwan.proto='qmi'
uci set network.wwan.device='/dev/cdc-wdm0'
uci set network.wwan.auth='none'
uci set network.wwan.pdptype='ipv4'

uci del firewall.cfg03dc81.network
uci add_list firewall.cfg03dc81.network='wan'
uci add_list firewall.cfg03dc81.network='wan6'
uci add_list firewall.cfg03dc81.network='wwan'

exit 0

Then you just request a built, and use that instead.
Additional configuration, like setting the APN may be required in the web ui. I tried to keep this script minimal.


OpenWrt developers should strive to provide the best out of the box experience for their users, instead of defying common sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment