Introduction: MQTT With SIMCOM SIM7500 Guide on NORVI GSM Series
NORVI devices are robust IoT industrial controllers, and when combined with the SIMCOM SIM7500 LTE module, they enable secure cellular communication with cloud platforms via MQTT. This guide explains the setup, essential AT commands, and code for using the SIM7500 module to connect NORVI devices to an MQTT broker.
Click here to view the web guide
For Understanding MQTT -MQTT PROTOCOL
Understanding NORVI Controllers with the SIM7500 Module
NORVI devices are flexible industrial IoT solutions that simplify the integration of sensors, actuators, and communication modules. Adding the SIM7500 module boosts their capabilities by enabling cellular connectivity, making them ideal for remote monitoring and data collection in areas without Wi-Fi or wired networks.
Supplies
Setting Up NORVI GSM series SIM7500 to MQTT
In this setup, the NORVI GSM series SIM7500 device serves as an MQTT publisher, while the MQTT.fx software acts as the subscriber. The NORVI device collects I/O data and transmits it to the MQTT subscriber and a data visualization platform for remote monitoring and analysis.
Key features of NORVI devices with the SIM7500 module
- Industrial-grade design: Suitable for harsh environments.
- Versatile I/O options: Digital and analog inputs/outputs for various sensors and actuators.
- Cellular connectivity: LTE support via the SIM7500 module for remote monitoring and control.
1. Prerequisites
Before you begin, ensure you have the following,
- NORVI Device with an integrated SIM7500 module
- MQTT broker details (hostname, port, username, password)
- MQTT.fx software for testing and monitoring
- Arduino IDE and necessary libraries for programming the NORVI device.
- Data visualization platform (e.g., DATACAKE)
2. Required Libraries
- Arduino.h
- Wire.h
- WiFi.h
- ArduinoJson.h
3. Sensitive Information Handling
- Secret.h: This file should contain the MQTT username and password, which should be kept secure.
Hardware Setup
1. Pin Connections
- MODEM_TX (TX Pin)
- MODEM_RX (RX Pin)
- GSM_RESET (Reset Pin)
- Digital Input Pins (D0, D1, D2, D3)
Step 1: Understanding the Test Program
This code sets up a NORVI GSM device with the SIM7500 module to connect to an MQTT broker. It initializes the GSM modem, connects to GPRS, and subscribes to MQTT topics while publishing sensor data in JSON format. The code handles incoming MQTT messages, allowing the device to respond to commands based on the received payload. Key functions include establishing network connections, sending commands to the GSM module, and processing MQTT messages. Additionally, it manages input states and periodically sends updates over MQTT.
Step 2: MQTT Broker Configeration
Check this link for detailed instructions on how to configure the MQTT broker and the Subscriber.
- Download MQTT.fx client and install it.
- Open the MQTT.fx and click the Settings icon.
- Click + to create a profile.
- Enter the Connection Profile and General information.
Step 3: Enter the User Credentials Information
- After completing the above steps, click Apply > OK to save.
Step 4: Select the Subscribe Tab
- Then, select the name of the file just created in the profile box and click Connect.
- If the round icon in the top-right corner is green, the connection to IoT Hub is successful, and publishing and subscribing operations can be performed.
Step 5: Full Guide and Additional Information
Understanding the Test program
Github explanation of sim7600 module with at commands ( You can apply for sim7500) -MQTT Connection with SIM7600 Using AT Commands
- MQTT Broker Configuration
- Steps to Configure in MQTT.fx
Step 6: MQTT Broker Configuration
Step 7: Enter the User Credentials Information
- After completing the above steps, click Apply > OK to save.
- Then, select the name of the file just created in the profile box and click Connect.
- If the round icon in the top-right corner is green, the connection to IoT Hub is successful, and publishing and subscribing operations can be performed.
Step 8: Connected to the Broker
- Select the Subscribe tab in the client, scan and select the topic name, and click Subscribe to subscribe to the topic.
Step 9: MQTT Subscriber Dashboard
Step 10: Captured Data From the MQTT Broker
Step 11: Integration With Data Visualization Platform
- Datacake dashboard.