Arduino+Shield Sagem Hilo

Hi

sorry for my bad english.

I try to read some response from Shield Sagem Hilo. I try to use

time=millis();
   while(millis()<time+timeouts){
     if(Serial.available()>0){
       datarec=datarec.concat(Serial.read());  
       if(datarec.endsWith('\n')){

         break;

       }
   }
   }

But nothing. I try to use other function ( read_line() )that i find here: Electronics project notes/Hilo Arduino GPRS shield notes - Helpful

Can someone help me ?

Thanks in advance

Cesco

When comparing times never use addition as it is not overflow proof, use subtraction instead.

time=millis();

while(millis() - time < timeouts )
{
  if(Serial.available()>0)
  {
    datarec.concat(Serial.read());  
    if (datarec.endsWith('\n')) break;
   }
}

give it a try , take care that timeouits is large enough (and if the type unsigned long!)