GSM MODULE 800L NOT RESPONDING PROPERLY

GSM module is respond only when serial monitor open.

if module received the text sms (“hmr”),gsm module will send the meter value to registered mobile.
here is my code:-

#include <stdlib.h >
#include <SoftwareSerial.h>
#include <EEPROM.h>
#include <Wire.h> 
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // 
SoftwareSerial GPRS(10, 11);
String textMessage;
String val;
int EngineLed = 13; 
const uint8_t ledPin1        = 7;
const uint8_t EngineCommand = 8;   


char outstr[15];
int addr_secnd=0;
int addr_minute=1;
int addr_hrs1=2;
int addr_hrs2=3;
int addr_hrs3=4;
int addr_hrs4=5;
int addr_hrs5=6;
int addr_hrs6=7;

int secnd = 0;
int minute = 0;
int hrs1 = 0;
int hrs2 = 0;
int hrs3 = 0;
int hrs4 = 0;
int hrs5 = 0;
int hrs6 = 0;

int value_secnd;
int value_minute;
int value_hrs1;
int value_hrs2;
int value_hrs3;
int value_hrs4;
int value_hrs5;
int value_hrs6;


void setup() {
  pinMode(EngineLed, OUTPUT);  
  pinMode(EngineCommand, INPUT_PULLUP);
  pinMode ( ledPin1, OUTPUT );
  GPRS.begin(9600);
  Serial.begin(9600);
  GPRS.println("AT+CMGF=1");
  delay(500);
  GPRS.print("AT+CNMI=1,2,0,0,0\r");
  delay(100);
 while(GPRS.available()){ 
    Serial.write(GPRS.read());
  
  }
  lcd.begin(16,2);
  lcd.backlight();
  char outstr[15];
  value_secnd = EEPROM.read(addr_secnd);
  value_minute = EEPROM.read(addr_minute);
  value_hrs1 = EEPROM.read(addr_hrs1);
  value_hrs2 = EEPROM.read(addr_hrs2);
  value_hrs3 = EEPROM.read(addr_hrs3);
  value_hrs4 = EEPROM.read(addr_hrs4);
  value_hrs5 = EEPROM.read(addr_hrs5);
  value_hrs6 = EEPROM.read(addr_hrs6);
 Serial.println("================================");
 Serial.print("secnd:");
 Serial.println(value_secnd);
 Serial.print("minute:");
 Serial.println(value_minute);
 Serial.print("hrs1:");
 Serial.println(value_hrs1); 
 Serial.print("hrs2:");
 Serial.println(value_hrs2);
 Serial.print("hrs3:");
 Serial.println(value_hrs3);
 Serial.print("hrs4:");
 Serial.println(value_hrs4);
 Serial.print("hrs5:");
 Serial.println(value_hrs5);
 Serial.print("hrs6:");
 Serial.println(value_hrs6);
 Serial.println("================================");
 
 
 }

