0% found this document useful (0 votes)
102 views

Iot Communication Model

The document discusses communication models used in IoT (Internet of Things) systems. It describes four main models: 1) Request & Response Model which follows a client-server architecture, 2) Publisher-Subscriber Model which involves publishers, brokers, and consumers, 3) Push-Pull Model which uses data queues as buffers between publishers and consumers, and 4) Exclusive Pair model which enables bi-directional and constant connections between a client and server. It also discusses the role of APIs in enabling communication and data exchange between different IoT devices and applications.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
102 views

Iot Communication Model

The document discusses communication models used in IoT (Internet of Things) systems. It describes four main models: 1) Request & Response Model which follows a client-server architecture, 2) Publisher-Subscriber Model which involves publishers, brokers, and consumers, 3) Push-Pull Model which uses data queues as buffers between publishers and consumers, and 4) Exclusive Pair model which enables bi-directional and constant connections between a client and server. It also discusses the role of APIs in enabling communication and data exchange between different IoT devices and applications.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 14

Communication Models in IoT (Internet of Things)

IoT devices are found everywhere and will enable circulatory intelligence in the future. For
operational perception, it is important and useful to understand how various IoT devices
communicate with each other. Communication models used in IoT have great value. The
IoTs allow people and things to be connected any time, any space, with anything and
anyone, using any network and any service.
Types of Communication Model:
1. Request & Response Model –
This model follows a client-server architecture.
 The client, when required, requests the information from the server. This request
is usually in the encoded format.
 This model is stateless since the data between the requests is not retained and each
request is independently handled.
 The server Categories the request, and fetches the data from the database and its
resource representation. This data is converted to response and is transferred in an
encoded format to the client. The client, in turn, receives the response.
 On the other hand — In Request-Response communication model client sends a request
to the server and the server responds to the request. When the server receives the
request it decides how to respond, fetches the data retrieves resources, and prepares
the response, and sends it to the client.
2. Publisher-Subscriber Model –
This model comprises three entities: Publishers, Brokers, and Consumers.
 Publishers are the source of data. It sends the data to the topic which are managed by
the broker. They are not aware of consumers.
 Consumers subscribe to the topics which are managed by the broker.
 Hence, Brokers responsibility is to accept data from publishers and send it to the
appropriate consumers. The broker only has the information regarding the consumer to
which a particular topic belongs to which the publisher is unaware of.

3. Push-Pull Model –
The push-pull model constitutes data publishers, data consumers, and data queues.
 Publishers and Consumers are not aware of each other.
 Publishers publish the message/data and push it into the queue. The consumers,
present on the other side, pull the data out of the queue. Thus, the queue acts as the
buffer for the message when the difference occurs in the rate of push or pull of data on
the side of a publisher and consumer.
 Queues help in decoupling the messaging between the producer and consumer.
Queues also act as a buffer which helps in situations where there is a mismatch
between the rate at which the producers push the data and consumers pull the data.
4. Exclusive Pair –
 Exclusive Pair is the bi-directional model, including full-duplex communication among
client and server. The connection is constant and remains open till the client sends a
request to close the connection.
 The Server has the record of all the connections which has been opened.
 This is a state-full connection model and the server is aware of all open connections.
 WebSocket based communication API is fully based on this model.
What Is API? API Application In IoT
Leave A Comment / IOT

Application Programming Interface (API) Is An Interfacing Software Platform That


Allows The Exchange Of Any Information Or Data And Supports The Interaction
Among Different Applications Or Any Such Intermediaries. Google Maps, Twitter,
Facebook Are A Few Examples Of APIs Used In Our Day To Day Life.

Whenever We Use An Application On Our Device, The Very First Step The Application
Does Is To Connect To The Internet, After Connecting To The Internet It Sends The
Information Or The Collected Data To The Server. The Server Then Converts The
Data, Take The Necessary Action, And Later Sends It Back To The Device, Which
Can Be Understood By The User.

