I have been in the throws of struggling with software and numerous other priority interrupts. Still ordering more parts and some have come in, but they will have to wait for another blog. I just have to get something posted even though it is not as complete as I had hoped. This installment describes a bit about trying to get an MQTT broker set up to handle sensor data from my wearable sensor suite.

First, I wanted to install my own MQTT data broker so I can keep the data local for now. After choosing Mosquitto as the broker, it took numerous attempts to install properly since not all the necessary files are included in the install file. The ancillary files have to be the correct version and there are many versions to choose from. My computer already had up to 7 versions of some of these files, so finding a working combination was a huge trial and error exercise. The error messages were generally meaningless (to me) and it was not even obvious which of the files were incompatible.

So, after scouring the net for every tutorial on the subject and digging through all the forums discussing similar issues, I finally gleaned enough information to get a workable install. None of the files I'm using are the latest version. If I knew what I as doing at the beginning, it probably would have taken 5 minutes instead of 10 hours. My biggest problem with most of these projects is understanding other people's software. Sometimes it is only tenacious persistence that gets you through.

To the best of my recollection this is where to get the files I used for installation on Windows 10 (64 bit):

  1. download and install mosquitto-1.4.9-install-win32.exe from this site https://www.eclipse.org/mosquitto/download/
  2. download and install Win32 OpenSSL v1.0.2k Light from this site Shining Light Productions - Win32 OpenSSL
  3. copy pthreadVC2.dll from this site ftp://sources.redhat.com/pub/pthreads-win32/dll-latest/dll/x86/ to your mosquitto directory
  4. copy libeay32.dll from your OpenSSL-Win32 directory to your mosquitto directory
  5. copy libssl32.dll from your OpenSSL-Win32 directory to your mosquitto directory
  6. copy ssleay32.dll from your OpenSSL-Win32 directory to your mosquitto directory

I still don't know enough about MQTT (Message Queue Telemetry Transport) to teach anybody about it, but the broker program will accept data on a specified topic from a remote publishing device and allow remote subscriber devices to access the data from any specified topic.

Here is a little demo of the system working with simulated sensors...

I will publish the Launchpad code if and when it is a little more stable.

My next blog will likely be about the custom sensor PCB I designed.

 

All links to blogs related to this project can be found in the first blog here:

Safe and Sound - Invisible Hazardous Environmental Factors Monitoring System - blog 1