void loop() {
 if ( digitalRead(EngineCommand) == LOW)//used a toggle switch for engine command,  switch in low means engine start meter will record the time 
 {
  digitalWrite(ledPin1,HIGH);
  Meter();
 }
else {
  //Serial.println ("engine stop");
  digitalWrite(ledPin1,LOW);
 }
 int x1=EEPROM.read(addr_hrs6);
int x2=EEPROM.read(addr_hrs5);
int x3=EEPROM.read(addr_hrs4);
int x4=EEPROM.read(addr_hrs3);
int x5=EEPROM.read(addr_hrs2);
int x6=EEPROM.read(addr_hrs1);
int x7=EEPROM.read(addr_minute);

String val = String(x1)+String(x2)+String(x3)+String(x4)+String(x5)+String(x6)+String(x7);

float value1 = (val.toFloat())/100;
Serial.println(value1);
char outstr[15];
dtostrf(value1,5, 2, outstr);
Serial.print(outstr);
while (GPRS.available() > 0) {
    textMessage = GPRS.readString();
    delay(1000);
    Serial.println(textMessage);
    delay(1000);
    if(textMessage.indexOf("hmr")>=0){
    //String message = ("outstr");
    
    Serial.println("outstr");  
     GPRS.println("AT+CMGF=1\r");
      delay(1000);
      GPRS.print("AT+CMGS=\"+917987553768\"\r"); 
      delay(500);
      GPRS.println("outstr");
     delay(1000);
      GPRS.println((char)26);
      delay(500);
      Serial.println("HMR REQUEST");
     delay(500);
    }
    
    delay(100);
  }
}
  
 void Meter(){
  value_secnd = value_secnd+1;
  EEPROM.update(addr_secnd,value_secnd);

if(value_secnd==60){
  secnd=0;
  EEPROM.update(addr_secnd,secnd);
  value_minute = value_minute+1;
  EEPROM.update(addr_minute,value_minute);
}
value_secnd = EEPROM.read(addr_secnd);
Serial.print("\t");
Serial.print("secnd:");
 Serial.println(value_secnd);
Serial.print("\t");

if(value_minute==60){
  minute = 0;
  EEPROM.update(addr_minute,minute);
  value_hrs1 = value_hrs1 + 1;
  EEPROM.update(addr_hrs1,value_hrs1);
}
value_minute = EEPROM.read(addr_minute);
Serial.print("minute:");
 Serial.println(value_minute);
Serial.print("\t");

if(value_hrs1==10){
  hrs1 = 0;
  EEPROM.update(addr_hrs1, hrs1);
  value_hrs2 = value_hrs2 + 1;
  EEPROM.update(addr_hrs2,value_hrs2);
}
value_hrs1 = EEPROM.read(addr_hrs1);
Serial.print("hrs (1):");
 Serial.println(value_hrs1);
Serial.print("\t");

if(value_hrs2==10){
  hrs2 = 0;
  EEPROM.update(addr_hrs2, hrs2);
  value_hrs3 = value_hrs3 + 1;
  EEPROM.update(addr_hrs3,value_hrs3);
}
value_hrs2 = EEPROM.read(addr_hrs2);
Serial.print("hrs (2):");
 Serial.println(value_hrs2);
Serial.print("\t");


if(value_hrs3==10){
  hrs3 = 0;
  EEPROM.update(addr_hrs3, hrs3);
  value_hrs4 = value_hrs4 + 1;
  EEPROM.update(addr_hrs4,value_hrs4);
}
value_hrs3 = EEPROM.read(addr_hrs3);
Serial.print("hrs (3):");
 Serial.println(value_hrs3);
Serial.print("\t");

if(value_hrs4==10){
  hrs4 = 0;
  EEPROM.update(addr_hrs4, hrs4);
  value_hrs5 = value_hrs5 + 1;
  EEPROM.update(addr_hrs5,value_hrs5);
}
value_hrs4 = EEPROM.read(addr_hrs4);
Serial.print("hrs (4):");
 Serial.println(value_hrs4);
Serial.print("\t");

if(value_hrs5==10){
  hrs5 = 0;
  EEPROM.update(addr_hrs5, hrs5);
  value_hrs6 = value_hrs6 + 1;
  EEPROM.update(addr_hrs6,value_hrs6);
}
value_hrs5 = EEPROM.read(addr_hrs5);
Serial.print("hrs (5):");
 Serial.println(value_hrs5);
Serial.print("\t");

if(value_hrs6==10){
  hrs6 = 0;
  EEPROM.update(addr_hrs6, hrs6);
  
}
value_hrs6 = EEPROM.read(addr_hrs6);
Serial.print("hrs(6):");
Serial.println(value_hrs6);
Serial.print("\t");

/*int x1=EEPROM.read(addr_hrs6);
int x2=EEPROM.read(addr_hrs5);
int x3=EEPROM.read(addr_hrs4);
int x4=EEPROM.read(addr_hrs3);
int x5=EEPROM.read(addr_hrs2);
int x6=EEPROM.read(addr_hrs1);
int x7=EEPROM.read(addr_minute);

String val = String(x1)+String(x2)+String(x3)+String(x4)+String(x5)+String(x6)+String(x7);

float value1 = (val.toFloat())/100;
Serial.println(value1);
char outstr[15];
dtostrf(value1,5, 2, outstr);
Serial.print(outstr);
Serial.print("\t");
/*if (GPRS.available() > 0) {
    delay(1000);
    textMessage = GPRS.readString();
    Serial.print(textMessage);
    if(textMessage.indexOf("hmr")>=0){
    //String message = (outstr);
    Serial.println(outstr);  
     GPRS.println("AT+CMGF=1");
      delay(1000);
      GPRS.println("AT+CMGS=\"+917987553768\""); 
      delay(500);
      GPRS.println(outstr);
     delay(1000);
      GPRS.println((char)26);
      delay(500);
      Serial.println("HMR REQUEST");
     delay(500);
    }
    
    delay(100);
  }*/
Serial.print("HM:");
Serial.print(value_hrs6);
Serial.print(value_hrs5);
Serial.print(value_hrs4);
Serial.print(value_hrs3);
Serial.print(value_hrs2);
Serial.print(value_hrs1);
Serial.print(",");
Serial.print(value_minute);
Serial.print(":");
Serial.print(value_secnd);

lcd.clear();
lcd.setCursor(0,0);
lcd.print(value_hrs6);
lcd.print(value_hrs5);
lcd.print(value_hrs4);
lcd.print(value_hrs3);
lcd.print(value_hrs2);
lcd.print(value_hrs1);
//Serial.print(",");
lcd.setCursor(0,1);
lcd.print(value_minute);
lcd.print(":");
lcd.print(value_secnd);
digitalWrite(EngineLed,HIGH);
delay(1000);
digitalWrite(EngineLed,LOW);

    }