API | Example
Let Us Look Into A Simple Example That Can Help Us To Understand The Function Of
An API. Imagine Yourself In A Foreign Land, Where You Can’t Speak The Language
Spoken There. You Visit A Garment Manufacturing Shop And Decide To Buy
Something For Yourself. In This Case, The Garment Manufacturer Is The System. It
Needs Your Instruction Or We Can Say Your Choices. You Take The Help Of Your
Friend To Translate Or To Convey Your Messages To The Manufacturer.

So Your Friend Here Is An API Who Acts As A Messenger Between You And The
Manufacturer. The System (Manufacturer) Then Delivers You The Desired Result
(Cloth ). He Fulfils The Link To Communicate Between The System And The User,
Which Is The Job Of An API.
APIs Play A Vital Role In IoT Technology. We Can Say That IoT Is Nothing Without
API. As The Connection Or Interaction Of Things In The Internet Of Things Is Possible
Due To API. APIs Are Driving IoT Technologies. It Ensures The Collection, Analysis,
And Interpretation Of Data. Flight Bookings, Login Activities, Online Payments As Well
As Whether Updates Can Be Done Using APIs.

Web APIs
Web API Is Basically For Web Servers Or Web Browsers That Can Be Accessed
Using The HTTP Protocol. It Can Be Developed Using Java, Python, Etc. Also In Web
APIS, A Client Can Access The Web Applications But Not The Further Web Details.
There Are Four Main Types Or Categories Of Web APIs.

Types

Open APIs:-
Open APIs Are Also Known As Public APIs As It Is Available To The General Public
And Has No Much Restrictions To Access.

Partner APIs:-
Partner APIs Are Similar To Open APIs But In This Case, The Developer Needs A
License Or Certain Rights To Access The APIs. These Are Controlled By Third Party
Gateway APIs.

Internal APIs:-
Internal APIs Are Also Known As Private APIs.These Are Designed For Internal Use
Within An Organization Or The Company. This Has Better Security And Is Not
Available For Public Use. Only Internal Systems Can Access Them.

Composite APIs:-
Composite APIs Are Used To Combine Different Service APIs In One Place. It Helps
To Speed Up The Process And Lowers The Server Load And Also Improves The
Performance As Everything Is Available In A Single Place

Communication Levels In APIs –


 High-Level APIs-
1. Comes With Few Details
2. Easy To Use
3. Limited Functionality
 Low-Level APIs-
1. More Detailed
2. More Functionality
3. Need To Be Experienced To Use It
4. Efficient
5. Manipulation Or Changes Of Function Within An Application Is Possible
PROTOCOLS / SPECIFICATIONS OF APIS –
REST(Representational State Transfer):-
It Is One Of The Most Popular Web APIs Used. The Interface Has Nothing To Do With
Storage Or Backend. The Client-Server Communication Is Simple Here And Is Based
On URLs Or HTTP Protocols. These Are Also Easy To Build And Can Be Cached.
These Are Very Reliable And Have Larger Applications. SSL Security Is Used Here.
Thus, It Uses JSON, XML For Formatting. It Provides Us With The Option Of Flexible
Data Formatting.

SOAP (Simple Object Access Protocol):-


It Is Much Complex But Also Well Defined In Terms Of Security. Banking Transactions
Or Any Other Applications That Need High Security Use This. It Can Allow Any Style
Of Programming And Is Based On A Wide Range Of Protocols Such As HTTP, SMTP,
TCP, Etc. Also, Uses XML For Formatting. It Is One Of The Established API Used.

JSON-RPC (JavaScript Object Notation-Remote Procedure Calls):-


It Has One Of The Best Request Efficiency. Thus, It Uses JSON Formatting. It Is Much
Reliable And Simple To Use. Popular Programming Languages E.G., Java,
JavaScript, Ruby, C#, PHP And Python )And Application Platforms Provide Good
Support For Producing And Consuming JSON Data. It Is Human-Readable As Well As
Machine-Readable And Is Designed In Such A Way That They Call Methods.

