Read and save IMEI from serial port

 for (i=0;i < 64;i++){
  if (Serial2.available()) {

I can almost guarantee that every time you call Serial2.available, it will return zero.