Bafang All BBS/BBSHD — Error Code 21

Reviewed by certified eBike technicians · Last updated July 30, 2026

Quick Answer

21 on Bafang = Speed sensor error — magnet misaligned or sensor faulty
Severity: Check soon — speed may be affected · Limited riding OK, diagnose soon

Error 21 on your Bafang indicates: Speed sensor error — magnet misaligned or sensor faulty.
Check soon — speed may be affected — Speed sensor error — magnet misaligned or sensor faulty

Symptoms

Common Causes

Fix Steps

Step 1: 1. Check the speed sensor magnet on the rear wheel spoke — it should pass within 5mm of the sensor on the chainstay
Step 2: 2. Realign the magnet so it passes directly in front of the sensor
Step 3: 3. Check the sensor wire for cuts or pinch damage
Step 4: 4. Clean the sensor face with a dry cloth
Step 5: 5. If problem persists, replace the speed sensor (~$10 on Amazon)

Related Error Codes

Error 30

Communication failure between display and motor controller

Error 08

Hall sensor error inside the motor

Error 30H

Controller overheat protection activated

Error 07

Over current protection — motor current exceeded safe threshold, controller triggered protection circuit

Always disconnect the battery before inspecting wiring.

Other E-Bike Brands

Aventon (5) Bosch (11) Brose (3) Engwe (1) Lectric (5) Rad Power Bikes (3) Ride1Up (5) Shimano (4)