Search
Search Results
Found one item.
1 - 1 of 1 items
The article describes a device that transmits data and processes commands over the MQTT
protocol on the Internet. A small batch was made to assess the performance in real practice. The
software for the microcontroller is written in C using a real-time operating system (RTOS), which
allows you to streamline software development through pseudo-parallel code execution, task synchronization
mechanisms (semaphores, mutexes), and a queue mechanism. The paper presents an
example of an algorithm for the interaction of FreeRTOS tasks: the tasks of waiting for a command
from the server, the tasks of measuring temperature, the main thread that sends a message
to the server in response to the appearance of a line in the message queue. The core of the MQTT
client being developed is the STM32 microcontroller and the GSM/GPRS SIM800 module. A large
number of interfaces are displayed on the device, which allows you to connect a wide variety of
peripherals (temperature, humidity, pressure sensors, servos, etc.). The device is able to independently
restore the connection to the network in case of its interruption. The proprietary implementation
of the MQTT protocol version 3.1 QoS 0 is used in the software of the control microcontroller.
MQTT messages are transmitted as part of a TCP connection established by means of a GSM module. The control microcontroller communicates with the GSM module via AT commands.
The possibility of two-way real-time messaging is implemented, which allows using the developed
microprocessor system both in the mode of an autonomous control device and in the interactive
mode of executing commands received wirelessly and sending the execution statuses of these
commands. The main feature of the MQTT client is the ability to remotely update the microcontroller
software (OTA), implemented using an auxiliary microcontroller and a flash memory chip.
The developed MQTT client is intended to be used as the basis of microprocessor systems - clients
of the Internet of Things.