RepositoryC++
elementzonline

elementzonline/SIM800_MQTT

Visit our blog/website for more information

176stars
92forks
5issues
2views

SIM800_MQTT

#AutoConnect CallBack function

  • Use this function if you want to use autoconnect(and auto reconnect) facility
  • This function is called whenever TCP connection is established (or re-established).

#connect function

  • This function can be used to connect your client to MQTT broker.
  • Use only if you do not use Auto connect functionality.
  • Optionally you can use username, password, WILL topic and WILL Message.

#OnConnect CallBack function

  • This call back function is called when MQTT connection is established.
  • You can call subscription and publish functions inside it (according to your need).

Publish function

  • This function can be used to publish messages to different topics.
  • You can select QoS levels and RETAIN flag according to your need.

Subscribe function

  • This function can be used to subscribe messages from different topics.

OnMessage CallBack function

  • This callback function is called when messages are received from subscribed topics
  • Topic, TopicLength, Message, MessageLength are the arguments of OnMessage callback function.
  • Inside this, you can write your custom code.

#unsubscribe function

  • This function can be used to unsubscribe from a previously subscribed topic.

#disconnect function

  • This function can be used to disconnect your client from MQTT broker.

#available function

  • return true when connection with mqtt brocker is existing

Other Features :

  • You can specify your KeepAlive duration while initializing.
  • Ping requests are sent and received automatically.
  • QoS 0,1,2

Note:

Use the examples as a template.

To Do:

  • Move the functions Autoconnect, OnConnect and OnMessage to the source code
  • Implement a generic way to include external functions and their parameters to the funtions AutoConnect and OnConnect
  • Change the function OnMessage to be a callback

Similar Projects

Discover other similar projects and AI models.

RepositoryC
MaJerle/lwcell

Lightweight cellular modem host AT library

488
Sep 27, 2026
RepositoryC++
vshymanskyy/TinyGSM

A small Arduino library for GSM modules, that just works

2.2k
Nov 14, 2026
RepositoryC++
vittorioexp/Sim800L-Arduino-Library-revised

The SIM800L Arduino Library is a simple and easy-to-use library for the SIM800L module, allowing for quick and efficient communication with the module using the Arduino platform.

101
Jan 13, 2023
RepositoryC++
carrascoacd/ArduinoSIM800L

Arduino HTTP & FTP client for SIM800L/SIM800 boards to perform GET and POST requests to a JSON API as well as FTP uploads.

156
May 6, 2023
RepositoryC
nimaltd/gsm

gsm module library for STM32 LL

51
Oct 2, 2026
RepositoryPython
home-assistant/core

:house_with_garden: Open source home automation that puts local control and privacy first.

92.6k
Nov 27, 2026
RepositoryPython
blakeblackshear/frigate

NVR with realtime local object detection for IP cameras

38.1k
Nov 30, 2026
RepositoryC++
esphome/esphome

ESPHome is a system to control your ESP32, ESP8266, BK72xx, RP2040 by simple yet powerful configuration files and control them remotely through Home Automation systems.

12.2k
Nov 27, 2026
RepositoryC++
PlotJuggler/PlotJuggler

The Time Series Visualization Tool that you deserve.

6.4k
Dec 1, 2026