NOTE:
Use FTPclient() to send files to a remote server. This is different than setting up the data
logger to act as an FTP server. See the FTP Streaming technical paper and FTP
Troubleshooting technical paper for more information.
19.4 MQTT
MQTT is an open communications protocol often used in the Internet of Things (IoT). It uses a
publish/subscribe architecture to send and receive data. A broker facilitates the communications
between publishers and subscribers by receiving published messages and distributing them to
subscribers. One advantage of MQTT is that communications are initiated by the CR300 series so
firewalls do not cause problems.
For full MQTT specifications see:https://mqtt.org/ .
19.4.1 Sending data to an MQTT broker
MQTT communications require a broker configured for data logger communications. There are
many available; it is recommended that you consult with an ITprofessional.
19.4.1.1 Mosquitto
This example uses the public Mosquitto test broker https://test.mosquitto.org/ for testing. This
section is provided as a convenience; Campbell Scientific does not provide technical support for
Mosquitto.
Configure the data logger
1. Ensure your data logger is connected to the internet.
2. Using Device Configuration Utility, connect to the data logger.
3. (Recommended) On the Logger Control tab, set the Reference Clock Setting to UTC.
19. Communications protocols122