GSMout - receive SMS and calls "at home"




  • Picture 1

    Today, there are virtually no Internet resources that would not need your phone number. Verification of the number is usually done by receiving an SMS with a code or a call, where the last digits of the number are an argument for confirmation. If you are engaged in business, then you probably came across the fact that in order to perform certain banking operations, you must sign them using the code from SMS. Everything is good when you are in your home region and getting a code is not difficult, the situation is much more complicated if you are in another region where roaming does not work, because your phone or SIM card is not supported by local cellular operators. One of the elegant solutions is this project (Figure 1). In the home region, you leave M5Stack with a SIM card installed, get static IP from the operator, open the port and get access to the log of incoming SMS and calls online from anywhere in the world where there is Internet access.

    No modems, but you hold on!

    Out of the box in the Base Unit M5Stack there is no built-in modem and there is nowhere to insert a SIM card, so you need to additionally purchase a GSM module (you can select it at link) .

    Please, when choosing make sure that you have no sins behind your back be especially selective... If you look datasheet on SIM800L, it says so:

    4.1. Power supply

    The power supply range of SIM800L is from 3.4V to 4.4V. Recommended voltage is 4.0V. The transmitting burst will cause voltage drop and the power supply must be able to provide sufficient current up to 2A. For the VBAT input, a bypass capacitor (low ESR) such as a 100 μF is strongly recommended.

    Do you understand what I mean? The dropper. My Air, on which I write the code, does not give a current of up to 2 A. We open the braid of the USB-C cable, cut what wire? Red. We connect an external power supply unit to 5 Volts 3 Amperes so that for sure to the place of the notch. Now, the power of the Basic device will go from an external power source (and everything will be fine - I thought). But the modem did not think so. For him there was too much ~ 4.8 Volts and he screamed in every possible way with his only LED.

    It was necessary to look for a solution further. The standard Bottom Module has an attractive contact BAT. Class! All! Here is the solution! After all, a lithium-polymer battery is just 3.7 Volts. ESP32 needs 3.3 V. We power the basic device through this contact. One, two, three, multimeter say voltage! Bah! The voltage is again ~ 4.8 Volts. In the Basic device, the power circuit increased it. Method two has gone down in history.

    The third method was the most successful. Hot air gun and step-down converter ** LM2596** have done their job (Figure 2).


    Figure 2

    Which pull, captain?

    When the hardware problems have passed us, we will create software! Download the project source from the GitHub repository.

    At the beginning of the project code there are a couple of lines that you can edit if you want to change the server port
    int web_port = 80;
    and the web page address of the magazine
    String web_mainPage =" GSMout ";

    Pay attention to the data folder - files from this folder must be loaded into SPIFFS-memory using the plug-in for Arduino IDE called ESP32 Sketch Data Upload (the plug-in is in [this repository] (https://github.com/me-no-dev/arduino-esp32fs-plugin)), but before that you must add the file (s) of the type myHomeHotspot.wifi, where myHomeHotspot is the name of the Wi-Fi network, and the contents file - password. This is necessary to automatically connect the Core to Wi-Fi.

    It works.

    At startup, the device connects to a Wi-Fi network, then checks for Internet access, updates the time and date via NTP, and sets up the modem. The corresponding icons are shown on the display, watchCat and the journal web page address are responsible for the icons. When new messages arrive or the icon’s calls become colored and their number is displayed on the right, the counter is reset to zero after the log web page is requested. That's all.

    When you open the address indicated on the M5Stack screen, a log is displayed in the browser (Figure 3).


    Figure 3

    I hope this project helps you someday. Special thanks to the author of the article "at-command of the gsm modem sim900" located here.

    A video demonstration of the work can be seen here