Wednesday, July 18, 2018

IOT Experiment using Raspberry Pi and other Devices

Test LED working or not by giving to Power.
If working remove and place it in GPIO Pin


led             anode            cathode
        resistor one end    gnd(6 or 9 or 14)
resistor other end: GPIO PIN(12,11)


https://youtu.be/CUCkzxIkZ80


->Led Anode(LargeLeg)with Resister 1 Leg
LED Cathode (Small Leg) with GND
Register another leg with GPIO

Code:-1
To import Raspberry from python
import RPi.GPIO       //Using library's in Commands
import time   //for giving delay
import RPi.GPIO as h //Short cut for reusing reducing length
h.setwarnings(False)  //to avoid warinings
led=12
h.setmode(h.BOARD)  //Board Mode (Sequence Numbers) or BCM MODE   RED GREEN
h.setup(led,h.OUT)
h.output(led,1)
print("led on")
time.sleep(5) //given delay for lite to glow for every 5 seconds
h.output(led,0)
print("led off")

Code:-2 For Continues looping using while
To import Raspberry from python
import RPi.GPIO       //Using library's in Commands
import time   //for giving delay
import RPi.GPIO as h //Short cut for reusing reducing length
h.setwarnings(False)  //to avoid warinings
led=12
h.setmode(h.BOARD)  //Board Mode (Sequence Numbers) or BCM MODE   RED GREEN
h.setup(led,h.OUT)
while 1:
    h.output(led,1)
    print("led on")
    time.sleep(5) //given delay for lite to glow for every 5 seconds
    h.output(led,0)
    print("led off")
            time.sleep(2)
CTL+C to Stop execution
To Run Same Script in Linux Shell
CTRL+Z to Stop Execution
pwd      // present working directory
ls    //list  of files in directory
mkdir home/pi  //Selecting specific location
To come back from pi top home
cd ..
To run a file
python  Example1.py


Wednesday, July 11, 2018

IOT Enabling Technologies :

IOT Enabling Technologies :

IOT enabled by several technologies including wireless sensor networks,cloud
computing ,Big Data analytics,embedded systems,security protocols and
architectures, communication protocols,web services,mobile internet,and
semantic search engines.

 Wireless Sensor Networks

A wireless sensor network (WSN)comprises of distributed devices with sensors which
are used tomonitor the environmental and physical conditions. A WSN
consists of a number of end-nodes and routers and a coordinator. End nodes
have several sensors attached to them.End nodes can also act as routers.
Routers are responsible for routing the data packets from end nodes to the
coordinator. The coordinator collects the data from all the
nodes.Coordinatoralso acts as gateway that connects the WSN to the internet.
EX: 1. Weather monitoring system use WSNs in which the nodes collect temperature,
humidity and other data, which is aggregated and analysed.
2. Indoor air quality monitoring systems use WSNs to collect data on the indoor
air quality and concentration of various gases.
3. Smart grids use WSNs for monitoring the grid at various points.
WSNs are enabled by wireless communication protocols such as IEEE 802.15.4. ZigBee
is one of the most popular wireless technologies used by WSNs. ZigBee
specifications are based on IEEE 802.15.4. ZigBee operates at 2.4GHz frequency and
offers data rates upto250 KB/s and range from 10 to 100 meters depending on the
power output and environmental conditions. The power of WSNs lies in their ability
to deploy large number of loe-cost and low-power sensing nodes for continuous
monitoring of environmental and physical conditions. WSNs are self-organizing
networks. Since WSNs have large number of nodes, manual configuration for each
node is not possible. The self-organizing capability of WSN makes the network
robust. In the event of failure of some nodes or addition of new nodes to the network,
the network can reconfigure itself.

Cloud Computing

Cloud Computig isa transformative computing paradigm that involves delivering
applications and services over the internet. Cloud computing involves provisioning of

computing, networking and storage resources on demand and providing these
resources as metered services to the users, in a “pay as you go” model.Cloud
computing services are offered to users in different forms:
(i).Infrastructure-as-a-services(IaaS):IaaS provides the users the ability to
provisioncomputing and storage resources. These resources are provided to the
users as virtual machine instance and virtual storage. Users can start ,stop,
configure and manage the virtual machine instances and virtual storage. Users
can deploy operating systems and appilicationsof their choice on the virtual
resources provisioned in the cloud. The cloud services provider manages the
underlying infrastructure. Virtual resources provisioned by the users are
billedbased on a pay-per-use paradigm.
(ii). Platform-as-a-Service(PaaS):
Paas provides the users the ability to develop and deploy applications in the cloud
using the Development tools, applications programming interfaces, software
libraries and services provided by the cloud service provider. The cloud
service provider manages the underlyingcloud infrastructure including
services, network, operating systems and storage. The users ,themselves,are
responsible for developing, deploying, configuring and managing applications
on the cloud infrastructure.
(iii).Software-as-a-Service(SaaS):
SaaS provides the users a complete software applications or the interface to the
applications itself. The cloud service provider manages the underlying cloud
infrastructure including servers, network, operating systems,storage and
applications software, and the user is unaware of the underlying architecture of
the cloud, Applications are provided to the user through a thin client interface.
SaaS applications are platform independent and can be accessed from various
client devices such as workstations, laptop, tablets and smart-phones running
different operating systems. Since the cloud services provider manages both
the applications and data, the users are able to access the applications from
anywhere.

 Big Data Analytics:

