My smartphone is a Xiaomi Redmi Note 3 Pro, running the “Global” MIUI ROM. Some days ago I brought a SIM card from a new italian operator, ho-mobile, which allows to use the tethering feature of the phone to connect external devices to the Internet.
I faced some problems before being able to use that feature… this blog post is to describe how I solved them.
Tethering was not working due to the incorrect configuration of a property of the Android operating system, called
tether_dun_required
As explained in Android source code, this property tells the O.S. if it’s necessary to use a DUN (dial-up network) APN for the tethering funcion. Actually, as well explained on Taming the Droid:
This refers to an outdated method for using your phone to emulate a dial-up modem and is not the way that modern smartphones do tethering anymore. There should be no need to use this value.
To set the property to 0 (= not required), you have to send a command in the smartphone’s shell.
Requirements
You need to:
[checklist]
- enable the Developer Options on your smartphone (here’s a guide)
- install on your PC the Minimal ADB and Fastboot suite (available here)
- register a MI account (https://account.xiaomi.com)
[/checklist]
Procedure
In the Developer Options menu, enable the following 3 items:
- USB debugging
- Install via USB
- USB debugging (Security settings)
You’ll be prompted, if not already done, to login with your MI account.
It may happen that, when you enable an item, you get the following error:
The error means that your phone cannot contact Xiaomi servers, probably because of the Great Firewall of China.
You can solve the problem thanks to an app that establishes a VPN with a chinese server, that is behind the firewall. Install, from Play Store, the Flit VPN app and run it.
Choose Start without registration, then click on Connection Settings and choose one of the Jangsu server, the one with best performances:
Click on Connect and wait until the connection is established:
Now you should be able to enable all the debugging items without any problems. When enabled, you can disconnect the VPN and uninstall the app.
Connect your smartphone to the computer via USB and run Minimal ADB and Fastboot.
Type the command adb shell to open a console connection with the phone.
Using the settings get global tether_dun_required command you can read the current value of the parameter. If you read null or 1 the setting is wrong:
Use the settings put global tether_dun_required 0 command to set the value to zero. You can test if the command was successful re-entering the get command:
NB: if you see a permission denied error, it means that not all the debugging features have been correctly enabled:
Now you can use the tethering of your phone, happy surfing!