How to Fix Xiaomi M365 / Pro Error 21

Tom Kent
Lead PEV Engineer & Founder7+ years DIY PEV repair & engineering
Last updated: 2026-07-10

Danger: High Voltage & Safety

Short-circuiting lithium cells can trigger thermal runaway and battery fires. Always insulate exposed solder joints immediately with Kapton tape or heat-shrink tubing, and keep a fire extinguisher nearby.

Repair Alert: Lithium-ion battery packs contain large amounts of stored energy. Work slowly, do not use metal tools that could short across cells, and wear safety glasses.

Required Parts & Tools

Have these ready before starting the repair. Clicking links supports our free guides.

Replacement Parts Needed

  • Xiaomi M365 Replacement Smart BMS Board$12 - $20

    The controller card that monitors the health of the 36V Lithium-ion cells. Make sure to buy the correct version for your model.

  • High-Temperature Kapton Polyimide Tape$5 - $8

    Heat-resistant tape to re-insulate exposed electrical connections and secure internal wiring.

Tools Required

  • Hex Screwdriver Set (2mm, 2.5mm, 3mm)$8 - $15

    Used to remove the plastic trim pieces and metal bottom plate screws underneath the deck.

  • Soldering Iron Kit (60W with Temperature Control)$15 - $30

    Required to repair fractured nickel strip welds or loose wire terminals on the battery BMS board.

  • Digital Multimeter$10 - $20

    Allows you to check individual battery cell series voltages and locate the exact source of communication drops.

* Affiliate Link Disclosure: As an Amazon and AliExpress Associate, diypev.com earns a small commission from qualifying purchases made through our referral links, at no extra cost to you. This enables us to purchase test parts and create detailed, expert-verified troubleshooting repair guides for the community. Thank you for your support!

DIYStep-by-Step Instructions

  1. Step 1 of 5

    Examine the External Dashboard Code

    When Error 21 occurs, the dashboard displays "21" and the scooter will refuse to accelerate. This code indicates that the electronic control unit (ESC) is unable to read telemetry data from the battery management system (BMS) over the internal data wire.

    Schematic FIG. 1DIYPEV Technical Lab
    Xiaomi electric scooter digital speed indicator screen flashing Error Code 21Reference Blueprint Schematic
    Alt description tag verifiedScale: NTS (Not To Scale)
  2. Step 2 of 5

    Access the Battery Compartment

    Lay the scooter on its side on a soft surface. Use a T20 Torx or hex driver to remove the 17 security screws holding the bottom plastic cover plate in place. Once removed, inspect the transparent blue shrink wrapping of the battery for signs of liquid ingress, physical damage, or burn marks.

    Schematic FIG. 2DIYPEV Technical Lab
    Removing bottom cover plate screws to expose the battery compartmentReference Blueprint Schematic
    Alt description tag verifiedScale: NTS (Not To Scale)
  3. Step 3 of 5

    Check the BMS Status Indicator Light

    Look at the small LED indicator window on the side of the battery pack. A healthy battery should flash a slow, steady blue light. If it flashes red, or if there is no light flashing at all, the BMS is locked out or has lost logic power. A quick red flash indicates a fault, while zero light indicates a dead BMS.

    Schematic FIG. 3DIYPEV Technical Lab
    Close up of the blue indicator light blinking on the side of a Xiaomi battery packReference Blueprint Schematic
    Alt description tag verifiedScale: NTS (Not To Scale)
  4. Step 4 of 5

    Inspect the 4-Pin Battery-to-Controller Plug

    Locate the small white or black 4-pin data plug connecting the battery BMS board to the main ESC. Unplug it and verify that the red, black, yellow, and green wires are firmly crimped into the connector pins. Use a multimeter to verify that the RX and TX pins read around 3.3V when the power is turned on.

    Schematic FIG. 4DIYPEV Technical Lab
    Inspecting data wires connecting the battery pack BMS to the controller cardReference Blueprint Schematic
    Alt description tag verifiedScale: NTS (Not To Scale)
  5. Step 5 of 5

    Solder Loose battery spot-welds or connectors

    On many older Xiaomi scooters, vibrations cause the spot-welded nickel strips connecting the cell groups to snap. If you are comfortable soldering, remove the blue heat-shrink wrap, measure voltages of all 10 series groups, and use a high-wattage soldering iron to solder any loose tabs back onto the circuit tracks.

    Schematic FIG. 5DIYPEV Technical Lab
    Soldering a nickel tab back onto the battery cell contacts safelyReference Blueprint Schematic
    Alt description tag verifiedScale: NTS (Not To Scale)

Technical Breakdown: The Xiaomi BMS Data Protocol

The battery management system on Xiaomi electric scooters communicate with the main controller using a custom, packet-based serial protocol over a single-wire data link. It transmits detailed battery metrics, including total pack voltage, temperature sensors (usually two distinct thermistors on opposite ends of the pack), current draw, cell health index, and the individual voltage of all 10 cell groups (10S3P cell configuration).

If the controller does not receive this packet stream for more than three seconds, it displays Error 21. If the connection is restored, the error clears immediately. This diagnostic mechanism helps prevent accidents caused by battery pack failure, such as overheating cells or unbalanced voltage strings under heavy discharge loads.

Signal NameWire ColorLogic VoltagePin Role
GNDBlack0VLogic ground reference between battery and controller.
BMS_TXGreen3.3VData transmission from BMS to controller.
BMS_RXYellow3.3VControl signals and boot queries sent from controller to BMS.
V_BATRed36V - 42VProvides standby logic power to controller and dashboard.

Common Solder Point Faults on the BMS Board

If you peel back the plastic shrink-wrap around the battery, look at the balance wire traces numbered B0, B1, through B10. These connect to each cell group. A hairline fracture in the solder joint at any of these locations will cut off the BMS, triggering a red flashing LED code on the battery and error 21 on the dash. Re-soldering these joints with leaded solder and a flux pen usually restores function permanently, saving you the cost of a new battery pack.

Lithium Battery Repair Caution

Never use a spot welder or soldering iron directly on the battery cells for more than 1-2 seconds. Excess heat will damage the internal safety vent and separator membrane of the 18650 cell, resulting in internal shorts, smoke, or fire.

Frequently Asked Questions

Why does Error 21 occur after riding on rough pavement or gravel?
The Xiaomi M365 battery pack is suspended under the deck, where it absorbs heavy road shocks. Because the nickel battery tabs are thin and stiff, the mechanical vibration causes metal fatigue. This fatigue splits the solder points or breaks the nickel tabs loose from the PCB balance pads, disconnecting cells and triggering a BMS communication fault.
Can I bypass the BMS data cable to clear Error 21?
No. The Xiaomi ESC controller is programmed with a secure protocol. If it does not detect the cryptographic handshakes and battery telemetry data (temperature, cell balance, current draw) from the BMS, it enters a safety lockout mode, disabling the motor power output entirely.
Will a non-OEM battery cause Error 21?
Yes. If you install a generic aftermarket battery that does not feature the specific Xiaomi 4-wire communication BMS interface, the scooter will display Error 21 because the ESC cannot find the BMS communication chip. You must use a compatible smart BMS emulator or flash custom firmware (CFW) that disables the BMS check.

Related & Recommended Repair Manuals