Big data is defined as collections of data sets whose volume, velocity or varity, is so
large that it is difficult to store, manage, process and analyse the data using
traditional database and data processing tools. Big data analytics involves
several steps starting From data cleansing,datamunging, data processing and
visualization.
EX: 1. Sensor data generated by IoT systems such as weather monitoring stations.

2. Data generated by IoT system for location and tracking of vehicles.
3. Data generated by retail inventory monitoring systems.

Characteristics:

1.volume: Through there is no fixed threshold for the volume of data to be
considered as big data, however , typically the term big data is used for
massive scale data that is difficult to store, manage and process using
traditional databases and data processing architectures. The volume of data
generated by modern IT, industrial, and health-care systems for example is
growing exponentially driven by the lowering costs of data storage and
processing architectures and the need to extract valuable insights from the data
to improve business processes, efficiency and service to consumers.
2.Velocity: Velocity is another important characteristic of big data and the primary
reason for exponential growth of data. Velocity of data refers to how fast the
data is generated and how frequency it varies. Modern IT , industrial and other
systems are generating data at increasingly higher speeds.
3.Variety:Varity refers to the forms of the data. Big data comes in different forms
such as structured or unstructured data, including text data, image, audio,
video and sensor data.

 Communication protocols:

Communication protocols form the backbone of IoT system and enable network
connectivity and coupling to applications. Communication protocols allow
device to exchange data over the network. In section 1.2.2 you learned about
various link, network, transport, and application layer protocols. These
protocols define the data exchange formats, data encoding, addressing
schemas for device and routing of packets from source to destination other
functions of the protocols include sequence control , flow control and
retransmission of lost packets.

 Embedded Systems :

An embedded system is a computer system that has computer hardware and software
embedded to perform specific tasks. In contrast to general purpose computers
or personal computers which can perform various types of tasks, embedded
systems are designed to perform a specific set of tasks . Key components of an
embedded system include microprocessor or microcontroller,memory,
networking units, input/output units and storage.
Some embedded system have specialized processors such as digital signal processors,

graphics processors and application specific processors. Embedded system run
embedded operating systems such as real-time operating system. Embedded system
range from low-cost miniaturized devices such ad digital watches to devices such as
digital cameras, point of scale terminals, vending machines, appliances, etc.

Internet Of Things Applications:

IOT Applications:

IoT applications span a wide range of domains including (but not limited to) home,
cities, environment, energy systems, retail, logistics, industry, agriculture, health.

1. Home Automation
2. Cities
3. Environment
4. Energy Systems
5. Retail
6. Logistics
7. Industry
8. Agriculture
9. Health & Lifestyle
1. Home Automation:
a) Smart Lightning:
 Smart lightning for homes helps in saving energy by adapting
the lightning to the ambient conditions and switching ON/OFF
or dimming the lights when needed.
- It is achieved by sensing the human movements and their
environment and controlling lights accordingly.
 Key enabling technologies for smart lightning include :
- Solid state lightning (LED Lights): For this, both spectral
and temporal characteristics can be configured.
- IP- enabled lights
 Wireless- enabled and internet connected lights can be
controlled remotely from IoT applications such as mobile or
web applications.
b) Smart Appliances:
 Modern homes have a number of appliances such as TV’s,
refrigerators, music systems, washer/dryers, etc.

 Managing and controlling these appliances can be
cumbersome; each appliance having its own controls or remote
controls.
 Smart appliances make the management easy and also provide
status information to the user remotely.
Ex:
- Smart Washer/dryers: These are controlled remotely and
notify when washing or drying cycle is completed.
- Smart Thermostats: Allow controlling the temperature
remotely and can learn the user preferences.
- Smart Refrigerators: Keep track of items stored and send
updates to the user when an item is low on stock.
- Smart TV’s: Allow users to search and stream videos and
movies from the internet on the local storage drive.
 Open Remote: It is an open source automation platform for
homes and buildings and works with standard hardware.
Open Remote comprises of 3 components:
- Controller: It manages scheduling and run time
integration between devices.
- Designer: It allows you to create both configurations
for the controller and create user interface designs.
- Control Panels: It allows you to interact with devices
and control them.

c) Intrusion Detection:
 Home intrusion detection system use security cameras and
sensors to detect intrusion and raise alerts.
 Alerts can be in the form of an
- Sms
- Email
- Image grab
- Short video clip
 The cloud controlled intrusion detection system uses location-
aware services where geo- location of each node of a home
automation system is independently detected and stored in the
cloud.
- In the event of intrusions the cloud services alerts the
accurate neighbors or local police.
- In the intrusion detection system based on
UPnP(Universal-Plug-and-Play) technology is the
system uses image processing to recognize the intrusion

and extract the intrusion subject and generate Universal-
Plug-and-Play (UPnP based) instant messaging for
alerts.

d) Smoke/Gas Detectors:
 Smoke detectors are installed in homes and buildings to detect
the smoke that is typically an early sign of fire.
 Smoke detectors use optical detection, ionization or air
