Users of Xiaomi, Redmi and Poco smartphones periodically face the unpleasant situation when the device refuses to connect to home or public Wi-Fi. Instead of the usual connection icon, an alarm notification appears that access to the network is limited, often with an error code of 138. This problem can take you by surprise, especially when you need to urgently check your email or complete an important call via the messenger.
The problem lies in the conflict between the router’s security protocols and the phone’s network module, or in the incorrectly obtained ones. IP-The Android system on the shell MIUI or HyperOS blocks data transmission, believing the connection is unsafe or unstable. Code 138 is not a fatal hardware failure, most often it is a software glitch that can be fixed without visiting a service center.
In this article, we will discuss all effective ways to restore the health of a wireless module. IP, change DNS-servers and what hidden router settings may cause a smartphone to reject. Follow the instructions consistently to return a stable Internet.
The main reasons for the error 138
Before you start taking action, you need to understand the nature of the failure, and most often the error “network access is limited” on Xiaomi occurs because the phone can not get the correct one. IP-address DHCP-This occurs when the address pool on the router is overflowing or there is an address conflict between two devices on the same network.
Another common reason is the incompatibility of encryption standards: If the router is set to work in WPA3 or mixed mode, and the old network module of the smartphone tries to use the WPA2 protocol, the connection will break immediately after the authentication stage, and the problem may lie in the accumulated cache of network settings of the Android operating system itself.
Sometimes the culprit is antivirus software or VPN-Services that have incorrectly shut down and left traffic filters active, and even if the application is closed, its driver can block outgoing connections, which the system interprets as a restriction of access.
- 📡 Conflict IP-addresses in the local network between devices.
- 🔒 Inconsistency of encryption protocols (WPA2/WPA3) router and phone.
- 📱 Failure in the Android network stack after a firmware update.
- 🛡️ Blocking traffic by third-party applications (VPN, firewalls).
Understanding the reason helps you choose the fastest way to solve it, and if the problem is massive and affects all devices in the house, it is likely the router. If only one Xiaomi phone does not see the network, the focus shifts to the settings of the smartphone itself.
Basic reboot and forgetting the network
The simplest and often ignored step is to completely update the status of the network modules, not just turn off the screen, but perform a full reboot of the smartphone, which will clear the RAM and restart all system services, including the Wi-Fi radio module.
In parallel, it is recommended to restart the router itself. disconnect it from power for 10-15 seconds to completely discharge the capacitors. This action resets temporary errors in the ARP table and DHCP-leases that could lock your phone.
Once you turn on your smartphone, you need to "forget" the problem network. Go to your Wi-Fi settings, click on your network name and select "Delete" or "Forget" and this will delete the saved profile with potentially flawed security settings.
⚠️ Note: After the network is deleted, you will need to re-enter the password. Make sure you remember it or it is stored elsewhere so that you do not lose access to the access point permanently.
When you reconnect, the system will ask permission to access geolocation and other devices on the network. For the smart home to work properly and transfer files, these permissions are better coordinated. If error 138 persists, move to a deeper setup.
Static IP and DNS configuration
The most effective method of solving the problem with code 138 is manually entering network parameters. Automatic Address Receiving (DHCP) sometimes fails, giving the phone an address that is already occupied or incorrect for the current router configuration. Switching to static IP solves this problem.
To do this, in the Wi-Fi menu, click on the gear next to your network name or the arrow on the right. Find "IP Settings" (or "IPv4 Settings") and switch from DHCP to Static.
In the field IP-Enter a unique address, for example, if the router gives out addresses 192.168.1.100, try to write 192.168.1.155. The gateway usually matches the router's address (often 192.168.1.1 or 192.168.0.1). DNS.
💡
Use public DNS from Google (8.8.8.8 and 8.8.4.4) or Cloudflare (1.1.1.1), as the provider of the service is the DNS-Servers often run unstable or block some requests.
Change of change DNS-Servers often work wonders, as providers can filter traffic or their servers can be congested. DNS 1 8.8.8.8, in the second DNS 2 8.8.4.4. Save the settings and try to connect.
- 🔢 IP-Address: Select the number at the end of 100 to 200 to avoid conflict.
- 🚪 Gateway: Must match exactly the address of your router.
- 🌐 DNS 1: 8.8.8.8 (Google) or 1.1.1.1 (Cloudflare).
- 🌐 DNS 2: 8.8.4.4 (Google) or 1.0.0.1 (Cloudflare).
If the connection was successful after entering static data, but the Internet did not appear, check if the gateway is correctly indicated. An error in one digit of the gateway address will cause the phone to connect to the router, but will not have access to the global network.
Resetting network settings on Xiaomi
If manual IP settings didn't work, you may have accumulated deep errors in the configuration of the network interfaces, in which case a complete reset of the network settings helps, which will return all network settings to factory values, but will not affect your personal files, photos or contacts.
To reset, go to Settings → Connection and Sharing (or “Advanced Settings”). At the bottom of the screen, find Reset Wi-Fi, mobile networks and Bluetooth. The system will warn you that all saved Wi-Fi passwords and Bluetooth pairs will be deleted.
☑️ Checklist before network reset
Once rebooted, the phone will be like new connections, you'll have to re-enter your home network passwords and re-connect your Mi Band smartwatch or bracelets, but this often eliminates hidden driver conflicts.
⚠️ Note: Resetting network settings will also remove settings APN If the mobile Internet stops working after the reset (4G/5G), You may need to manually restore the parameters. APN your carrier.
This method is especially relevant for users who often switch between different Wi-Fi networks or have used third-party applications to manage Wi-Fi. Cleaning system spreadsheets often returns stability to the module.
Router settings: frequency and channels
The problem may not be in the phone, but in the settings of the access point. Xiaomi smartphones are sometimes sensitive to congestion in the 2.4 GHz band. If there are many neighbor networks around, channels can overlap, causing packet loss and connection error.
Go to the router's web interface (usually at 192.168.1.1). Find the Wireless settings section. Try changing the channel from "Auto" to a fixed one (e.g. 1, 6 or 11 for 2.4 GHz) to eliminate constant channel surges by the router.
Also worth paying attention to is mode of operation: If you have an old router, it can run in 802.11 b/g/n mixed mode. Try forcefully setting 802.11n only or 802.11g only if the phone is old. For modern Xiaomi models, it is better to use the 5 GHz band if the router is dual-band.
An important parameter is channel width. For 2.4 GHz, set a width of 20 MHz. A 40 MHz width in this range often causes more interference than speed gains, leading to connection instability on Android devices.
Table: Options for manual settings
For the convenience of setting up static IP, we will collect the main parameters in a table. These data are standard for most home networks, but may differ depending on the model of your router.
| Parameter | Value (Example 1) | Value (Example 2) | Description |
|---|---|---|---|
| IP-address | 192.168.1.150 | 192.168.0.150 | Unique phone address on the network |
| Gateway (Router) | 192.168.1.1 | 192.168.0.1 | Address of entry to router settings |
| The net mask | 255.255.255.0 | 255.255.255.0 | Determine the size of the local network |
| DNS 1 | 8.8.8.8 | 1.1.1.1 | The main domain name server |
| DNS 2 | 8.8.4.4 | 1.0.0.1 | Domain name backup server |
Use these values as a template if your router uses a non-standard subnet (e.g., a subnet, 10.0.0.x), first-three IP-The address and gateway must match it. IP-Addresses avoid conflicts.
💡
A properly defined static IP-Addressing conflicts that cause error 138 in 80% of cases.
Additional methods and safe regime
If none of the above methods worked, it may be caused by a third-party application: Viruses, battery "optimizers" or traffic-saving applications can block the network connection.
To enter Safe Mode, press the off button on the screen, and then press and hold your finger on the "off" icon on the screen until the prompt to go to Safe Mode appears. Confirm action. The phone will reboot marked "Safe Mode" in the corner.
This mode only runs system applications. Try connecting to Wi-Fi. If error 138 is gone and the Internet is up, then one of the apps you installed is to blame. Start removing newly installed programs, especially those related to VPNs, antiviruses or memory cleanups.
What if even a safe regime doesn’t help?
Also worth checking is the date and time. An incorrect date can cause security certificates to fail, which will cause the router to reject the connection. Set up automatic time synchronization over the network.
As a last resort, if the problem has occurred after the MIUI update, you can try to roll back the firmware or wait for the release of a patch from the manufacturer. Sometimes it helps to turn on the developer mode and change the Wi-Fi frequency band setting to 5 GHz only or 2.4 GHz only to exclude double scanning.