Add encryption and SSL/TLS into your IoT project

SSL has since been succeeded and superseded by TLS and in the rest of this post, I do not use SSL but instead TLS. However, TLS was built on top of SSL and as such the two are used interchangeably.

As pointed out, I am not an expert in informational security so I have to use a built library (or set of APIs) for performing these security operations. But even using libraries or APIs is not an easy task. This is especially the case for security related ones. Even if they are documented, they tend to have a lot of elements in them that you may get lost in the abbreviations, acronyms, internet standards etc. The SSL/TLS libraries are no exception. The libraries get complicated because the need to support several features due to possible scenarios such as:

MQTT with LPC4337 and Keil MDK

This post will also be very short (or so I hope).

Setting up MQTT in your Keil MDK project is very easy especially for the Eclipse Paho client for C. I did this in one git commit. You will notice that of the three flavors available, I chose the MQTTPacket because it is lightweight. The other flavors required some more work. Setting the timing parts for the MQTTClient, required understanding the library perfectly to work it out. One requires the timing to work if you need to subscribe to a topic or if you need the broker to confirm delivery (QoS 2 or QoS 1). For the basic proof of concept, QoS 1 works fine. It means I need no response from the broker.

Communication protocols for embedded application and why I chose MQTT

Communication protocols for embedded application and why I chose MQTT

This is going to be a rather short post because it has been covered by other people elsewhere. I will concentrate on which protocol works best for the IoT tutorial we are on. This is the third post of the tutorial.

At the tail end of this post, there are additional resources for further reading.

There are a number of protocols out there and sometimes we get confused by the marketing around some of them. That is evident in the picture below.

SIM900 Driver for KEIL MDK-Network (PPP interface for TCP/IP)

I choose to use LPC4337 and the Cortex-M4 core. No particular preference, only that it was on my desk at the time I chose to write this post. Also, I bought this developer board here. The network driver is documented at length by Keil/ARM here, in case you need to familiarize yourself with it before proceeding.

There are 15 commits up to this one that detail the steps on how code changed through the process.

Communication for IoT or Embedded applications

Communication for IoT or Embedded applications

There is really a lot of talk about IoT and how many billion dollars it will be worth in the future. However, unless we solve actual problems that we face, that might be a dream that will only connect a bunch of toys to the internet without much of information for our use. One of those problems is connectivity.

Most examples available online from hardware manufacturers, for development kits, and from cloud service providers will only describe the connection to the internet via ethernet. If they do not show ethernet, the application is most likely a Bluetooth Smart client app that does not connect directly to the internet but via a host like a mobile phone. Using a mobile phone is not always the best option unless it is a wearable. There are many of those nowadays. You also cannot use ethernet everywhere you want. Your piece of hardware is grounded.

JSON Array Output from Azure Stream Analytics

JSON Array Output from Azure Stream Analytics

The guys at Microsoft Azure surely have done a good job at providing the some of the best solutions for common tasks. These tasks seem trivial but I guess that's not always the case when you get to implementation. You get to realize this your boss tells you to perform statistical analysis live. When I was in school, most of the statistics was done on already know data. There was nothing like moving average then. Now in the current age of technology, having a live stream of data is not only preferred but in many situations compulsory.

SIM900 Dial-up Connection Setup

SIM900 Dial-up Connection Setup

SIMCOM's SIM900 is the most common GSM/GPRS modules in the maker/hobbyist community. It is of course not the best and the experience people have had with it varies. Most people use this for simple tasks like SMS sending and receiving making the experience people have had largely positive. The module is also cheap and readily available. Compared to building your own baseband module, you get some advantages:

a) Certification of by regulatory institutions like FCC, CE, etc. is already done.

b) The software stack is already done. The only thing you have to worry about is the command protocol otherwise known as AT command set. The software stack is very deep and complicated and there are very few resources you will find online for this kind of work.

The list goes on...

Worth noting is that these benefits apply to almost all GSM module and so does most of the post below.