problem is that without serial monitor dispaly gsm module not responding.

Could you please help me to solve out this problem.

 int x1=EEPROM.read(addr_hrs6);
int x2=EEPROM.read(addr_hrs5);
int x3=EEPROM.read(addr_hrs4);
int x4=EEPROM.read(addr_hrs3);
int x5=EEPROM.read(addr_hrs2);
int x6=EEPROM.read(addr_hrs1);
int x7=EEPROM.read(addr_minute);

EEPROM.read() does not return an int.

String val = String(x1)+String(x2)+String(x3)+String(x4)+String(x5)+String(x6)+String(x7);

I can't imagine what this is doing, that couldn't be done without pissing away resources on the String class.

float value1 = (val.toFloat())/100;

I can't imagine that val is a string representation of a float.

problem is that without serial monitor dispaly gsm module not responding.

You'll need some other method, like using the LCD, to display data about what is happening.

PaulS: int x1=EEPROM.read(addr_hrs6); int x2=EEPROM.read(addr_hrs5); int x3=EEPROM.read(addr_hrs4); int x4=EEPROM.read(addr_hrs3); int x5=EEPROM.read(addr_hrs2); int x6=EEPROM.read(addr_hrs1); int x7=EEPROM.read(addr_minute);

EEPROM.read() does not return an int.

sir first of all i have to clear that i have no knowledge about program but now i am trying to learn through google and trough this forum.

i had reffer different program from google and choose which is useful for me and compile. Finaly i made one program and its working.But i know there may be a lot mistakes that will be solved by the help of forum.

String val = String(x1)+String(x2)+String(x3)+String(x4)+String(x5)+String(x6)+String(x7);

i need to send meter reading through the SMS.Came to know that sms will send only the"string type text" so i converted in to string one single line.look like as follows

00001321

but i don't want to send all digits ." hrs.minute";(example:- 01.15) this format i want to send the sms so i convert the string in to float

float value1 = (val.toFloat())/100;

...

You'll need some other method, like using the LCD, to display data about what is happening.

please help to make full proof program