MQTT client on Arduino + SIM900 I have used the pubsubclient library for Arduino for communicating with an MQTT broker in the past, however the library works only with Ethernet connecction. I need to use GSM in my application and am using the SIM900 at the moment. However, I cannot seem to find any library for MQTT communication using an Arduino as MQTT client and SIM900 as gateway. I found this to be surprising as there must surely be many instances where one would want to upload data from Arduino to a MQTT broker in a mobile scenario where cellular network is the only option (in place of Ethernet). So my questions are:


Is it possible to use the Arduino as MQTT client and SIM900 as gateway for communicating with an MQTT broker? Are there any libraries for the same?
What is the current standard way (gateway / communication protocol) of uploading some sensor data from Arduino to an internet server in a mobile scenario (i.e., where Ethernet is not an option)?
MQTT Library for SIM800 GSM Modem is available at ElementzTechBlog, ElementzGithubRepository
Functionalities:
Auto connect
   Automatically connect to TCP and to MQTT server.

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.

Keep Alive
   You can specify your KeepAlive duration while initializing.
   Ping requests are sent and received automatically.

Update
Nowadays the easiest solution is to use SIM7600 4G/3G/2G modem. It supports MQTT using AT commands !. For more details the following link can be useful to get started.
https://www.elementzonline.com/blog/using-mqtt-at-commands-with-sim7600-and-arduino-for-gsm-iot-projects