XML-RPC(Extensible Markup Language -Remote Procedure Calls):-


This Is Much Similar To JSON-RPC, But Here XML Is Used For Formatting Of Data. It
Is Much Simpler And Uses Minimum Bandwidth. While REST Performs Basis On
Resources The RPCs Depend On The Actions.

However, APIs Have Helped IoT Emerge As A Powerful Technology In Today’s World.
Afterwards Wearable Watches To Home Automation Systems Are All Dependent On
APIs.

e backbone of IoT ecosystem is connectivity. IoT devices can connect and exchange data with each
other via communication protocols.
It’s important for you to know what the top IoT protocols are, and how they work, if you are looking to
establish an IoT system in your organization. In this article, we will list the top 10 IoT communication
protocols and their characteristics.
What are IoT communication protocols?
IoT communication protocols, also called IoT protocols, are sets of wireless networks and rules that
interconnect IoT devices. IoT protocols allow IoT devices to exchange data between each other.
What’s the best IoT communication protocol?
The best IoT communication protocol depends on the specific requirements and constraints of a given
system. Factor that play a role in choosing IoT protocols are:
 Geographic locations: This is physical distances between the two or more devices that form an
ecosystem
 Power consumption needs: This is the amount of time for which the IoT devices are stayed on
 Physical barriers: These are the barriers that exist between the devices within the IoT
ecosystem (e.g. walls, mountains, skyscrapers, etc.)
 Overall budget: Different protocols cost differently
Note that the IoT data protocols we list in this article is in no particular order.
Summarized table
Show entries
Search:
Approximate Data
Protocol Standard Frequencies
Range Rates

600 Mbps
maximum;
Based on IEEE 802.11 50 to 100 150-200
WiFi 2.4 GHz and 5 GHz bands
(common in homes) meters Mbps the
most
common

Bluetooth 4.2 core 50 to 150


Bluetooth 2.5 GHz 1 Mbps
specification meters

Zigbee 2.0 based on 10 to 100


Zigbee 2.4 GHz 250 Kbps
IEEE802.15.4 meters

Up to 256
MQTT ISO/IEC 20922 -- -- Mbps in
size

GSM/GPRS/EDGE(2G), 35km max for


Cellular 35-170
UMTS/HSPA(3G), 900/1800/1900/2100MHz GSM; 200km
Data Kbps
LTE(4G) max for HSPA

0.3 to 50
Z Wave Z-wave Alliance Various 30 meters
Kbps

100-420
NFC ISO/IEC 18000-3 13.56 MHz 10cm
Kbps

2.5km (urban
environment), 0.3 to 50
LoraWAN LoRaWAN Various
15km (suburban Kbps
environment)

30-50 km (rural
environments), 10-10000
Sigfox Sigfox 900 Mhz
3-10 km (urban Kbps
environments)
Table Source: Hash Studioz
1. Wifi
It is one of the IoT communication protocols, best suitable for LAN — a computer network that
interconnects computers within a limited area — environments, allowing for fast data transfer. It uses
internet protocols (IP) to communicate between endpoint devices.
2. Bluetooth
Bluetooth is a protocol used for short-range communication and exchanging of small amounts of data
for personal products like smartwatches or wireless speakers.
3. Zigbee
Zigbee’s advantage comes from low power consumption, wireless control, security, and scalability.
Applications such as wireless thermostats and lighting systems are examples of devices using Zigbee
for connection.

4. MQTT
MQTT handles the transfer of light and simple data from sensors to applications and middleware. It
offers a reliable connection and is bandwidth-friendly.
What is GSM?
GSM (Global System for Mobile Communications, originally Groupe Spécial Mobile), is a standard
developed by the European Telecommunications Standards Institute (ETSI).
It was created to describe the protocols for second-generation (2G) digital cellular networks used by
mobile phones and is now the default global standard for mobile communications – with over 90%
market share, operating in over 219 countries and territories.
- Advertisement -