sampling techniques to detect smoke.
 Gas Detectors: They can detect the presence of harmful gases
such as carbon monoxide, liquid petroleum gas, etc.
 Alert raised by smart smoke/gas detectors can be in the form of
signals to the user or a fire alarm system and provide visual
feedback (healthy, battery-low, etc.) on its status.

2. Cities:
a) Smart Parking:
 Finding a parking space during the rush hours in crowded cities
can be time consuming and frustrating.
 Smart parking makes the search for parking space easier and
convenient for drivers using sensors.
 Smart parking are powered by IoT systems that detect the
number of empty parking slots and send the information over
the internet to smart parking applications back-ends.
 These applications can be accessed by the drivers from smart
phones, tablets and in – car navigation systems.
 Latest trends in parking like Polycarpou et.al. Describes
parking availability monitoring, parking reservation and
dynamic pricing schemes.

b) Smart Lightning:
 Smart lightning systems for roads, parks and building can help
in saving energy.
 Smart lightning allows lightning to be dynamically controlled
and also adaptive to the ambient conditions.

c) Smart Roads:
 Smart roads equipped with sensors can provide information on
driving conditions, travel time estimates and alerts in case of
poor driving conditions, traffic congestions and accidents.

 Information sensed from the roads can be communicated via
the internet to cloud- based applications and social media and
disseminated to the drivers who subscribe to such applications.

d) Structural Health Monitoring:
 This system uses a network of sensors to monitor the vibration
levels in the structures such as bridges and buildings.
 The data collected from the sensors is analyzed, so it is possible
to detect cracks and mechanical break downs, locate the
damages to a structure and also calculate the remaining life of
the structure.
e) Surveillance:
 Surveillance of infra-structure, public transport and events in
cities is required to ensure safety and security.
 City wide surveillance infra-structure comprising of large
number of distributed and internet connected video surveillance
cameras can be created.
 The video feeds from surveillance cameras can be aggregated
in cloud- based scalable storage solutions.

f) Emergency Response:
 IoT systems can be used for monitoring the critical infra-
structure in cities such as buildings, gas and water pipe lines,
public transport and power sub stations.
 It can help in generating alarms and minimizing their effects on
the critical infra-structure.
 Iot systems for critical infra-structure monitoring enable
aggregation and sharing of information collected from large
number of sensors.
 Response to alert generated by systems such as sensor data,
audio, video feeds can be in the form of alerts send to the
public re-routing of traffic, evacuations of the affected areas.

3. Environment:
a) Weather Monitoring:
 IoT based weather monitoring systems can collect data from a
number of sensors attached(such as temperature, humidity,
pressure etc.)and send the data to cloud based applications and
storage back ends.

 Weather alerts can be send to the subscribed users from such
applications.
 AirPi is a weather and air quality monitoring kit capable of
recording and uploading information about temperature,
humidity, air pressure, light levels, UV levels, carbon
monoxide, nitrogen dioxide and smoke level to the internet.

b) Air Pollution Monitoring:
 IoT based air pollution monitoring systems can monitor
emission of harmful gases(CO2, CO, NO, NO2, etc.) by
factories and automobiles using gaseous metrological sensors.
 A real time air quality monitoring system is presented that
comprises of several distributed monitoring stations that
communicate via wireless with a backend server using machine
to machine communication.
c) Noise Pollution monitoring:
 Due to growing urban development, noise level in cities have
increased and even become alarming high in some cities.
 Noise pollution can cause human hazards for humans due to
sleep disruption and stress.
 Noise pollution monitoring can help in generating noise maps
for cities.
 The data on noise levels from the noise monitoring stations is
collected on severs or in the cloud.
 A smart phone application allows the users to continuously
measure noise levels and send to a central server where all
generated information is aggregated and mapped to a
meaningful noise visualization map.

d) Forest Fire Detection:
 Forest fire can cause damage to natural resources, property and
human life.
 They can be different causes of forest fire including lightning,
human negligence, volcanic eruptions and sparks from rock
falls.
 Early detection of forest fires can help in minimizing the
damage.
 IoT based forest fire detection systems use a number of
monitoring nodes deployed at different locations in a forest.
 Each monitoring node collect measurements on ambient
conditions including temperature, humidity, light levels, etc.

 The system for early detection of forest fires provides early
warning of a potential forest fires and estimate the scale and
intensity of the fire if it materializes.
 The Forest fire detection system uses multi criteria detection
which is implemented by the artificial neural networks (ANN).

e) River Floods Detection:
 River floods can cause extensive damage to the natural and
human resources and human life.
 Early warnings of floods can be given by monitoring the water
level and flow rate.
 IoT based river flood monitoring system use a number of
sensor nodes that monitor the water level and flow rate using
flow velocity sensor.
 monitoring applications raise alert when rapid increase in water
level and flow rate is detected.
 A river flood monitoring system includes a water level
monitoring module, network video recorder module, and data
processing module.
 The flood information is in the form of raw data, predicted
data, and video feed.

4. Energy Systems:
a) Smart Grids:
 Smart grid is a data communications network integrated with
the electrical grid that collects and analyzes data captured in
real-time about power transmission, distribution and
consumption.
 Smart grid technology provides predictive information and
