Category Archives: M2M

Try the HiveMQ MQTT broker on CentOS 6.x

What is MQTT?

MQTT is the short name for MQ Telemetry Transport. It is a TCP based protocol which implements the publish and subscribe pattern. While the pubish and subscribe method became popular these days for mobile devices MQTT is one of the protocols becoming more and more popular. Actually MQTT is becoming an OASIS standard for the Internet of Things within the next few months.
Some more information are available here:

What is HiveMQ

HiveMQ is a MQTT broker which basically is the server part of MQTT. All messages in a MQTT communication are handled by a broker, it is the key component for this type of communication. HiveMQ is a Java based broker software with some extended functionality like building clusters and the possibility to easily extend the functionality with plugins. It is free for personal non-commercial use up to 25 concurrent connected clients. Check out the HiveMQ Website for all its features and documentation.


CentOS 6.x
Java VM (OpenJDK 1.7)
SELinux should be off if you don't need it.
Allow incomming connections to TCP port 1883

Install OpenJDK 1.7

yum install java-1.7.0-openjdk.x86_64

Download, extract and run HiveMQ

wget --content-disposition
cd hivemq-1.3.0/
chmod 755

The output should look something like this:


_    _  _              __  __   ____
| |  | |(_)            |  \/  | / __ \
| |__| | _ __   __ ___ | \  / || |  | |
|  __  || |\ \ / // _ \| |\/| || |  | |
| |  | || | \ V /|  __/| |  | || |__| |
|_|  |_||_|  \_/  \___||_|  |_| \___\_\


HiveMQ Start Script for Linux/Unix v1


Checking if Java is installed
Java was found. Starting HiveMQ....


No HIVEMQ_HOME is set, using default
Searching for HiveMQ in /hivemq-1.3.0....
Starting HiveMQ...

2013-06-18 22:35:29,874 INFO  - HiveMQ home directory: /hivemq-1.3.0
2013-06-18 22:35:29,879 INFO  - Starting HiveMQ Server
2013-06-18 22:35:33,509 INFO  - Activating statistics callbacks with an interval of 60 seconds
2013-06-18 22:35:33,510 INFO  - Activating $SYS topics with an interval of 60 seconds
2013-06-18 22:35:33,812 WARN  - No license file found. Using free personal licensing with restrictions to 25 connections.
2013-06-18 22:35:34,483 INFO  - Starting on address and port 1883
2013-06-18 22:35:34,514 INFO  - Loaded Plugin Access Log Plugin - v1.0-SNAPSHOT
2013-06-18 22:35:34,516 INFO  - Started HiveMQ in 4646ms

And that’s it! Try to connect your client to your ip on port 1883 and have fun. If you want to use a plugin, just extract it into your plugin folder and restart HiveMQ.

First very basic MQTT Mac App

Since I had to bring my self up to speed with all this fancy M2M stuff our developers doing right now I started a small project by my own to learn something about MQTT and M2M communication.

My application is a very basic Objective-C application for Mac based on the Eclipse PAHO library. This library is open source and implements the MQTT protocol.  I am not a very good and experienced programmer please feel free to implement this in a better and smartert way. My few lines of code are free for use on github and open source under the Apache License.

To test this application I am hosting a public mosquitto broker sponsored by BayCIX running a nice mqtt-dashboard to monitoring what is going on on the broker developed by a colleague of mine at dc-square.

Here what it looks like up to know after a few hours of coding:

SimpleMessage MQTT Client v0.1.1

Future releases will be more generic and with some more preferences to test MQTT and the broker in a more experienced way:

  • SSL encryption
  • User authentication
  • Connection options
  • Basic performance measuring

Update v0.1.5

New version with some bug fixes and some small enhancements released.

SimpleMessage MQTT Mac OS X Client

Download SimpleMessage v0.1.5 here.