What is GPRS?
General Packet Radio Service (GPRS) is a packet-oriented mobile data service on the 2G and 3G cellular
communication system’s global system for mobile communications (GSM).
GPRS was originally standardized by European Telecommunications Standards Institute (ETSI) in
response to the earlier CDPD and i-mode packet-switched cellular technologies. It is now maintained
by the 3rd Generation Partnership Project (3GPP).
What is GSM Module?
A GSM module or a GPRS module is a chip or circuit that will be used to establish communication
between a mobile device or a computing machine and a GSM or GPRS system. The
modem (modulator-demodulator) is a critical part here.
SIM900 GSM
Module
These modules consist of a GSM module or GPRS modem powered by a power supply circuit and
communication interfaces (like RS-232, USB 2.0, and others) for computers.
A GSM modem can be a dedicated modem device with a serial, USB, or Bluetooth connection, or it can
be a mobile phone that provides GSM modem capabilities.
Difference between GSM/GPRS Modems, Modules, and Mobiles
A GSM module or GPRS modules are similar to modems, but there’s one difference: A GSM/GPRS
Modem is external equipment, whereas the GSM/GPRS module is a module that can be integrated
within the equipment. It is an embedded piece of hardware.
A GSM mobile, on the other hand, is a complete system in itself with embedded processors that are
dedicated to providing an interface between the user and the mobile network.
Understanding Modems
Wireless modems generate, transmit or decode data from a cellular network, in order to establish
communication.
A GSM/GPRS modem is a class of wireless modems, designed for communication over the GSM and
GPRS network. It requires a SIM (Subscriber Identity Module) card just like mobile phones to activate
communication with the network. Also, they have IMEI (International Mobile Equipment Identity)
numbers similar to mobile phones for their identification.
1. The MODEM needs AT commands, for interacting with the processor or controller, which are
communicated through serial communication.
2. These commands are sent by the controller/processor.
3. The MODEM sends back a result after it receives a command.
4. Different AT commands supported by the MODEM can be sent by the
processor/controller/computer to interact with the GSM and GPRS cellular network.
Functions of Modem
 Read, write and delete SMS messages.
 Send SMS messages.
 Monitor the signal strength.
 Monitor the charging status and charge level of the battery.
 Read, write and search phone book entries.
What is a Mobile Station?
A mobile phone and Subscriber Identity Module (SIM) together form a mobile station. It is the user
equipment that communicates with the mobile network. A mobile phone comprises Mobile
Termination, Terminal Equipment, and Terminal Adapter.
Mobile Termination is interfaced with the GSM mobile network and is controlled by a baseband
processor. It handles access to SIM, speech encoding and decoding, signaling, and other network-
related tasks.
Terminal Equipment is an application processor that deals with handling operations related to keypads,
screens, phone memory, and other hardware and software services embedded into the handset.
The Terminal Adapter establishes communication between the Terminal Equipment and the Mobile
Termination using AT commands. The communication with the network in a GSM/GPRS mobile is
carried out by the baseband processor.
Applications of GSM Module or GPRS Module
The GSM/GPRS module demonstrates the use of AT commands. They can feature all the functionalities
of a mobile phone through a computer like making and receiving calls, SMS, MMS, etc. These are
mainly employed for computer-based SMS and MMS services.
GSM Example: Sending SMS using GSM
What is AT Command?
They are known as AT commands because every command line starts with “AT” or “at”. AT commands
are instructions used to control a modem. AT is the abbreviation of ATtention.
GSM/GPRS modems and mobile phones support an AT command set that is specific to the GSM
technology, which includes SMS-related commands like AT+CMGS (Send SMS message), AT+CMSS
(Send SMS message from storage), AT+CMGL (List SMS messages) and AT+CMGR (Read SMS
messages).
Note that the starting “AT” is the prefix that informs the modem about the start of a command line. It
is not part of the AT command name.
For example, D is the actual AT command name in ATD and +CMGS is the actual AT command name in
AT+CMGS. However, some books and websites use them interchangeably as the name of an AT
command.
Tasks that can be done by AT Commands
Here are some of the tasks that can be done using AT commands with a GSM/GPRS modem or mobile
phone:
 Get basic information about the mobile phone or GSM/GPRS modem. For example, the name