recommendations in utilities, their suppliers, and their
customers on how best to manage power.
 Smart grids use high –speed, fully integrated, two-way
communication technologies for real -time information and
power exchange.
 Storage collection and analysis of smarts grid data in the cloud
can help in dynamic optimization of system operations,
maintenance and planning.
 Cloud-based monitoring of smart grids data can improve
energy using levels via energy feedback to users coupled with
real-time pricing information.

 Condition monitoring data collected from power generation and
transmission systems can help in detecting faults and predicting
outages.

b) Renewable Energy System:
 Due to the variability in the output from renewable energy
sources such as solar and wind integrating them into the grid
can cause grid stability and reliability problems.
 When distributed renewable energy sources are integrated into
the grid, they create power bi-directional power flows for
which the grids were not originally designed.
 IOT based systems integrated with the transformers at the point
of interconnection measure the electrical variables and how
much power is fed into the grid.

c) Prognostics:

 Energy systems have a large number of critical
components that must function correctly so that the
systems can perform their operations correctly. Ex: a
wind turbine has a number of critical components.
 In systems such as power grids, real time information is
collected using specialized electrical sensors called
Phasor Measurement Units (PMU) at the substations.
 The information received from PMUs must be
monitored in real-time for estimating the state of the
system and for predicting failures.
 OpenPDC is a set of applications for processing of
streaming time-series data collected from Phasor
Measurement Units (PMUs) in real-time.
 A generic framework for storage, processing and
analysis of massive machine maintenance data
collecting from a large number of sensors embedded in
industrial machines, in a cloud computing environment
was proposed.

5. Retail:
a)Inventory Management:

 Inventory Management for retail has become
increasingly important in recent years with the
growing competition.
 IOT systems using Radio Frequency Identification
(RIFD) tags can help in inventory management and
maintaining the right inventory levels.

 RIFD tags attached to the products allow them to be
tracked in real-time so that the inventory levels can be
determined accurately and products which are low on
stock can be replenished.

b) Smart payments:

 Smart payment solutions such as contact-less
payment powered by technology
 Near field communication (NFC) is a set of
standards for smart-phones and other devices to
communicate with each other by bringing them
into proximity or by touching them.
 NFC may be used in combination with Bluetooth
where NFC initiates initial pairing of devices to
establish a Bluetooth connection while the actual
data transfer take place over Bluetooth.

c) Smart Vending Machines:

 Smart Vending machine connected to the internet
allow remote monitoring of
- Inventory levels
- elastic pricing of products
- promotions
- contact-less payment using NFC
 Smart phone application that communicates with
smart vending machine using NFC.
 Smart vending machine can reduce the price as the
expiry date nears.
 New product can be recommended to the customer
on the purchase history and preferences.

6. Logistics:
a) Route Generation and scheduling:
 Modern transportation system are driven by data collected from
multiple sources which is processed to provide new services to
the stake holders.
 By collecting large amount of data from various sources and
processing the data into useful information, data driven
transportation system can provide new services such as
advanced route guidance, dynamic vehicle routing, anticipating
customer demands for pickup and delivery problem.

 IoT based systems backed by the cloud can provide fast
response to route generation queries and can be scaled up to
serve a large transportation network.

b) Fleet tracking:
 vehicle fleet tracking systems use GPS technology to track the
locations of the vehicles in real time.
 cloud based fleet tracking systems can be scaled up on demand
to handle large number of vehicles.
 Alerts can be generated in case of deviations in planned routes.
 The fleet tracking system can analyze messages send from the
vehicles to identify unexpected incidences and discrepancies
between actual and planned data so that remedial actions can be
taken.

c) Shipment Monitoring:
 Shipment monitoring solutions for transportation systems allow
monitoring the conditions inside containers.
 Ex: Containers carrying fresh food produce can be monitored to
prevent spoilage of food.
 IoT based shipment monitoring systems use sensors such as
temperature, pressure, humidity for instance to monitor the
conditions inside the containers and send the data to the cloud,
where it can be analyzed to detect food spoilage.
 for fragile products vibration levels during shipments can be
tracked using accelerometer and gyroscope sensors attached to
IoT devices.

d) Remote Vehicle Diagnostics:
 Remote vehicle diagnostic systems can detect faults in the
vehicles or warn of impending faults.
 These diagnostic systems use on-board IoT devices for
collecting data on vehicle operation( such as speed, engine
RPM, coolant temperature, fault code number ) and status on
various sub systems.
 such data can be captured by integrating on-board diagnostic
systems with IoT devices using protocols
such as CAN bus.

OBD systems provide real time data on the status of vehicle
sub systems on diagnostic trouble codes which allows rapidly
identifying the faults in the vehicle.

7. Industry:
a) Machine Diagnosis and Prognosis:

 Machine prognosis refers to predicting the
performance of a machine by analyzing the data on the
current operating conditions and how much deviations
exit from the normal operating conditions.
 Machine Diagnosis refers to determining the cause of a
machine fault.
 IoT plays a major role in both prognosis and diagnosis
of industrial machines.
 Sensors in machine can monitor the operating
conditions such as( temperature and vibration levels).
 A number of methods have been proposed for reliability
analysis and fault prediction in machines.
 Case-based reasoning (CBR) is commonly used method
