Hi all !
Is it possible to code something so i can make the sim800L to send and receive SMS at the same time?.
Thanks !
Hi all !
Is it possible to code something so i can make the sim800L to send and receive SMS at the same time?.
Thanks !
you can poll the SIM800 at regular intervals to check if a SMS has been received and send a SMS at any time between polling
Physical you can't transmit and receive simultaneously. So the real answer is no.
You should also be able to set it (using AT Commands) to send an unsolicited response when it receives an incoming SMS...
Indeed.
The device should have configuration options (AT Commands) to control what happens when an SMS comes in while the interface is busy doing something else ...
Ok....
I have a simple code like this to send SMS:
#include <SoftwareSerial.h>
//Create software serial object to communicate with SIM800L
SoftwareSerial mySerial(3, 2); //SIM800L Tx & Rx is connected to Arduino #3 & #2
void setup()
{
//Begin serial communication with Arduino and Arduino IDE (Serial Monitor)
Serial.begin(9600);
//Begin serial communication with Arduino and SIM800L
mySerial.begin(9600);
Serial.println("Initializing...");
delay(1000);
mySerial.println("AT"); //Once the handshake test is successful, it will back to OK
updateSerial();
mySerial.println("AT+CMGF=1"); // Configuring TEXT mode
updateSerial();
mySerial.println("AT+CMGS=\"+ZZxxxxxxxxxx\"");//change ZZ with country code and xxxxxxxxxxx with phone number to sms
updateSerial();
mySerial.print("Last Minute Engineers | lastminuteengineers.com"); //text content
updateSerial();
mySerial.write(26);
}
void loop()
{
}
void updateSerial()
{
delay(500);
while (Serial.available())
{
mySerial.write(Serial.read());//Forward what Serial received to Software Serial Port
}
while(mySerial.available())
{
Serial.write(mySerial.read());//Forward what Software Serial received to Serial Port
}
}
And this one to receive SMS:
#include <SoftwareSerial.h>
//Create software serial object to communicate with SIM800L
SoftwareSerial mySerial(3, 2); //SIM800L Tx & Rx is connected to Arduino #3 & #2
void setup()
{
//Begin serial communication with Arduino and Arduino IDE (Serial Monitor)
Serial.begin(9600);
//Begin serial communication with Arduino and SIM800L
mySerial.begin(9600);
Serial.println("Initializing...");
delay(1000);
mySerial.println("AT"); //Once the handshake test is successful, it will back to OK
updateSerial();
mySerial.println("AT+CMGF=1"); // Configuring TEXT mode
updateSerial();
mySerial.println("AT+CNMI=1,2,0,0,0"); // Decides how newly arrived SMS messages should be handled
updateSerial();
}
void loop()
{
updateSerial();
}
void updateSerial()
{
delay(500);
while (Serial.available())
{
mySerial.write(Serial.read());//Forward what Serial received to Software Serial Port
}
while(mySerial.available())
{
Serial.write(mySerial.read());//Forward what Software Serial received to Serial Port
}
}
How can i combine them to do the magic?.
Regards!
ok, do you have any clue how to do it?.
Any code example?.
Thanks!
The SiM800L is not capable for handing this request?
Transmitting and receiving at the same time on the same frequency will always fail no matter what you try. What happens is that the receiver gets swamped by the transmitter's signal and the transmission you are trying to hear can't get through. Even cell phones do not transmit and receive at the same time.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.