If the factory code gives you an error, try entering the following code *#7370#
followed by 12345 as the default security code. If you still encounter errors, you might need to visit Nokia Store because you can't diagnose it by yourself and the phone needs to be connected to a hardware box found in the Nokia Store.