that find solutions to new problems based on past
experiences.
 This past experience is organized and represented as
cases in a case-base.
 CBR is an effective technique for problem solving in
the fields in which it is hard to establish a quantitative
mathematical model, such as machine diagnosis and
prognosis.
b) Indoor Air Quality Monitoring:

 Monitoring indoor air quality in factories is important
for health and safety of the workers.
 Harmful and toxic gases such as carbon monoxide(CO),
nitrogen monoxide (NO), nitrogen dioxide (NO2), etc.
can cause serious health problems.
 IoT based gas monitoring system can help in monitoring
the indoor air quality using various gas sensors.
 Hybrid sensor system for indoor air quality monitoring
is presented, which contains both stationary sensors( for
accurate reading and calibration) and mobile sensor( for
coverage).

8. Agriculture:

a) Smart irrigation:

 Smart irrigation system can improve crop yields while
saving water
 It use IoT devices with soil moisture sensors to
determine the amount of moisture in the soil and release
the flow of water through the irrigation pipes only in
when the moisture levels go below a predefined
threshold.
 Cultivar's RainCloud is a device for smart irrigation that
uses water values, soil sensors and WiFi enabled
programming computer.

b) Green House Control:

 Green Houses are structures with glass or plastic roofs
that provide conductive environment for growth of
plans.
 The climatologically conditions inside a green house
can be monitored and controlled to provide the best
conditions for growth of plants.
 The temperature, humidity, soil moisture, light and
carbon dioxide levels are monitored using sensors and
the climatological conditions are controlled
automatically using actuation devices( such as valves
for releasing water and switches for controlling fans).

9. Health & Lifestyle:
a) Health and Fitness Monitoring:

 Wearable IoT devices that allows non-invasive and
continuous monitoring of physiological parameters can
help in continuous health and fitness monitoring.
 These wearable devices may can be in various forms
such as belts and wrist-bands.
 The wearable devices form a type of wireless sensor
networks called body area networks in which the
measurements from a number of wearable devices are
continuous send to a master node( such as a Smart-
Phone) which then sends the data to a server or a cloud-
based back-end for analysis and archiving.
 Commonly uses body sensors include: Body
temperature, heart rate, pulse oximeter oxygen
saturation(SPO2), blood pressure,
electrocardiogram(ECG), movement( with
accelerometers), electroencephalogram(EEG).

