Download SMQ Source Code and Libraries

We provide several SMQ source code implementations for various programming languages.

Supported languages: C and C++, Java/Android, JavaScript, and Lua.

C code

The C code is designed for microcontrollers and can be used by RTOS and bare-metal (super-loop) systems. The code can also be used on a HLOS such as Windows and Linux. The following porting layers are included in the source code: lwIP-netconn, lwIP-raw, uIP, MQX, ThreadX/NetX, POSIX (Linux), Windows.

We provide two C code versions: one open source implementation that is designed for non encrypted communication (SMQ Client) and one designed for utilizing our SharkSSL stack (SharkMQ).


Compiling and running the SMQ LED example code

Windows instructions:

Download the SMQ Client ZIP file, unzip, and open the included Visual Studio project file. You may use the batch file if you do not have Visual Studio installed. The batch file downloads Tiny C and uses the Tiny C compiler to compile the code. Note that the batch file may be slow due to the use of a built in Windows download program.

Linux instructions:

Download the SMQ Client ZIP file, unzip, compile, and run the LED example by copying and pasting the following into a Linux console:

wget /downloads/SMQ/;unzip;cd SimpleMQ;make;./led-smq

Running the LED example:

Start the LED executable. When the LED example is running, navigate to our public SMQ broker. You should see your IP address in the left tab. Click this IP address to control your simulated device running on your computer.

You may change the broker URL in the LED example code and connect to your own broker. The Mako Server's tutorials include a ready to use broker.

Java Code

The Java source code library (JavaSMQ) for standard Java and Android can be downloaded. We also provide two source code examples, one designed for the Swing UI and one Android app. Both examples include the JavaSMQ stack and both examples replicate the functionality found in the JavaScript SMQ LED demo.

The Java SMQ protocol stack and example programs developed by Real Time Logic are released under the Eclipse Public License.


Compiling and running the Swing example

You can compile the Java code in any Java IDE. The code can also be compiled at the command line if you have the Java SDK installed. The following two command line instructions compile the code and run the LED example.

javac -cp . java LedSMQ

JavaScript Code

SMQ.js is included in the Barracuda App Server and in the Mako Server's resource file You can find SMQ.js in The LED demo source code is included in the Mako Server's tutorials, in

Broker (Server)

The broker is implemented in Lua and an instance of the broker runs on the Barracuda App Server Lua runtime engine. The broker is included in the Mako Server's resource file You can find the broker in the source file The broker setup code used by the LED demo is included in the Mako Server's tutorials, in and in

SMQ Tutorials

Tutorials for how to use SMQ, including a tutorial on the SMQ LED demo, can be found at the Mako Server Web site.