I bought a Gsm module recently(not official arduino shield) and i connect it to Arduino uno. The problem (I guess) is , i can't set delay properly, the terminal send it too fast that i missed it or too slow even i set its baud rate to 4800 (I have tried it with many baud from 4800-to-115200).
I uploaded the code to Git ,with this address.
More details: For example when i enter d
in terminal it act like this message came up : +CMTI: "SM",3
and it want to save it but it miss plus at first of it and it save CMTI: "SM",3
,
After that it perform this : AT+CMGR=3
the terminal show the message in half size : +CMGR: "REC UNREAD","+9*********2","H/E.3D/1","16/02/28,00:27:02+14"
which totally missed body part.
The weird thing is when i put some println on the program it miss more characters , and second weird thing is it missed more character in second run or i push d again.
I have tried to change the delays but no success.How can i fix it ? any help would be appreciated.
Edit:
If i make it simpler, when i use these code i get half message :
#include <SoftwareSerial.h>
SoftwareSerial serialGPRS(7, 8);
void setup()
{
Serial.begin(19200);
serialGPRS.begin(19200);
}
void loop()
{
serialGPRS.println("AT+CMGR=1");
delay(1000);
while(serialGPRS.available()!=0)
Serial.write(serialGPRS.read());
}
like: +CMGR: "REC READ","+9*******",".H/E.3D/1