Sim800l Delete All Sms



  1. Sim800l Delete All Sms App
  2. Sim800l Delete All Sms Contacts
  3. Sim800l Delete All Sms Messages
  4. Sim800l Delete All Sms Iphone
  5. Sim800l Delete All Sms App

Tell the Arduino to send you a specified sensor data to your phone all via SMS. Used DHT11+MLX90614 for example

Try the below script in the AT Command Tester tool //Script: atcmgd.at //Use this script to AT+cmgd AT command //Get the command support AT+cmgd=? WAIT=2 //Delete SMS message at index 1 AT+cmgd=1 WAIT=1 //Delete SMS message at index 2 AT+cmgd=2 WAIT=1 //Delete SMS message at index 3 AT+cmgd=3 WAIT=1 //Delete all read messages SMS messages, leave unread //messages and stored MO messages. In this example, we’ll use a DS18B20 temperature sensor, and we’ll send a text message when the temperature is above 28ºC.Once the temperature has decreased below the threshold, we’ll send another SMS alert. To send an SMS with the T-Call ESP32 SIM800L module, you just need to use modem.sendSMS(SMSTARGET, smsMessage) after initializing a modem object for the SIM800L.

  • 3,240 views
  • 3 comments
  • 3 respects

Components and supplies

Arduino UNO
×1
SIM800L EVB
×1
MLX90614
×1
DHT11 Temperature & Humidity Sensor (3 pins)
×1

Apps and online services

About this project


Tutorial video - explaining all

Sponsored by: DigitSpace
Product used: SIM800L Module Replace SIM900A GSM GPRS 5V Serial with Antenna


Hello there, this is my third tutorial concerning SIM800L EVB version, make sure to take a look at previous ones, to not make this one long:

So here in this tutorial, I'm going to use the same module 'SIM800L EVB version' with Arduino Uno board, and I took for example 'DHT11' and 'MLX90614 contactless thermal sensor'.

And the idea is that I'm going to ask the Arduino via SMS to send me either the DHT values or the MLX values via SMS too, the project is relatively easy, the tricky part was to detect a substring withing the SMS content to be able to decide wheter the user asks for DHT values or MLX values.

HALT !!!

The Sim card used shouldn't be locked with a pin code otherwise use the AT commands to do it, and make sure you have enough credit to be able to send SMS... depends on your network provider.

This is the module I'm using:

And as said before the module works with AT commands, we saw some of them on the previous tutorials.

And for the power I'm using A Lithium Battery with A Buck converter:

Test 1

So the test #1 consist of just reading a SMS sent from the phone, and display it on the serial monitor.

Wiring

Sim800l Delete All Sms App

The wiring 1 can be found below, it's the basic wiring of the module, it's practical for all kind of tests.

Libraries

No special libraries are required here just the default SoftwareSerial.

Code

Code 1 can be found below.

The code is really easy first in the 'Setup()' we just send some 'AT commands' to make the module on the receiving text mode and set the way those SMS received should be handled.

And on the loop there is a classic communication function that permits the communication between the Arduino IDE Serial Monitor and Sim800L 'send/receive' between them

The functions used can be found in the code, but if you want to check them closely here's the document:

Result

Test 2

On the test#2 we will add DHT11 sensor and MLX90614 contactless thermal sensor... I used these two just as an example you can use whatever you want.

And in the code I integrated a part where I read the SMS received and check for the keywords 'DHT' or 'MLX'... and here of course you can replace it by your own or make a whole command i.e:'Send DHT data'.... to sum up with just look for a substring within a string :D

Wiring

The wiring 2 can be found below, we have just add the DHT11 and MLX90614

Libraries

Two libraries should be add (Because of the modules) depending on what you are using.

Code

Code 2 can be found below.

So in this code we:

  • Set the module to receiving SMS mode
  • Set the way to handle the SMS
  • If something is received -> Transmit to Arduino
  • Arduino will check for the 'Keywords' (DHT or MLX)
  • If one of them is found -> check which one
  • Make the reading
  • Send the Data to the programmed phone number

Result

The use of the serial monitor is optional, the device can work without it, here used just to troubleshoot in case of a problem or to check the state.

The method we used is just to look for a specified keyword within the message, doesn't care what's being sent with it

Go further

You can improve the way to detect the keywords in the SMS sent, it will be useful to do other projects that will be more interesting.

You can do multiple readings before sending the SMS to be more precise.

Send error SMS in case the sensor is not working properly.

Check the code and if you have a better method for this share it with us, Thanks.

That's all folks.

Code

With comments to help you.
With comments to help you

Schematics

Author

SurtrTech
  • 20 projects
  • 103 followers

Published on

January 18, 2020
Write a comment

Members who respect this project

and 2 others

See similar projects
you might like

Table of contents

Sim800l Delete All Sms Contacts

Write a comment

The AT+CMGL command lists messages received on the GSM modem. It can be used to get all received messages, all unread messages or all read messages.

CommandPositive Response
AT+CMGL=<stat><CR>+CMGL: <index>,<stat>,<oa>,[<alpha>],[<scts>]<CR><LF><data><CR><LF>
...
OK

Sim800l Delete All Sms Messages

All

Parameters
<stat>: Status = 'ALL', 'REC UNREAD' or 'REC READ'
<index>: Index number of the message
<oa>: Originator address
<alpha>: Originator name (if available in the phonebook)
<scts>: Service Center Time Stamp
<data>: The content of the text message
<CR>: ASCII character 13
<LF>: ASCII character 10

Example

Sim800l Delete All Sms Iphone

Set the GSM modem to Text Mode SMS, list all received messages and remove the messages from the GSM modem.

Sim800l Delete All Sms App

See also
AT+CMGF - Set SMS Text Mode or SMS PDU Mode
AT+CMGD - Delete a Received Message