Mosquito: everything you need to know

mosquitto IoT board

surely you know what is mosquito, and that is why you have come to this article, because you need to know more details or you want to know how it can be installed on your operating system. If you don't know what this open source project is, what it is for, how it can help you with your IoT projects, and what is the MQTT protocol who uses this software.

What is MQTT?

MQTT protocol

Mosquitto is based on the MQTT protocol, which stands for Message Queuing Telemetry Transport. A network protocol for "light" messaging, that is, for networks that are not as reliable or have limited resources in terms of bandwidth. It can generally be used in machine-to-machine (M2M) communications, or Internet of Things (IoT) connections.

MQTT was created by the Dr. Andy Stanford-Clark and Arlen Nipper in 1999. It was initially used for telemetry for monitoring data in the oil and gas industry that was sent to remote servers. On those platforms, it was not possible to establish a very stable connection or lay a fixed cable, so this protocol could solve the limitations.

Later, MQTT was standardized and open, so now it is an open source protocol that is managed by mqtt.org, and has become a standard for the IoT.

MQTT uses TCP/IP to run on top of it and work, with a topology like PUSH/SUBSCRIBE. In these systems one can differentiate between:

  • Client: These are connected devices that do not communicate directly with each other, but rather connect with the broker. Each client on the network can be a publisher (sending data, like a sensor), a subscriber (receiving data), or both.
  • Broker: It is a server with which the clients communicate, the communication data arrives there and is sent to other clients with whom you want to communicate. An example of a broker would be Mosquitto.

Also, the protocol is event-driven, so there is no periodic or continuous data transmission. Only when a client sends information will the network be busy, and the broker only sends information to subscribers when new data arrives. That way you keep the minimum the amount of bandwidth used.

What is Mosquito?

mosquito logo

Eclipse Mosquito It is free and open source software, licensed under the EPL/EDL, and acts as a broker or intermediary of messages through the MQTT protocol. This software is very lightweight, suitable for a multitude of different devices, from a PC to low-power embedded plates.

Paho is a related project that can complement Mosquitto, implementing multi-language MQTT client libraries. Streamsheets is another project in a spreadsheet and real-time interface for process control, creating dashboards, etc.

In addition, Mosquitto also provides a C library to implement MQTT clients, as well as including the popular mosquitto_pub and mosquitto_dub command line clients. On the other hand, it is very simple, in a matter of minutes you can have your own stay running, you even have a test server on test.mosquitto.org, to test clients in various ways (TLS, WebSockets, …).

And if you have a problem, Mosquitto has a fantastic community of development and willing to help you in the forums and other places.

More information - Official Web

How to install Mosquitto on your operating system

Finally, you also have to explain how you can download Mosquitto and install on your operating system, so you can start testing it with your IoT projects. And you can do it in several ways:

  • Use the source code y compile it yourself.
  • Binaries: you can download from download area.
    • Windows: download from the link that I leave the .exe binary in the 64-bit or 32-bit version, depending on the system you have. Once downloaded, you can run it. If you have problems, you can read the README-windows.md file.
    • MacOS: Download the binary from the download link, then use the brew.sh script to install Mosquitto.
    • GNU / Linux: There are several ways to install it, such as:
      • Ubuntu and other distros with snap run command: snap install mosquito
      • Debian: sudo apt-add-repository ppa:mosquitto-dev/mosquitto-paa & sudo apt-get update & sudo apt-get install mosquitto
      • More: also available for other distros, and for Raspberri Pi from the official repository.
    • Others: see more information in this website of Mosquitto binaries.

After this, you will already have Mosquitto installed on your operating system and it will be ready to use or manage as you need, such as with Celado.


Be the first to comment

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.