Huawei modems and routers running firmware based on Algorithm V4 may require a DATALOCK code when attempting to upgrade or downgrade their firmware. Unlike older firmware versions, which may accept a firmware code.

Huawei Modems
Connect your Huawei modem directly to a USB port on your computer. Open Device Manager in Windows and expand Ports (COM & LPT). Check whether the modem's PC UI COM port is available.

If the COM ports are missing or the device appears as an unknown device with a yellow warning icon, install the latest Huawei mobile partner on your computer.
Huawei Routers
Connect the router to your computer using its USB cable, check device COM port is available in computer management.
If the Huawei COM ports are not detected, install FC Serial drivers, open the router's web interface at: http://192.168.8.1/
Run Switch Mode to switch device COM port.
How to bypass datalock code
Run DC-Unlocker as administrator and click the magnifying glass icon. Once the device is detected, it will display complete details about your device.

At the end of the results paste the following command:
AT^GODLOADPress enter from the keyboard to submit the command.
Now, the device will start blinking, means it is now in download mode.