Xiaomi Approximation Sensor: What It Is and How to Set Up

The modern smartphone is a complex mechanism in which every element, even the most inconspicuous, plays a critical role. One of these components is the proximity sensor, which often stays in the shadow of usersโ€™ attention until it starts to fail. Owners of Xiaomi, Redmi and POCO devices often face a situation where the screen goes out during a conversation or, conversely, refuses to respond to the hand being brought to the top of the case.

To understand why an infrared sensor is behaving incorrectly, we need to understand the physics of the process and the software algorithms that control this node. It is this module that is responsible for saving battery power and preventing accidental cheekstrokes during a call. In this article, we will look in detail at the device, methods for its accurate calibration and ways to eliminate common software errors.

Principle of operation and location of the sensor

The sensor is based on infrared light that is invisible to the human eye. At the top of the smartphone body, usually next to the speaker, there's a emitter and a receiver. When you bring the phone to your ear, the IR ray bounces off the surface of your cheek and returns to the receiver, sending the system a signal to lock the display.

Xiaomiโ€™s current models often use a virtual sensor that emulates the operation of a physical sensor using artificial intelligence algorithms.This allows manufacturers to make screens without cutouts and bezels, but sometimes leads to false positives in the pocket or when using protective glasses.

โš ๏ธ Warning: If you use a wide black-framed protective glass, it can block the sensor's area of operation, causing the screen to lock permanently.

The accuracy depends on the cleanliness of the surface and the absence of foreign objects. Even a thin layer of fat or dust can distort the reflection of the signal, making the system think that the phone is near the ear. Regularly rubbing the top of the case with a soft cloth helps to avoid many false positives.

๐Ÿ’ก

Use microfiber to clean the speaker area โ€“ the fuzzy tissues can leave microscopic fibers interfering with the sensor.

Diagnosis and check of health

Before you start to complex manipulations with the engineering menu, it is worth doing a basic diagnostics. In the shell of MIUI and the new HyperOS, a powerful testing tool is built in, allowing you to check the health of all hardware modules without installing third-party software.

To start the diagnosis, open the Phone app and enter the universal code ##64663##. In the CIT menu that opens, select โ€œProximity sensor.โ€ You will be asked to close the top of the smartphone with your hand โ€“ if the counter increases and the screen goes out, then the part is working.

  • ๐Ÿ” Check if the indicator responds to hand movement at a distance 2-3 centimeter.
  • ๐Ÿ“ฑ Make sure that no background processes are running during the test that block the sensor.
  • ๐Ÿงน Clean the speaker area of contamination before re-checking.
  • ๐Ÿ”„ Restart the device if the test freezes in the initialization phase.

If the sensor is unstable in a standard test, the problem may be a software conflict, and some third-party applications for managing calls or recording conversations can intercept the sensor without giving it back to the system.

๐Ÿ“Š How your approach sensor behaves?
Works perfectly / Gasnet in your pocket / Does not go out when you call / Gasnet and does not turn on

Calibration through the Engineering Menu

The most effective way to fix a software failure is to perform a forced calibration, which resets the current sensitivity values and forces the system to relearn how to determine the distance to the object, without the need for superuser rights.

Go to the diagnostic menu with code ##64663## and select "Proximity sensor." The "Calibration" button will appear on the screen. Place your phone on a flat horizontal surface so that nothing covers the top of the case. Press the calibration button and wait for the process to complete, which usually takes a few seconds.

Once you're successful, you'll see a message called "Pass" or "Calibration Success." If the process fails, repeat the procedure 2-3 times. In rare cases, you'll need to reset your system completely to apply new calibration settings.

โ˜‘๏ธ Calibration algorithm

Done: 0 / 1

Setting Sensitivity in Hidden Menus

Some versions of Xiaomi firmware offer advanced settings for trigger thresholds, especially for users who wear a phone in tight cases or use custom protective glass.

To access advanced settings, you sometimes need to activate the developer mode. Go to Settings โ†’ About phone and 7 times click on the build number. Then, in the โ€œAdditionalโ€ menu, find the โ€œDraw-up Sensorโ€ item. Here you can change the sensitivity factor.

ParameterDefault valueRecommended valueImpact
Threshold Low200150-250Removal response threshold
Threshold High500450-550Approaching trigger threshold
Delay Time0 ms100-200 msDelayed reaction (anti-drop)
SensitivityMediumHigh/LowGeneral sensitivity of the module

Changing these parameters requires caution. Too low values can cause the screen to not go out even when pressed tightly against the ear. Too high values will cause permanent false locks in the pocket.

Risks of changing system parameters
Changing the thresholds in hidden menus can lead to unstable system operation, and if you are not sure about your actions, it is better to use standard calibration.

Virtual sensor problems and solutions

Many modern Xiaomi models, such as the Mi 11 series or Redmi Note 10, lack a physical IR sensor, instead using an algorithm that analyzes data from an accelerometer, gyroscope and camera, which creates unique problems that can not be solved by simply cleaning glass.

The main difficulty of the virtual sensor is that it can respond to glare, sudden changes in lighting, or even certain colors of clothing lying next to the phone. If your screen goes out for no reason, try turning off the Smart Lock or Pocket Mode feature in the lock settings.

  • ๐Ÿšซ Turn off โ€œMode in your pocketโ€ in the lock screen settings.
  • ๐ŸŒ‘ Check if the camera is closed with a cutout case.
  • ๐Ÿ“‰ Reduce the brightness of the autobrightness if it is not working properly.
  • ๐Ÿ›  Update the firmware to the latest available version.

In some cases, patches or modified cores that change the algorithms of the virtual sensor can help, but this requires unlocking the bootloader, which can invalidate the warranty.

๐Ÿ’ก

A virtual sensor depends on the quality of the MIUI algorithms, so updating the system is often the only way to fix it.

Third-party management applications

If regular funds do not help, specialized applications from the Google Play store come to the rescue. Programs like โ€œProximity Sensor Reset & Fixโ€ or โ€œSensor Testโ€ allow you to conduct a deep diagnosis and forcibly restart the sensor driver.

These utilities often feature Force Calibration, which ignores system limitations, and can be especially useful on older devices where drivers may have been damaged after an Android update.

โš ๏ธ Note: Only download sensor applications from trusted developers. Deep access programs can collect data about your actions.

Sometimes installing such an application creates a conflict with the system service com.android.phone. If after installing third-party software problems worsen, delete the application and reset the network settings.

Popular applications for testing
Sensor Box for Android, Phone Tester, AIDA64, these programs provide detailed information about the current readings of all sensors in real time.

Frequently Asked Questions (FAQ)

Why does the proximity sensor not work after the screen is replaced?
When replacing a display module, the sensor plume or the sensor itself is often damaged if it is embedded in the frame of a new low-quality screen, and the wizard may have forgotten to connect the connector or install a protective film on the inside of the glass, blocking the emitter.
Can a magnet in a case affect the sensor?
Yes, powerful neodymium magnets in bookcases can interfere with the magnetometer, which indirectly affects the algorithms for determining the position of the phone, although they do not directly affect the IR sensor.
How to turn off the proximity sensor completely?
You can't use MIUI to turn off the sensor, you can only use third-party fixing apps or modified firmware that ignore the readings, but this will cause the screen to burn constantly in the ear during the bell.
Does the sensor have an effect on the blue protective glass?
But cheap glass with thick black wire or poor transparency in the speaker area can block infrared radiation, making the sensor blind.