Developing a connected device is quite different than the traditional embedded systems that developers have been creating over the past forty years. System complexity, security, embedded software and cloud software are just a few examples of the nearly limitless list of challenges facing developers. In order to be successful developing an IoT device, there are seven key lessons developers need to learn.
Lesson #1 – Start With An IoT Platform
Developers are always tempted to write software from scratch. There are few development opportunities as exciting as a ground up software effort. The problem with starting from scratch with an IoT device is that an IoT device is not a simple development effort. Connecting devices to the internet is complicated especially considering that many of the hardware devices used are 32-bit microcontrollers. A development team could easily spend over two years developing low level drivers, middleware, application and cloud code to get a product developed. At the rate technology changes a product would be obsolete before ever hitting the market.
Teams working on IoT devices need to understand that to be first to market, at an affordable cost and with a robust product, they need to build their device upon the work of others. The use of an IoT platform can drastically help a team jump start their product development and save months of development effort. There are many different platforms on and coming to market but a few personal favorites are the Electric Imp and the Renesas Synergy™ Platform.
These two platforms differ quite drastically. The Electric Imp is great for development teams that don't have traditional embedded software experience. The Electric Imp is programmed through a web based interface using the Squirrel scripting language. The Electric Imp connects an IoT device to the cloud over Wi-Fi and once connected is easy for developers to update with their latest scripts. The Renesas Synergy platform is great for developers of traditional embedded systems. The platform comes with low level drivers, middleware, a RTOS and libraries that allow a developer to focus on the product features and application right out of the gate.
Lesson #2 – IoT Devices Need A RTOS
Just like with writing software from scratch, many developers like to write bare metal software for embedded systems. For an IoT device, excluding an RTOS is a foolhardy endeavor. The features provided in an RTOS provide developers with advanced features such as task scheduling, middleware integration and advanced debugging techniques such as tracing that are just too time consuming to develop from scratch. For a connected device, a RTOS is a requirement and not an option. The sooner developers realize this fact the better off their development cycle will be and the sooner they can get to work selecting the right RTOS.
Lesson #3 – One Language Is Not Enough
Mastering a single programming language is not going to be enough to survive as an embedded software developer in the age of the IoT. Embedded systems have traditionally been dominated by C/C++ but other languages such as Java, Python, Squirrel and Java Script are quickly becoming just as important to an embedded system and the IoT in general. Developers can get an interesting perspective on the trends of different programming languages by examining the TIOBE index. An example of April index can be seen in the chart below.
Careful examination of the index reveals that C and Java dominate the software world with Python and a few other languages steadily becoming more popular. Traditionally C has been used to develop low level firmware but recent advancement in microcontroller hardware have resulted in interesting developments such as Micro Python that allows developers to use a Python 3.4 interpreter on a low power microcontroller.
Lesson #4 – Systems Need To Be Secured
There is no such thing as a secure embedded system. With enough time and resources, a hacker can infiltrate any system. The trick, is to make the hacking of a system so time consuming and costly that the would-be hacker decides to look elsewhere for lower hanging fruit. The problem facing many embedded system developers is that they don't know enough about securing their system to be effective and are therefore the low hanging fruit!
When developing a product for the IoT, developers must develop a security strategy early in the development process. Developers should make sure that they make use of encryption, digital signing and authentication. Production builds of the software should be used that remove debugging symbols and lock down the flash so that it cannot be accessed. Even going this far will not be enough over the long run. Securing an IoT device will be a continuous game of cat and mouse as security flaws are continually discovered and patched. Security for IoT devices will not be a one off and need to be planned for in the device maintenance.
Lesson #5 – Low Power Design Is Critical
Many connected devices are going to be either remote sensor nodes of wearable devices that are operating on a battery. The ability to develop software that can place the device into a low power state will be critical to the success of many products. Smart devices connected to the grid should not be over looked. The ability of an IoT device to be signed off as "green" and energy efficient could be an important selling point.
The EEMBC Coremark is a standard for microcontroller devices that measures how energy efficient a microcontroller is. Early in the development process it is now possible for developers to examine and compare the energy efficiency ratings of different microcontrollers and vendors and properly select one for the application.
Lesson #6 – More Time Needs To Be Spent On Firmware Updates
Focusing on the ability to update firmware in the field is one of the last development tasks a team thinks about. The ability to update firmware in the field without any issues and in a secure manner will be critical to IoT devices. The standard bootloader provided by many chip manufacturers as examples are not going to cut it in a connected society. Provided bootloaders are not secure, lack authentication and encryption and usually expose the device to additional threats through the update process. Developers of IoT devices will need to develop their firmware update strategy early in the development process and build it alongside their device to ensure it is fully tested and ready for the challenges facing connected devices.
Lesson #7 – Select IoT Protocols Carefully
The number of protocols that can be used for an IoT device is staggering and quickly becoming unmanageable. The short list of protocols that can be used for an IoT device include Thread, HTTPS, MQTTS, Wi-Fi, Bluetooth Low Energy, ZigBee, Zwave, 6LoWPAN and standard TCP/IP to name a few. The selection of a protocol today is determined based on the end application. Some of the protocols such as Thread appear to be gaining popularity but who can tell five or ten years out if it will be successful. Developers should be cautious and select protocols that are mature, simple and fit their system needs. Today there is not one protocol to rule them all so tread carefully.
Developers can't be an expert in everything IoT related. To be truly successful, developers will need to learn to understand the major challenges they face and find ways to leverage existing platforms to get the job done. Developers who learn the seven lessons presented in this article will be poised to be successful as the new era of IoT devices is ushered in.
About the Author
Jacob Beningo is principal consultant at Beningo Engineering, an embedded software consulting company. Jacob has experience developing, reviewing and critiquing drivers, frameworks, and application code for companies requiring robust and scalable firmware. Jacob is actively involved in improving the general understanding of embedded software development through workshops, webinars and blogging. Feel free to contact him at [email protected], and visit his website at www.beningo.com, and sign-up for the monthly Embedded Bytes Newsletter at www.beningo.com/814-2/.
Jacob will also be leading several events on Embedded Security onsite at Sensors Expo & Conference, including:
- Sneak Preview Webinar on Thursday, June 2: Embedded Security Webinar - Overcoming Embedded Systems Challenges
- Pre-Conference Symposium on Tuesday, June 21: Overcoming Embedded Systems Challenges - Securing the IoT
- Embedded Security Conference Track on Wednesday, June 22-Thursday, June 23
View the Guest Pass below and Register here to Join Me at Sensors Expo!