Design Principles For Connected Devices
Design Principles For Connected Devices
Design Principles For Connected Devices
connected devices
• Things refer to physical objects, sensors, machines, devices, controllers and intelligent edge-
nodes in the IoT.
• Connected devices refer to devices such as streetlights, RFIDs, ATMs and automobiles,
which are connected to the internet for applications, services and processes.
• Framework refers to a set of entities or software components which make provisions for
generic functionalities.
• Reference model means main entities conceptualized and the relationships between them
• Reference architecture means conceptualization of main entities in a system, their
functioning and deployment in the system and the processes rendered by the system.
• IoT or M2M device data refers to the data meant for communication to an application,
service or process.
• Data also refers to data received by a device for its monitoring or for actions at actuator in it.
• Data stack denotes the data received after the actions at various in-between layers (or levels
or domains).
• Layers in Open Systems Interconnection (OSI) model are Application, Presentation, Session,
Transport, Network, Data-link and Physical.
• Actions at the data-adaptation or other layers can be related to data privacy, data security,
data consolidation, aggregation, compaction and fusion.
• An action can be a gateway action—using one protocol for reception and another one for
transmission.
Key terms to be understood to learn the design principles of connected
devices for IoTs
• Layer refers to a stage during a set of actions at which the action is taken as per a specific
protocol or method, and then the result passes to the next layer until the set of actions
complete. A layer may consist of various sublayers.
• Physical layer refers to a layer at transmitting-node or at the receiving node for the data bits.
The transfer uses physical systems and refers to wireless or wired transmission. This layer is
the lowest layer.
• Application layer refers to a layer for transmitting or receiving the data bits of an application.
• Data bits route across the network and transfer takes place as follows: application data from
the application layer transfers after passing through several in-between layers to the physical
layer, and from there it transmits to the receiving-end physical layer.
IoT Levels
• Level refers to a stage from the lowest to the highest. For example, acquiring device data and
actions that may be considered at the lowest level and actions in business processes at the
highest level.
• Domain refers to a set of software, layers or levels having specific applications and
capabilities. domain. A domain generally has limited interactions with other domains or
outside the domain.
• Gateway refers to software for connecting two application layers, one at the sender and the
other at the receiver [application layer gateway (ALG)].
• A communication gateway at device and gateway domain has capabilities as protocol-conversion during
communication between two ends when each end uses distinct protocols.
• An Internet gateway may have capabilities besides protocol conversion, transcoding data, device management
and data-enrichment before the data communicate over the Internet.
• IP stands for Internet Protocol version 6 (IPv6) or Internet Protocol version 4 (IPv4) for the
network layer (v6 means version 6, v4 version 4).
• Header means a set of octets containing information about the data being sent.
• Header packs the data of a layer before transmission to the next layer during communication
between two end-points.
• Packet means packaged data-stack which routes over the network. Packet size limit is
according to the protocol.
• Protocol Data Unit (PDU) is a unit of data which is specified in a protocol of a given layer
which transfers from one layer to another.
• Maximum Transmission Unit (MTU) is the largest size frame or packet or segment specified
in octets (1 octet = 1 byte = 8 bits) that can be sent in a packet or frame-based network such
as the Internet.
• Star network denotes the number of nodes interacting with a coordinator or master node.
• Mesh network denotes the number of nodes that may interconnect with each other.
• End-point device or node denotes the one that provides connectivity to a coordinator or
router.
• Coordinator denotes the one that connects to a number of end-points as well as routers in a
star topology and forwards the data stack from one attached end point/router to another.
• Master refers to the one who initiates the pairing with the devices in a star topology network.
• Slave means one that pairs with a master, uses the clock signals from master for
synchronization and uses address assigned by the master at the beginning.
• Router refers to a device or node capable of storing paths to each destination to which it has
logical links. The router sends the data stack according to the available path or paths at a
receiving instance.
• ISM band means Industrial, Scientific and Medical (ISM) radio frequency (RF) bands. 2.4 GHz
and the frequencies are 915 MHz for North America, 868 MHz for Europe and 433 MHz band
for Asia in ISM bands.
• Application means software for specific tasks, such as streetlight monitoring or control.
• Service means service software, for example, report generation or chart visualisation service.
• Process means a software component, which processes the input and generates the output;
for example after analysing the data or acquiring the data.
• An operating system controls a process, memory for the process and other parameters of the
process.
IoT/M2M SYSTEMS, LAYERS AND DESIGNS STANDARDISATION
• A number of international organisations have taken action for IoT design standardisation.
• Internet Engineering Task Force (IETF), an international body initiated actions for addressing and
working on the recommendations for the engineering specifications for the Internet of Things.
• International Telecommunication Union for Telecommunication (ITU-T) suggested a reference model
for IoT domain, network and transport capabilities for the IoT services and the applications at the
application and application-support layers.
• European Telecommunication Standards Institute (ETSI) initiated the development of a set of standards
for the network, and devices and gateway domains for the communication between machines (M2M).
ETSI proposed high-level architecture for applications and service capabilities.
• Open Geospatial Consortium (OGC), an International Industry Consortium, has also suggested open
standards for sensors’ discovery, capabilities, quality and other aspects with support to geographical
information web support.
Modified OSI Model for the IoT/M2M Systems
• OSI protocols mean a family of information exchange standards developed jointly by the ISO
and the ITU-T.
• The seven-layer OSI model is a standard model.
• It gives the basic outline for designing a communication network.
• Various models for data interchanges consider the layers specified by the OSI model, and
modify it for simplicity according to the requirement.
• Similarly, IETF suggests modifications in the OSI model for the IoT/M2M.
• Data communicates from device end to application end. Each layer processes the received
data and creates a new data stack which transfers it to the next layer.
• The processing takes place at the in-between layers, i.e. between the bottom functional-layer
to the top layer.
• Device end also receives data from an application/service after processing at the in-between
layers.
Seven-layer generalised OSI model (on left) and IETF six layer modified OSI model for
IoT/ M2M (in the middle), and similarity with the conceptual framework for IoT
applications and services
• New applications and services are present at the application layer 6. A
modification to this is that the application-support layer 5 uses protocols,
such as CoAP.
• IoT applications and services commonly use them for network
communication.
• The CoAP protocol at the layer is used for the request/response interactions
between the client and server at the network.
• Similarly, the application-support layer may include processes for data
managing, acquiring, organising and analysing which are mostly used by
applications and services.
• Modifications are also at the data-link layer 2 (L2) and physical layer 1 (L1).
• The new layers are data-adaptation (new L2) and physical cum data-link
(new L1).
• The data-adaptation layer includes a gateway. The gateway enables
communication between the devices network and the web.
• A physical IoT/M2M device hardware may integrate a wireless transceiver
using a communication protocol as well as a data-link protocol for linking the
data stacks of L1 and L2.
ITU-T Reference Model
• It also shows correspondence of the model with the six-layers
modified OSI model
• RM1 considers four layers:
• Lowest layer, L1, is the device layer and has device and gateway capabilities.
• Next layer, L2, has transport and network capabilities.
• Next layer, L3, is the services and application-support layer. The support layer
has two types of capabilities—generic and specific service or application-
support capabilities.
• Top layer, L4, is for applications and services.
• ITU-T recommends four layers, each with different capabilities. A comparison
of ITU-T RM1 with the six-layer OSI model can be made as follows:
• RM1 device layer capabilities are similar to data-adaptation and physical cum
data-link layers.
• RM1 network layer capabilities are similar to transport and network layers.
• RM1 upper two layer capabilities are similar to top two layers.
ETSI M2M Domains and High-level Capabilities
• A gateway at a data-adaptation layer has several functions. These are data privacy, data
security, data enrichment, data consolidation, transformation and device management.
• This architecture shows IoT or M2M gateway consisting of data enrichment, consolidation
and device management, and communication frameworks
• The model’s lowest layer is the device layer.
• This layer has device and gateway capabilities.
• The domain consists of a gateway between M2M area network and CoRE and access network.
• A gateway consists of the data enrichment, consolidation and IoT communication
frameworks.
• The communication gateway enables the devices to communicate and network with the web.
• The communication gateway uses message transport protocols and web communication
protocols for the Internet
• The gateway includes two functions viz. data management and consolidation, and connected
device management.
Data Management and Consolidation Gateway
• Gateway includes the provisions for one or more of the following functions: transcoding and
data management. Following are data management and consolidation functions:
• Transcoding - Transcoding means data adaptation, conversion and change of protocol,
format or code using software
• Privacy, security - Privacy is an aspect of data management and must be remembered while
designing an application.
• Integration
• Compaction and fusion
Data Gathering and Enrichment
• IoT/M2M applications involve actions such as data-gathering (acquisition), validation,
storage, processing, reminiscence (retention) and analysis.
• Data gathering refers to data acquisition from the devices/devices network.
• Polling refers to the data sought from a device by addressing the device; for example, waste container filling
information in a waste management system
• Event-based gathering refers to the data sought from the device on an event; for example, when the device
reaches near an access point or a card reaches near the card reader or an initial data exchange for the setup of
peer-to-peer or master-slave connection of BT device using NFC
• Scheduled interval refers to the data sought from a device at select intervals; for example, data for ambient light
condition in Internet of streetlights
• Continuous monitoring refers to the data sought from a device continuously; for example, data for traffic
presence in a particular street ambient light condition in Internet of streetlights
• Data enrichment refers to adding value, security and usability of the data.
Web Connectivity
• Key terms, which need to be understood for learning web connectivity and
communication between the connected devices network and the web for IoT:
• Application or App refers to a software for applications such as creating and sending an SMS,
measuring and sending the measured data, receiving a message from a specific sender etc.
• Application Programming Interface (API) refers to a software component, which receives
messages from one end; for example, from an application or client or input.
• An API also refers to software components, which enable easier development of an
application.
• Web service refers to a servicing software which uses web protocols, web objects or Web
Sockets; for example, weather reports service, traffic density reports, streetlights monitoring
and controlling service.
• Object refers to a collection of resources; for example, collection of data and methods (or
functions or procedures) to operate on that data.
• Object model is defined as the usage of objects for values, messages, data or resource transfer,
and creation of one or more object-instances.
• Class: Java uses concept of class, which creates one or more object instances.
• Communication gateway is one that functions as communication protocol translator
(convertor) for provisioning communication capabilities.
• Client refers to a software object which makes request (or an API associated with it makes
request) for data, messages, resources or objects.
• Server is defined as a software which sends a response on a request. The server also sends
messages, alerts or notifications.
• Web object is the one that retrieves a resource from the web object at other end using a web
protocol.
• Broker denotes an object, which arranges the communication between two ends;
• Proxy refers to an application which receives a response from the server for usage of a client or
application and which also receives requests from the client for the responses retrieved or
saved at proxy.
• Communication protocol defines the rules and conventions for communication between
networked devices and between systems.
• Web protocol is a protocol that defines the rules and conventions for communication
between the web server and web clients.
• Firewall is one that protects the server from unauthentic resources.
• A header consists of a set of words. The words contain the information and parameters about
the processing at a communicating layer.
• A state refers to an aspect related to someone or something, or a form at a particular time
• Resource denotes something that can be read (used), written (created or changed) or
executed (processed).
• Path denotes a navigation path between two ends when accessing a resource.
• Universal Resource Identifier is generally used for saved resources, such as contacts or
address book
• Datagram refers to a limited size data (216 byte). It is used for stateless connectionless
transfer from a web object.
• REST is a software architecture which also specifies the practices, constraints, characteristics
and guidelines for creating scalable web services.
• Multipurpose Internet Mail Extensions or MIME refers to the type of files that are widely used on the
Internet by web objects, applications and services.
• Hypertext means text embedded with hyperlinks. HyperText Transfer Protocol (HTTP) means an
application layer protocol for use of hypertext as app data transfer protocol.
• Hyperlink refers to a specification of the URL for a resource path, so that a link can be established
between two objects.
• HyperText Markup Language (HTML) is a language for creating a hypertext which refers to text that
embeds text, images, audio and video, image frames, forms, lists, tables, navigation links (reference to
resources), APIs, Java Script and other codes for dynamic actions.
• Extensible Markup Language (XML) is a language, which enables creation, sending and receiving
documents, messages, commands, query responses, queries, and creation of forms.
• Browser is a client software which displays hypertext that enables navigation to the hypertext links
shown on the user screen, and which displays GUIs of the apps, display form, display server responses,
and so on.
• Framework refers to provisions for a number of software libraries, and a number of APIs including
those that can be selectively changed by user codes in applications.
WEB COMMUNICATION PROTOCOLS FOR CONNECTED DEVICES
• Data of connected devices routes over the web in two types of communication
environments.
• Constrained RESTful Environment (CoRE)
• IoT devices or M2M devices communicate between themselves in a Local Area Network. A device
typically sends or receives 10s of bytes. The data gathered after enriching and consolidating from a
number of devices consists of 100s of bytes. A gateway in the communication framework enables the
data of networked devices that communicate over the Internet using the REST software architecture.
• Unconstrained Environment
• Web applications use HTTP and RESTful HTTP for web client and web server communication. A web
object consists of 1000s of bytes. Data routes over IP networks for the Internet. Web applications and
services use the IP and TCP protocols for Internet network and transport layers
Constrained Application Protocol
• IETF recommends Constrained Application Protocol (CoAP) which is for CoRE
using ROLL data network.
• Features of CoAP are
• An IETF defined application-support layer protocol
• CoAP web-objects communicate using request/response interaction model.
• A specialised web-transfer protocol which is used for CoRE using ROLL network.
• It uses object-model for the resources and each object can have single or multiple instances.
• Each resource can have single or multiple instances.
• An object or resource use CoAP, DTLS (security binding with PSK, RPK and Certificate) and
UDP protocols for sending a request or response.
• Supports the resource directory and resource-discovery functions
• The resource identifiers use the URIs as follow coap://… .
CoAP Client Web Connectivity
• A proxy is an intermediate server, which accepts a request from a client
and sends the response to the client using a protocol.
• It also passes the request to the server and accepts a response from the
server using the same or an other protocol.
• HTTP-CoAP proxy accepts requests from HTTP client using HTTP protocol
and sends the request to the server using CoAP protocol.
• CoAP-HTTP proxy accepts requests from CoAP client using CoAP protocol
and sends the request to the server using HTTP protocol.
• Transport Layer Security (TLS), earlier known as Secure Socket Layer (SSL) is the protocol
used for securing the TCP-based Internet data interchanges. DTLS is the TLS for datagram.
The features of DTLS are:
• DTLS provisions for three types of security services—integrity, authentication and confidentiality.
• DTLS protocol derives from TLS protocol and binds UDP for secured datagram transport.
• DTLS is well suited for securing applications; for example, tunnelling applications (VPN), applications that tend
to run out of file descriptors or socket buffers or applications which are delay sensitive (and thus use UDP).
• A part of DTLS is OpenSSL repository openssl-0.9.8 security based on PSK, RPK and certificate.
Lightweight Machine-to-Machine Communication Protocol