Skip to content

Not working with concurrent sms and call functions #34

Open
@Sandeepvardhan08

Description

@Sandeepvardhan08

im facing a problem with this code , im getting only calls but not the messages actually.
i dont know why im not getting messages. Correct me if anything is wrong within the code .
im only receiving sms 1 time after uploading the code to aurdino, from next im only receiving calls.

help me ASAP
Regards.

Heres the code:

#include <Sim800L.h> // Include the revised SIM800L library
#include <SoftwareSerial.h>

// SIM800L configuration
Sim800L Sim800L(7, 8); // RX, TX for SIM800L

// Phone number for alerts
const char* phoneNumber = "+911234567890"; // Replace with your phone number
char message = "hellow from aurdino"

void setup() {
// Initialize serial communication for debugging
Serial.begin(9600);

// Initialize SIM800L module
Sim800L.begin(9600);

}

void loop() {

// Send SMS

bool smsSent = Sim800L.sendSms(phoneNumber,message);
delay(15000);
if (smsSent) {
Serial.println("SMS sent successfully");
} else {
Serial.println("Failed to send SMS");
}

//Make a call
Sim800L.callNumber(phoneNumber);
Serial.println("Calling...");
delay(30000); // Call duration of 30 seconds
Sim800L.hangoffCall();
delay(10000);

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions