MaurizioRoma
Member
Hi everybody, I recently purchased a GSM/GPRS shield identical to the one used in the example posted by Erel and uploaded the GSM_Example code. Unfortunately it doesn't work. More specifically, I noticed that in GSM Module, the "busy" variable remains setted to TRUE after the Sub SendCommand is executed, therefore I cannot send any SMS.
I also forced the execution of the sub by commenting the line
but, anyway, it doesn't send any SMS.
I tried uploading the source code via the .ino sketch attached and it works properly.
I also tried to substitute the original code in the Sub EnableSMSEvents with the "AT+CMGF=1" command, and to add the slashes (\) to the phone number, but I failed.
Has anyone an idea of what I've done wrong?
Thanks in advance
Maurizio
I also forced the execution of the sub by commenting the line
B4X:
If busy Then Return False
but, anyway, it doesn't send any SMS.
I tried uploading the source code via the .ino sketch attached and it works properly.
#include <SoftwareSerial.h>
SoftwareSerial SIM900(7, 8);
void setup() {
Serial.begin(115200);
SIM900.begin(19200);
Serial.println("AppStart");
delay(20000);
sendSMS();
}
void loop() {
}
void sendSMS() {
SIM900.print("AT+CMGF=1\r");
delay(100);
SIM900.println("AT + CMGS = \"+xxxxxxxxx\"");
delay(100);
SIM900.println("Hello, how doin'?!!");
delay(100);
SIM900.println((char)26);
delay(100);
SIM900.println();
delay(5000);
}
SoftwareSerial SIM900(7, 8);
void setup() {
Serial.begin(115200);
SIM900.begin(19200);
Serial.println("AppStart");
delay(20000);
sendSMS();
}
void loop() {
}
void sendSMS() {
SIM900.print("AT+CMGF=1\r");
delay(100);
SIM900.println("AT + CMGS = \"+xxxxxxxxx\"");
delay(100);
SIM900.println("Hello, how doin'?!!");
delay(100);
SIM900.println((char)26);
delay(100);
SIM900.println();
delay(5000);
}
I also tried to substitute the original code in the Sub EnableSMSEvents with the "AT+CMGF=1" command, and to add the slashes (\) to the phone number, but I failed.
Has anyone an idea of what I've done wrong?
Thanks in advance
Maurizio