In our previous article, we explored how MQTT virtual serial port software is used as a TCP client in combination with a serial server. In this issue, we will delve into the configuration of the serial server and guide you through the process of integrating it with the Alibaba Cloud IoT model. This tutorial provides a step-by-step guide on how to set up the serial server.
ME31-AXAX4040 Network I/O Module (1 unit)
MCGS TPC7062 Configuration Display (1 unit)
RS-485 Communication Cables (several)
Other Necessary Cables
12V Switch Power Supply (1 unit)
Serial Server (NB114)
Note: The serial server, as a data transmission device, does not currently support JSON data processing in its latest version (specifically, converting JSON to Modbus RTU protocol). However, it is capable of transmitting JSON data. Therefore, MCGS is used to handle data packaging and unpacking operations.
In this tutorial, we will use two serial ports of the TPC7062:
COM2 is connected to the ME31-AXAX4040 for Modbus control.
COM1 is connected to the NB114 Serial Server to establish the connection with the Alibaba Cloud MQTT server.
The NB114 series serial server uses the RS-232 interface, which shares the same pin configuration as the TPC7062's COM1 port (pins 2, 3, and 5). When wiring, ensure that the RX and TX lines are crossed.
EBYTE NB114 Serial Server
Intelligent Protocol Converter