Automatic door project
Find a file
2022-12-21 23:27:59 +01:00
images Adding files 2022-12-12 16:30:03 +01:00
datasaver.py Modifying file 2022-12-17 22:46:44 +01:00
etc-wpa_supplicant-wpa_supplicant.conf Adding files 2022-12-07 13:48:05 +01:00
executor_esp32.ino Modifying file 2022-12-19 22:44:18 +01:00
fail.html Adding internet option 2022-12-21 23:22:19 +01:00
index.html Adding internet option 2022-12-21 23:22:19 +01:00
LICENSE Adding files 2022-12-12 16:30:03 +01:00
Makefile Adding files 2022-12-07 13:49:49 +01:00
manage_gpio.py Adding files 2022-12-18 06:35:53 +01:00
myapp.py Modification 2022-12-21 23:27:59 +01:00
README.md Adding files 2022-12-12 16:30:03 +01:00
README_.md Adding files 2022-12-12 16:30:03 +01:00
rootmystarter.sh Adding files 2022-12-18 06:35:53 +01:00
sim800l.py Modifying functions and adding remote handler 2022-12-18 09:04:48 +01:00
sim800lCommandLine.py Modifying functions and adding remote handler 2022-12-18 09:04:48 +01:00
success.html Adding internet option 2022-12-21 23:22:19 +01:00

Raspberry Pi sim800l gsm module

  • connecting the raspberry pi to sim8ool gsm module to send, receive sms, delete sms etc.

SIM900/SIM800 are 2G only modems, make sure your provider supports 2G as it is already being phased out in a lot of areas around the world, else a 3G/4G modem like the SIM7100 / SIM5300 is warranted.

Requirements

  • Raspberry pi 3 with Raspbian OS installed.
  • Sim800L GSM module
  • external power supply for the Sim800L (5v 1A worked for our case, use the correct one for your module)
  • A bunch of jumper wires.

References

setup

Hardware connection

Disable serial console

We will start by disabling serial console to enable communication between the pi and sim800l via serial0 .

Open the terminal on your pi and run sudo raspi-config Select Interfaces → Serial Select No to the 1st prompt and Yes for the 2nd.

Usage examples

from sim800l import SIM800L
sim800l=SIM800L('/dev/serial0')

send sms

sms="Hello there"
#sim800l.send_sms(dest.no,sms)
sim800l.send_sms('2547xxxxxxxx',sms)

read sms

#sim800l.read_sms(id)
sim800l.read_sms(id)

callback action

def print_delete():
    #assuming the sim has no sms initially
    sms=sim800l.read_sms(1)
    print(sms)
    sim800l.delete_sms(1)

sim800l.callback_msg(print_delete)

while True:
    sim800l.check_incoming()