I previously experienced this problem on a Xiaomi Redmi Note 2. I managed to enter the IMEI number from the box manually using an app called Chamelephon. It requires root and is available on Play store by the looks of it (which is surprising as it can alter IMEI numbers).