Can't connect to WiFi on Xiaomi Mi5S

How to fix not working Wi-Fi on Xiaomi Mi 5S

Recently we’ve been reported that some users have issues with not working WiFi on Xiaomi Mi5S. This issue may appear after you’ve flashed Custom ROM on your phone for the first time. Here’s the solution that we’ve recently tested. Hope it will help you to restore WiFi connection on your device as well!

[Solution] Can’t connect to WiFi on Xiaomi Mi5S

For this method you’ll require to have superuser permission enabled on your phone. Will also work on Xiaomi Mi5 with Custom ROM.

The issue is result of a broken MAC-address, which shows in red color in engineering menu.

  1. Install ADB driver on your PC.
  2. Flash your MIUI smartphone.
  3. Enable developer options.
  4. Then go to “Developer options” and enable “USB-debugging”.
  5. Go to the folder with ADB files and press “Shift” + Right Mouse button at empty space, then select “Open command window here”.
  6. Type the following commands in terminal window:
    adb devices
    adb shell
    cd /persist/
    mv wlan_bt wlan_bt_bak
    mv wlan_mac.bin wlan_mac.bak
  7. After this make the factory reset of your phone and use clean MIUI firmware.
  8. WiFi connection should work now.

Original source:

Second method:

If the method above didn’t worked for you, try the solution below and then repeat the above steps. This will help to restore the modem after flashing.

  • Must have unlocked bootloader.
  • Remove SIM-card before following this method.

What’s required:

  1. Download and install ADB drivers.
  2. Copy NON-HLOS.bin file from the currently installed ROM (you can find it here /firmware-update/NON-HLOS.bin).
  3. Backup modemst1, modemst2, fsg partitions (root is required).
  4. Open command window from the folder with ADB files and type the following commands (backup files will be created in phone memory):
    adb shell 
    dd if=/dev/block/sde28 of=/sdcard/modemst1 
    dd if=/dev/block/sdf3 of=/sdcard/modemst2 
    dd if=/dev/block/sdf5 of=/sdcard/fsg
  5. Installed SuperSU.

Now let’s start with the tutorial:

  1. Connect your phone to PC.
  2. Flash NON-HLOS.bin file. Copy “NON-HLOS.bin” to the folder with ADB files, open the command window and use the following commands:
    fastboot devices
    fastboot.exe erase modem
    fastboot.exe flash modem NON-HLOS.bin
    fastboot.exe reboot
  3. Your phone will reboot. Now wipe the required partitions. Use the following commands:
    adb shell
    dd if=/dev/zero of=/dev/block/sde28
    dd if=/dev/zero of=/dev/block/sdf3
  4. Your phone will reboots.
  5. Modem should be restored now. To fix not working Wi-Fi you can try to repeat the steps above.