b) Wearable Electronics:

 Wearable electronics such as wearable gadgets (Smart
watches, smart glasses, Wrist bands, etc.) and fashion
electronics( with electronics integrated in clothing and
accessories,( ex: Google glass or Moto 360 smart
watch) provide various functions and features to assist
us in our daily activities and making us lead healthy
life styles.
 With smart watches the users can search the internet,
play audio or video files, make calls, etc.
 Smart glasses allow users to take photos and record
the videos, get map directions, check flight status,
search internet, etc.
 Smart wrist bands can track the daily exercises and
calories burnt.

PHYSICAL DESIGN OF IOT

PHYSICAL DESIGN OF IOT

1. Things in IOT

 The “things” in IOT usually refers to IOT devices which have unique identities
and can perform remote sensing , actuating and motitoring capabilities.
 IOT devices can

a. Exchange data with other connected devices and applications (directly or
indirectly)
b. Collect data from devices and process the data either locally or
c. Send the data to centralized servers or cloud-based applications back-end for
processing the data,
d. Perform some tasks locally and other tasks within the IOT infrastructure, based
on temporal and space constraints.

 An IOT device may consists of several interfaces for connections to other
devices, both wired and wireless.
i. I/O interfaces for sensors
ii. Interfaces for Internet connectivity
iii. Memory and storage interfaces and
iv. Audio/video interfaces.

 IOT devices can collect various types of data from the attached sensors,such as
temperature, humidity, light intensity.
 The sensed data can be communicated either to other devices or cloud-based
servers/storage.

2.IOT Protocols

Link Layer:
 Link layer protocols determine how the data is physically sent over the network’s
physical layer or medium.
 The scope of the link layer is the local network connection to which host is
attached.

 Hosts on the same link exchange data packets over the link layer using link layer
protocols.
I. 802.3 - Ethernet :
 IEEE 802.3 is a collection of wired ethernet standards for the link layer.
 The shared medium in Ethernet can be a coaxial cable, twisted-pair wire or
optical fiber.
 The shared medium carries the communication for all the devices on the
network.







II. 802.11 - WIFI :
 IEEE 802.11 is a collection of wireless local area network(WLAN)
communication standards.
 These standards provide data rates from 1Mb/s to 6.75 Gb/s.

III. 802.16 - WiMax :

 It is a collection of wireless broadband standards, including extensive
descriptions for the link layer.
 WiMax standards provide data rates from 1.5 Mb/s to 1Gb/s.
IV. 802.15.4 - LR-WPAN :
 IEEE 802.15.4 is a collection of standards foe low-rate wireless personal area
networks(LR-WPANs).
 These standards form the basis of specifications for high level communication
protocols such as ZigBee.
 This provides data rates from 40Kb/s to 250kb/s.






V. 2G/3G/4G - Mobile communication:
 There are different generations of mobile communication standards including
second generation(GSM and CDMA), third generation(UMTS and CDMA200),
fourth generation(LTE).
 Iot devices based on these standards can communicate over cellular networks
 Data rates for these standards range from 9.6Kb/s upto 100Mb/s.
Network/Internet Layer :
 The network layers are responsible for sending of IP datgrams from the source
network to the destination network.
 This layer performs the host addressing and packet routing.

 The datagrams contain the source and destination address whichare used to route
them from source to destination across multiple networks.

I. IPv4
 Internet Protocol version 4 is the most deployed internet protocol that is used to
identify the devices on a network using a hierarchical addressing scheme.

 It uses a 32-bit address scheme that allows total of 2 power 32address.

II. IPv6
 It is the newest version of internet protocol and successor to IPv6.
 IPv6 uses 128-bit address scheme that allows total of 2 power 128 addresses.

III. 6LoWPAN
 IPv6 over Low power Wireless Personal Area Networks(6LoWPAN) brings IP
protocol to the low power devices which have limited processing capability.
 It operates in the 2.4Ghz frequency range and provides data transfer rates of
250Kb/s.
Transport Layer
 It provide end-to-end message transfer capability independent of the underlying
network.
 The message transfer capability can be set up on connections, either using
handshakes or without handshakes/acknowledgements.
 It provides functions such as error control, segmentation, flow control and
congestion control.

I.TCP
 Transmission Control Protocol is the most widely used transport layer protocol,
that is used by web browsers, email programs and file transfer.

 It also provides error detection capability so that duplicate packets can be
discarded and lost packets are retransmitted.

II. UDP
 UDP is a connectionless protocol.
 It is useful for time-sensitive applications that have very small data units to
exchange and do not want the overhead of connection setup.
 It is a transaction oriented and stateless protocol.
 It does not provide guaranteed delivery, ordering of messages and duplicate
elimination.
Application Layer
 It defines how the applications interface with the lower layer protocols to send the
data over the network.
 Application layer protocols enable process-to-process connections using ports.

1. HTTP
 Hypertext Transfer Protocol(HTTP) is the application layer protocol that forms
the foundation of the WWW.
 The protocol follows a request-response model where a client sends requests to a
server using the HTTP commands.
 It is a stateless protocol and each HTTP request is independent of the other
requests.

2. CoAP
 Constrained Application Protocol(CoAP) is an application layer protocol for
machine-to-machine(M2M) applications.
 Meant for constrained environments with constrained devices and constrained
networks.
 CoAP is designed to easily interface with HTTP.

3. WebSocket
 WebSocket protocol allows full-duplex communication over a single socket
connection for sending messages between client and server.
 It is based on TCP and allows streams of messages to be sent back and forth.

4. MQTT
 Message Queue Telemetry Transport(MQTT) is a light weight messaging.
 It is based on publish-subscribe model.
 It uses a client-server architecture where client connects to the server and
publishes messagesto topics on the serever.

5. XMPP
 Extensible Messaging and Presence Protocol(XMPP) is a protocol for real-time
communication and streaming XML data between entities.
 XMPP allows sending small chunks of XML data from one network entity to
another.
 It is a decentralized protocol.
 It uses a client-server architecture.

6. DDS
 Data Distribution Service(DDS) is a data-centric middleware standard for device-
to-device or machine-to-machine communication.
 It uses a publish-subscribe model where publishers create topics to which
subscribers can subscribe.

 It provides quality-of-service control and configurable reliability.

7. AMQP
 Advanced Message Queuing Protocol(AMQP) is an open application layer
protocol for business messaging.
 It supports both point-to-point and publisher/subscriber models.
 AMQP brokers receive messages from publishers and route them over
connections to consumers.

M2M Machine to Machine

Machine to Machine


Machine to Machine refers to networking of machines for the purpose of remote monitoring and
control and data exchange. Figure 3.1 shows the end to end architecture for M2M systems
comprising of M2M area networks, communication networks and application domain. An M2M
area network comprises of machines which have embedded hardware modules for sensing ,
actuation and communication, 6LoWPAN, IEEE 802.15.4 etc. These communication protocols
provide connectivity to remove M2M area networks. The communication network can use either
wired or wireless networks. While the M2M area network use either proprietary or non IP based
communication protocols, the communication networks use IP based networks. Since non IP
based protocol are used within M2M area network, the M2M nodes within one network cannot
communicate with nodes in an external network to enable the communication between remote
M2M are networks, M2M gateways are used .
Figure 3.2 shows a block diagram of an M2M gateway. The communication between the M2M
nodes and the M2M gateway is based on the communication protocols which are native to the
M2M area network. The M2M gateway performs protocol translation to enable IP connectivity
for M2M area network. M2M gateway acts as a proxy performing translations from /to native
protocols to/ from internet protocol(IP). With an M2M gateway, each node in an M2M area
network appears as a virtualized node for external M2M area network.
The M2M data is gathered into point solutions such as enterprise applications, service
management applications, or remote monitoring applications. M2M has various applications
domains such as smart metering, home automation, industrial automation, smart grids, etc. M2M
solutions designs or specific to the M2M application domain .



Tuesday, July 10, 2018

Difference between IoT and M2M

Difference between IoT and M2M
The differences between M2M and IoT are described as follows:
  • Communication protocols: M2M and IoT can differ in how the communication between the machines of devices happens. M2M uses either proprietary or non-IP based communication protocols for communication within the M2M area networks. Commonly uses M2M protocols include ZigBee, Bluetooth, ModBus, M-Bus, Wireless M-Bus, Power Line Communication (PLC). 6LoWPAN, IEEE 802.15.4, Z-Wave, etc.
             The focus of communication in IoT is usually on the protocols above the network layer such as HTTP, CoAP, WebSockets, MQTT, XMPP, DDS, AMQP, etc.,
  • Machines in M2M vs Things in IoT: The “Things” in IoT refers to physical objects that have unique identifiers and can sense and communicate with their external environment or their internal physical states. The unique identifiers for the things in IoT are the IP addresses. Things have software components for accessing, processing, and storing sensors information, or controlling actuators connected. IoT system can have heterogeneous things. M2M systems, in contrast to IoT, typically have homogeneous machine types within an M2M area network.
  • Hardware vs software Emphasis: while the emphasis of M2M is more on hardware with embedded modules, the emphasis of IoT is more on software. IoT devices runs specialize software for sensor data collections, data analysis and interfacing with the cloud through IP-based communication. Figure 3.4 shows various components of IoT system include the things, the internet, communication infrastructure and the applications.
  • Data connections and analysis: M2M data is collected in a point solutions and often in on-premises  storage infrastructure in contrast to M2M, the data in IoT is collected in the cloud. Figure:3.5 shows the various IoT-levels, and the IoT components deployed in the cloud. The analytics component analyzes the data and the stores the results in the cloud database. The IoT data and analysis results are visualized with the cloud-based applications. The centralized controller is aware of the status of all the end nodes and sends control commands to the nodes. Observer nodes can process information and use it for various applications, however, observer nodes do not perform any control functions.
  • Applications: M2M data is collected in point solutions anda can be accessed by on-premises applications such as diagnosis applications, service management applications, and on-premises enterprise applications. IoT data is collected in the local and can be accessed by cloud applications such as  analytics applications, enterprise applications, remote diagnosis and management applications, etc. Since the scale of data collected in IoT is so massive, cloud-based real-time and batch data analysis frameworks are used for data analysis.


      communication in IoT is IP-based whereas M2M uses non-IP based networks. Communication within M2M area networks is based on protocols below the network layer whereas IoT is based on protocols above the network layer.

IOT CHARACTERISTICS

Definition:

A dynamic global network infrastructure with self configuring capabilities based on standard and interoperable communication protocols where physical and virtual “things” have identities ,Physical attributes and virtual personalities and use intelligent interfaces and are seamlessly integrated into the information network, often communicate data associated with users and their environments.


History of IOT

The concept of the Internet of Things first became popular in 1999, through the Auto-ID centre at MIT and related market-analysis publications. Radio –frequency identification (RFID) was seen as a prerequisite for the IOT at that point. If all objects and people in daily life were equipped with identifiers, computers could manage and inventory them. Besides using RFID, the tagging of things may be achieved through such technologies as near field communication, bar codes, QR codes, Bluetooth, and digital watermarking.

How it works?

Internet of things is not the result of a single newel technology, instead, several complementary technical developments provide capabilities that taken together help to bridge the gap between the virtual and physical world.
These capabilities include:
1. Communication and cooperation
2. Addressability
3. Identification
4. Sensing
5. Actuation
6. Embedded information processing
7. Localization
8. User interfaces

Characteristics of IOT

The following are the characteristics of IOT
1. Dynamic & Self-Adapting
2. Self-Configuring   
3. Interoperable Communication protocols
4. Unique Identity
5. Integrated into Information Network

DYNAMIC AND SELF ADAPTING
----------------------------------------------------
IOT devices and systems may have the capability to dynamically adapt with the changing contexts and take actions based on their operating conditions, users context or sensed environment. For example, consider a surveillance system comprising of a number of surveillance cameras. The surveillance cameras can adapt their modes based on whether it is day or night. Cameras could switch from lower resolution to higher resolution modes when any motion is detected and alert nearby cameras to do the same in this example, the surveillance system is adapting itself based on the context and changing condition

SELF CONFIGURING
---------------------------------
Iot devices may have self configuring capability, allowing a large number of devices to work together to provide certain functionality. These devices have the ability configure themselves, setup the networking, and fetch latest software upgrades with minimal manual or user intervention.

INTEROPERABLE COMMUNICATION PROTOCOLS
---------------------------------------------------------------------------------
Iot devices may support number of interoperable communication protocols and can communicate with other devices and also with the infrastructure.

UNIQUE IDENTITY
------------------------------
Each iot device has a unique identity and a unique identifier.iot systems may have intelligent interfaces which adapt based on the context, allow communicating with users and the environmental contexts.iot devices interfaces allow users to query the devices, monitor their status, and control them remotely, in association with the control, configuration and management infrastructure.
INTEGRATED INTO INFORMATION NETWORK
--------------------------------------------------------------------------
IOT devices are usually integrated   into the information network that allows them to communicate and exchange data with other devices and systems.iot devices can be dynamically discovered in the network, by  other devices and/or the network, and have the capability to describe themselves to other devices or user applications. For example, a weather monitoring node can describe its monitoring capabilities to another connected node so that they can communicate and exchange data. Integration into the information network helps in making iot system “smarter” due to collective intelligence of the individual devices in collaboration with the infrastructure. thus, the data from a large number of connected weather monitoring  iot nodes can be aggregated and analyzed to predict the weather.

Raspberry pi Environment Setup


Raspberry pi Environment Setup


            Software’s needed
ü  SD Card Formatter-----to Format SD Card  
ü  Etcher--------------------to Flash  2018-06-27-raspbian-stretch  
                                                                              Disc Image with SD Card 
ü  Raspbian  Stretch with Desktop
Hardware Devices needed
o   SD Card
o   Raspberry pi3 Model B
o   USB Cable for Power Supply to  Raspberry pi3 Model B
o   HDMI Cable to Connect with Desktop/LCD /Laptop
o   Power Supply Cable to Desktop/ LCD

Steps to Download SD Card Formatter
  1. ·        Launch Any Browser {Chrome ,IE,FF}
  2. ·        Navigate to   https://www.download3k.com/Install-SDFormatter.html
  3. ·        Now click on Developer Link1 to Download
  4. ·        Finally you will be able to get  SD_CardFormatter0500SetupEN.exe File
  5. ·        Double Click on  SD_CardFormatter0500SetupEN.exe File
  6. ·        Click Next and Accept License Agreement\
  7. ·        Click Next Until Installation get Completed 
How to Format SD using SD Card Formatter
·        Take new SD card with minimum Capacity of 16 GB
·        Insert it into Card Reader 
·        Plug-in the Card Reader into USB Port of your Computer
·        Even though it is new Memory Card
·        Format the Memory Card using SD Card Formatter Software
·        Double Click on  SD_CardFormatter  Icon Available on your Desktop
·        Select the Location where  your  Card Reader is Plugged in  your System {Removable Disk D/E/F…}
·        Then Enable Quick Format  Radio Button
·        Click on Format Button
·        It takes microseconds to complete Formatting
·        Now Close the  SD_CardFormatter   window

 Steps to Download  Raspbian  Stretch
  1. ·        Launch Any Browser {Chrome,IE,FF}
  2. ·        Navigate to https://www.raspberrypi.org/downloads/raspbian/
  3. ·        Go to  Raspbian  Stretch with Desktop     Image with desktop based on Debian Stretch
  4. ·        Click on Download ZIP
  5. ·        It  takes min 50 minuts for Completion of Download
  6. ·        Finally you will get Zip File
  7. ·        Place it in your  Personal Folder
  8. ·        Extract the Zip  and you will be able to see Image File 

How to Download  Etcher-Setup-1.4.4-x86
·        Launch Any Browser {Chrome,IE,FF}
·        Navigate to https://etcher.io/  
·        Check your System Operating System Bit Size
ü Suppose if  it is 32bit Windows OS
ü Then Choose Etcher  for Windows x86 (32-bit) (Portable)  from the Dropdown  Download  for Windows
ü Suppose if  it is 64bit Windows OS
ü Then Choose Etcher  for Windows x64  (64-bit) (Portable)  from the Dropdown  Download  for Windows
·        Now Click on  Download  for Windows
·        Finally you will be able to see  Etcher-Setup-1.4.4-x86.exe File
·        Move  the  Etcher-Setup-1.4.4-x86.exe File into  your Personal Folder
·        Double Click  on  Etcher-Setup-1.4.4-x86.exe File
·        Click Run Button
·        Accept the License Agreement
·        Wait Until  Installation gets Completed


How to Flash SD card with Image with desktop based on Debian Stretch
·        After Formatting SD Card
·        Open  Etcher Icon which is available on Desktop after Successful Installation of  Etcher
·        Etcher window will be opened  after Double click on Etcher Icon
·        Click on    Select Image
·        Navigate to Location where you placed  Image
·        After Selecting  Image  Click  on  MXT –USB S…SB Device
·        Select your SD Card as Location {Removable Disk E/D/F…}
·        After Selecting SD Card now Click on Flash
·        It takes 15Minutes of time to Complete Flash

Raspberry pi  setup
  • After Completion of Formatting  SD Card and Flashing SD card with Image 
  • Place the SD card into the SD card  port of  Raspberry pi   Device
  • Connect Power Supply Cable to Raspberry pi
  • Now Connect the Raspberry pi Device to Desktop/Laptop/LCD using HDMI Cable

ü  Now use shortcut Control+ALT+T  will get  pi@raspberrypi Display
ü  Click on Icon Raspberry{Start Option}
ü  Supported by Raspberry pi
o   Supports different Programming Languages
o   Supports Lib Office   {MS Office}
o   Supports  Internet Browser
ü  To set Date and Time
o   Go to Preferences---we do all setup (Keyboard, Time...ie)
ü  To change Language
o   By default UK Keyboard
o   To change language
o   Preferences
o   Raspberry Pi Configuration
o   Localization
o   US
o   English
o   Click Ok for Reboot
ü  To use, Camera,I2C you have to enable in Interface.








Internet Of Things

Explain Configuring Raspberry pi ?             Software’s needed ü    SD Card Formatter-----to Format SD Card   ü    Etcher--...