This guide explains how to get the DATALOCK code on Huawei V4 and V5 modems using AT commands. The procedures include reading the device's NV data, checking the Datalock status, and sending the appropriate command through a compatible terminal.
Read the Datalock Information Using DC-Unlocker
Before starting, connect your Huawei device to the computer and make sure it is detected correctly by DC-Unlocker.
Step 1: Detect the Huawei device
- Connect the Huawei device to your computer.
- Click on search button
- Go to the end of the result.
Step 2: Read the NV Data
Send the following AT command: AT^NVRDEX=50502,0,128 and press enter from the keyboard to read the NV record associated with DATALOCK information.

If the command is accepted, the device returns a hexadecimal data record. The returned data is specific to the device. Copy the whole details from DC Unlocker and paste it in a notepad.
Important Notes
You may encounter an error when executing the command. If this happens, you will need to downgrade the modem's firmware to an earlier version i.e. 21.110.xxx.xxx.xxx
Depending on the device model and firmware, a compatible firmware version may be required.
Step 3: Restart the device
To restart the device, send:
AT^RESET
The Datalock code calculation
Our Huawei V4 Unlock Code Calculator supports the calculation of OEM/DATALOCK codes for compatible Huawei modems, routers, and mobile hotspots. Read more
How to Check the Datalock Status
Send the following command in the AT terminal:
AT^DATALOCK?
Response formats vary by model and firmware:
^DATALOCK:1— DATALOCK enabled.^DATALOCK:0— DATALOCK disabled.-
An ERROR response— The command may be unsupported, the interface may be incorrect, or access may be restricted.
How to Enter a Datalock Code
If you already have a valid Datalock code for your device, use the following command format:
AT^DATALOCK="datalock code"
Replace datalock code with the actual code for your device.
Keep the quotation marks in the command and use the correct code format
supported by the device.