Need help with SIM800_MQTT?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

elementzonline
155 Stars 92 Forks GNU General Public License v3.0 41 Commits 2 Opened issues

Description

Visit our blog/website for more information

Services available

!
?

Need anything else?

Contributors list

# 264,676
C++
mqtt
gsm
18 commits
# 427,253
C++
mqtt
gsm
3 commits
# 484,560
C++
mqtt
gsm
1 commit
# 529,809
C++
mqtt
gsm
1 commit

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

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.