Skip to content
M Hamid Jamil edited this page Sep 27, 2023 · 3 revisions

TTgo T-Call ESP32 Module Project Wiki

Welcome to the TTgo T-Call ESP32 Module Project Wiki! This wiki provides detailed information and documentation for the project, which utilizes the TTgo T-Call ESP32 module for various cellular communication tasks. Below, you will find comprehensive guides and explanations on how to use and configure the project.

Table of Contents


Introduction

The TTgo T-Call ESP32 module is a versatile IoT development board that combines the power of the ESP32 microcontroller with the SIM800 modem, enabling cellular communication. This project offers a advance level implementation of interfacing with the SIM800 modem not only by using AT commands but with custom defined functions and provides essential functionalities such as making calls, sending SMS, and managing received messages and calls.

Learn more about the project's introduction


Hardware Requirements

To successfully run this project, you will need the following hardware components:

  • TTgo T-Call ESP32 module: The heart of your IoT project, integrating the ESP32 and SIM800 modem.
  • SIM card: Ensure it has an active mobile number (and is not PIN-locked).
  • USB-C cable: Required for power and debugging.
  • Computer: Equipped with the Arduino IDE and necessary drivers.

Explore hardware requirements in detail


Library Dependencies

This project relies on specific libraries that must be installed in your Arduino IDE:

  • TinyGSM: This library provides vital support for communicating with GSM modules using AT commands.
  • Wire: The Wire library facilitates I2C communication with the TTgo T-Call's power management IC (IP5306).

Install and learn more about library dependencies


Getting Started

Kickstart your project with these simple steps:

  1. Install Arduino IDE: Make sure it's set up and includes the ESP32 board package.
  2. Install Libraries: Get TinyGSM and Wire libraries if not already installed.
  3. Connect Your Module: Use the USB-C cable to link your TTgo T-Call ESP32 module to your computer.
  4. Open the Sketch: Load the TTgo_T-Call_ESP32_Module_Project.ino file in Arduino IDE.
  5. Configuration: Customize the MOBILE_No constant with your desired mobile number.
  6. Upload: Send the sketch to your TTgo T-Call module.
  7. Serial Monitor: Open it in the Arduino IDE to view output and interact with the module.

Get detailed instructions for getting started


Configuration

Before uploading the sketch to your TTgo T-Call module, you might need to tweak specific configurations:

  • SIM card PIN: If your SIM card has a PIN, update the simPIN constant with your SIM card's PIN code. Leave it empty if there's no PIN.

Learn more about configuration options


Usage

Once your sketch is uploaded to the TTgo T-Call module, you can use the Serial Monitor for interaction. Below are available commands:

  • call: Initiate a call to the mobile number specified in the MOBILE_No constant.
  • sms: <message>: Send an SMS with the specified <message> to the mobile number in the MOBILE_No constant.
  • module: Check for unread messages, displaying the last received message and its index.
  • battery: Check the battery voltage of the TTgo T-Call module.

Discover how to use these commands effectively


Functionalities:

  1. Module uses OLED display with this module which show these parameters:

First line of display will show following details:

  • WIFI is connected or not => C: Connected, D: Connected and X: Not allowed to connect.
  • Message sending is allowed or not => A: Allowed and N: Not allowed.
  • Unexecuted Messages counter (if there is any message which is not executed by module).
  • Remaining Battery in percentage.
  • Show Time, either the current Time or millis() time (if time is not initialized).

About Second and third line:

  • Second and third line will show the temperature and humidity of room.
  • Second line show two things: Status of WIFI functionality and Last value of ThingSpeak was uploaded successfully: + or not: -
  • Third line also show time passed after uploading successful data on thingSpeak.

About fourth line:

  • Fourth line will show error codes if any unexpected error occur it will show its code
  1. DHT11 Functionality:
  • I uses DHT11 from temperature and humidity
  1. Most important SIM900l Functionality:
  • Module will forward message to default user if it doesn't find any defined keyword.
  • Module will delete company messages after forwarding them to default user.
  • If the message it receives has defined keywords, then it will perform those tasks and delete it.
  • Module will not send any message to user if the plugged sim doesn't have message package.
  • It will saves unknown messages and ask user what to do with that message.
  • When module receive call, it will inform user about that miss call via message.
  • It can call and send message by taking command from Serial, BLE or message.
  1. BLE Functionality:
  • User can control module via BLE, both WIFI and BLE work parallel.
  • User can perform all the task which can be performed by Serial terminal as its input is forwarded to the same function which perform tasks for messages and Serial input.
  • To execute task user must send # at the end of message to execute it.
  1. Serial Functionality:
  • User can turn off/on debugging of specific part like: WIFI, BLE, Display and etc.
  • User can call or send message to any one via Serial terminal by following syntax.
  • User can perform multiple tasks manually which are time dependant.
  • Overall, there is one same function which perform BLE, Serial and messages tasks.
  1. WhatsApp Messaging:
  • Module can also send messages via WhatsApp.
  • The best part is it uses Free API of CallMeBot.
  • It optimizes my four whatsapp numbers as CallMeBot has limit of sending 25 messages per day for one number, so it automatically shifts to new number when the limit of that message reaches, it uses thingSpeak for this counter information.
  1. ThingSpeak Functionality:
  • Module uses thingSpeak DB to not just upload temperature and humidity but also for multiple purposes, i.e: when the message package expires and whatsapp message counter.
  1. SPIFFS:
  • Module can create, read and update variables values in SPIFFS which can be used in code.
  • Module uses SPIFFS memory to store the updated value of variables.

AT Commands

This project utilizes AT commands for communication with the SIM800 modem. Here are some useful AT commands that can be employed:

// List all SMS messages
AT+CMGL="ALL"

// Read SMS message at index 1
AT+CMGR=1

// Delete SMS message at index 1
AT+CMGD=1

// Enable missed call notification
AT+CLIP=1

// Make a call to +923354888420
ATD+923354888420;

// Hang up the current call
AT+CHUP

// Check if registered to the network
AT+CREG?

// Check signal quality
AT+CSQ

// Check battery voltage
AT+CBC

// Enable verbose error messages
AT+CMEE=2

// Disable verbose error messages
AT+CMEE=0

// Check if verbose error messages are enabled
AT+CMEE?

Explore the full list of AT commands and their usage


With this wiki, you'll have all the information you need to work with the TTgo T-Call ESP32 module project effectively. If you have further questions or need assistance, refer to the specific sections or reach out to the project's community for support. Happy building!