of the manufacturer (AT+CGMI), model number (AT+CGMM), IMEI number (International
Mobile Equipment Identity) (AT+CGSN), and software version (AT+CGMR).
 Get basic information about the subscriber. For example, MSISDN (AT+CNUM) and IMSI
number (International Mobile Subscriber Identity) (AT+CIMI).
 Get the current status of the mobile phone or GSM/GPRS modem. For example, mobile phone
activity status (AT+CPAS), mobile network registration status (AT+CREG), radio signal strength
(AT+CSQ), battery charge level, and battery charging status (AT+CBC).
 Establish a data connection or voice connection to a remote modem (ATD, ATA, etc).
 Send and receive a fax (ATD, ATA, AT+F*).
 Send (AT+CMGS, AT+CMSS), read (AT+CMGR, AT+CMGL), write (AT+CMGW) or delete
(AT+CMGD) SMS messages and obtain notifications of newly received SMS messages
(AT+CNMI).
 Read (AT+CPBR), write (AT+CPBW) or search (AT+CPBF) phonebook entries.
 Perform security-related tasks, such as opening or closing facility locks (AT+CLCK), checking
whether a facility is locked (AT+CLCK), and changing passwords (AT+CPWD).
(Facility lock examples: SIM lock [a password must be given to the SIM card every time the
mobile phone is switched on] and PH-SIM lock [a certain SIM card is associated with the mobile
phone. To use other SIM cards with the mobile phone, a password must be entered.])
 Control the presentation of result codes/error messages of AT commands. For example, you
can control whether to enable certain error messages (AT+CMEE) and whether error messages
should be displayed in numeric format or verbose format (AT+CMEE=1 or AT+CMEE=2).
 Get or change the configurations of the mobile phone or GSM/GPRS modem. For example,
change the GSM network (AT+COPS), bearer service type (AT+CBST), radio link protocol
parameters (AT+CRLP), SMS center address (AT+CSCA), and storage of SMS messages
(AT+CPMS).
 Save and restore configurations of the mobile phone or GSM/GPRS modem. For example, save
(AT+CSAS) and restore (AT+CRES) settings related to SMS messaging such as the SMS center
address.
Note:
Mobile phone manufacturers usually do not implement all AT commands, command parameters, and
parameter values in their mobile phones.
Also, the behavior of the implemented AT commands may be different from that defined in the
standard. In general, GSM/GPRS modems designed for wireless applications have better support of AT
commands than ordinary mobile phones.
In addition, some AT commands require the support of mobile network operators. For example, SMS
over GPRS can be enabled on some GPRS mobile phones and GPRS modems with the +CGSMS
command (command name in text: Select Service for MO SMS Messages).
But if the mobile network operator does not support the transmission of SMS over GPRS, you cannot
use this feature.
Interface a Mobile Phone with the Microsoft Windows Platform
Windows (XP and lower versions) comes with an application called HyperTerminal for data
communication through the serial port of the computer. The interfacing of the GSM module or GPRS
module with the serial port of the computer involves the following steps:
1. Connect the RS-232 port of the GSM module with the serial port of the computer. Insert a SIM
card in the module.
2. Open HyperTerminal from Start -> All Programs -> Accessories -> Communications ->
HyperTerminal.
3. Enter a name for the connection and press OK.
4. Now select the communication port (COM) at which the GSM module is connected.
5. Create a new connection set on HyperTerminal. Set parameters, like baud rate as 9600,
handshaking mode as none, parity bit as none, stop bit as 1, and data bit as 8.

You might also like