By Clarke Stevens, Principal Architect at Shaw Communications
The Open Connectivity Foundation (OCF) is dedicated to supplying both its members and developers with a variety of development tools and resources curated by experts. These assets help enable simple, step-by-step development of connected products, and include the required security, reliability and interoperability for IoT connectivity.
One of these development tools includes the OCF’s Developer Kit, part of the OCF’s Developer Program. It helps developers get started with IoT development, allowing them to get a real device working on real hardware controlled by their smartphone using state-of-the-art security in a matter of minutes. The Kit consists of a hardware board setup and programming tools, using IoTivity APIs that interact with sensor and actuator devices. These sensors and actuator devices are controllable from a smartphone application called Onboarding Tool and Generic Client (OTGC).
The Developer Kit includes:
- A Raspberry Pi 3
- A Pimoroni Explorer Hat Pro board
- A micro USB power supply
- A micro SD card
- An Ethernet cable to connect to the Internet (if you don’t want to use Wi-Fi)
Once the hardware board is configured and the SD card and OS are set up, the developer will then install the development environment which is a suite of automated tools including all source code, introspection file, secure onboarding file, and client tool user interface.
A simple input file is read by the DeviceBuilder tool to find out what you want to communicate with. It loads the necessary standard OCF data models from the OneIoTa Data Model tool (an open online tool for crowd-sourcing data models), generating the required code based on IoTivity Lite, the lightweight Open Source implementation of OCF specifications. Very small JSON data models form the core of OCF, and the Development Kit shows these OCF resources in action.
The developer then uses the OTGC smartphone application to scan their network for OCF devices. Unclaimed OCF devices can be securely added to the network and protected from being claimed or controlled by anyone else. Previously claimed devices are shown in red while unclaimed devices are shown as blue. The user may claim any unclaimed device. Once a device is “owned,” the OTGC will automatically create a user interface and the application can begin to manage basic controls, including turning on lights, flipping switches, reading sensors and viewing which buttons are being pressed on the board.
The OCF Developer Kit not only allows developers to build IoTivity Lite devices quickly and efficiently, but the principles it teaches can be harnessed for creating any IoT product from scratch. Developers are able to utilize files from the Developer Kit, adding in three to four simple lines of code to interface with resources on their own hardware.
The resources and devices made available to developers through the Developer Kit allow those with little IoT experience to develop applications and bridges that are secure, reliable and compliant with the OCF specifications. The applications built with the Developer Kit resources will generate clean IoTivity Lite code that does the work to meet most of the requirements for OCF certification.
The Developer Kit covers the entire development process for OCF. It provides automatic interoperability with other OCF devices. With bridges built for other ecosystems such as Zigbee, OneM2M and AllJoyn, OCF devices can control or be controlled by IoT devices in other ecosystems. All code built by DeviceBuilder uses OCF security, ensuring that the device is secure.
For more information on the Developer Kit, please visit the developer section on the OCF website, as well as the IoTivity website.