Professional Documents
Culture Documents
UNIT_II PART-II
BACnet
BACnet (Building Automation and Control Network) is a data communications protocol that
defines the services used to communicate between building automation end-devices and building
control systems.
A data communication protocol is a set of rules governing the exchange of data over a computer
network that covers everything from what kind of cable to use to how to form a particular request
or command in a standard way.
The standard itself is now controlled by the ANSI (American National Standards Institute) and
ASHRAE (American Society of Heating Refrigeration and Air-Conditioning Engineers) Standard
135- 1995.
The intent of this open standard is to allow building owners the opportunity to pick and choose
BACnet-compliant equipment from various vendors.
BACnet
BACnet
“Building Automation and Control Networks” (BACnet) is a data transfer
protocol for building automation and control. BACnet simplifies communication
between products from different manufacturers within building automation.
The protocol allows equipment such as air conditioning units, pumps and ventilation devices to
communicate with a programmable logic controller (PLC). This creates buildings with a high
degree of automation
Objects: A Collection of Information related to a particular function
that can be uniquely identified and accessed over a network in a
standardized way.
BACnet device
Every BACnet device contains a device object that defines certain device
information, including the device object identifier or instance number.
Each object type has a defined list of properties. The value of each property
identifies the uniqueness of each object such as the present value of an
analog input object.
Devices provide services to other devices which can vary based upon the
complexity of the device.
BACnet devices are classified by their device profile which is based upon the
services that the device can offer.
Device profiles can range from a simple Smart Sensor (B-SS) to a complex
Building Controller (B-BC).
Typical objects include Analog Inputs, Analog Outputs, Binary Inputs, Binary
Outputs, and more complex objects such as Scheduler. Messages on the
network deal with reading and writing Object Properties.
Other properties associated with an analog input object, for example, include
fault status, reliability, object name, minimum and maximum limits, etc.
BACnet protocol standards define required and optional properties for each
object type.
The manufacturer’s documentation for the BACnet device will list which object
types are included in the device, along with which optional properties are
included in each object.
BACnet includes 54 standard objects that cover many common and generally useful
applications. In addition, there is a mechanism for implementers to create and use
their own non-standard objects that can be easily interoperable with other devices
that choose to use them.
The object-based model has been proven to be both robust and reliable while
providing a high degree of backward and forward compatibility.
A global, independent third party testing and listing program for BACnet devices has
been established.-The BACnet Testing Laboratories.
Every object, has a collection of properties that define the object. Each property
includes at least a name and a value.
A BACnet property conveys information about a BACnet object. Objects have a
collection of properties, based on the function and purpose of the object
Each property contains two pieces of information: a property identifier and the
property’s value.
Property Identifiers are numbers that uniquely identify a given property in the context of
the Object type.
A property’s purpose is to allow other BACnet devices to read information about the
object containing the property, and potentially write (change) a different value to the
property.
Depending on the type of object that the property belongs to, particular object
properties may be optional or required for implementation per the BACnet standard.
Each object is characterized by a set of properties
that describes its behaviour and govern its
operations.
https://www.automatedbuildings.com/news/aug08/articles/cctrls1/080724032404cctrls.htm
Present Value 71
High Limit 77
Low Limit 67
Standard objects
● Binary Input ● Loop
● Binary Output ● Calendar
● Binary Value
● Notification Class
● Analog Input
● Command
● Analog Output
●
● File
Analog Value
● Averaging ● Program
● LifeSafety Zone ● Schedule
● LifeSafety Point ● Trend Log
● Multi-State Input ● Group
● Multi-State Output
● Event Enrollment
● Multi-State Value
● Device
Analog outputs are typically physical outputs that
Analog value points are useful for representing touch the field and often can be overridden by a user.
some part of system logic in a way the user can Valve commands, fan speeds, and boiler fire rate
both see and override. outputs are represented as Analog Outputs.
Examples: Examples:
Examples:
The two types can entail scheduled events for an
● Air handler mode entire day or portions of a day.
● Cooling tower mode (one fan, low; one fan,
high; two fans, low; two fans, high)
BACnet services
BACnet services ● object access (read, write, create,
delete);
service is the mechanism which a building ● device management (discover,
automation system uses to access a property or time synchronization, initialize,
request an action from a BACnet Object.
backup and restore database);
Services are how one BACnet device gets ● alarm and event (alarms and
information from another device, commands a changes of state)
device to perform certain actions or ● file transfer (trend data, program
communicates events to other objects. transfer);
● virtual terminal (human machine
The model of objects and services is realized interface via prompts and menus).
by encoding messages into a stream of ● http://www.bacnet.org/Bibliography/ES-7-96/ES-7-96.
htm
numeric codes that represent the desired
functions or services to be performed.
BACnet services
BACnet services
BACnet services
BACnet services
BACnet services
BACnet services
BACnet Architecture
BACnet Architecture
BACnet Architecture
BACnet Architecture
BACnet Architecture
BACnet Architecture
BACnet Architecture
BACnet LAN Technology
BACnet LAN Technology
BACnet network
BACnet devices communicate to one another over a network.
The 2012 BACnet standard defines seven network types, which serve as the transport for
BACnet messages. The seven supported network types are:
● BACnet/IP
● BACnet MS/TP (Master-Slave/Token Passing)
● BACnet ISO 8802-3 (Ethernet)
● BACnet over ARCNET
● BACnet Point-to-Point (EIA-232 and Telephone)
● BACnet over LonTalk Foreign Frames
● BACnet over ZigBee
BACnet network
The network types encompass the physical and datalink layers of
the protocol. This combination of physical and datalink layers is often
called the MAC (Medium Access Control) layer.
Devices plug directly into Ethernet switches or hubs. This is a fast and high
performance type of LAN, but also the most expensive.
When BACnet/IP is used with multiple IP subnets, then special additional device
functionality called BACnet Broadcast Management Devices (BBMDs) are
required to manage inter-subnet BACnet broadcast messages.
Each device is wired via RS-485 twisted-pair serial cabling, daisy-chained together into
one network.
Communication is based around passing “tokens,” which is a way for devices on the same
MS/TP network to take turns initiating conversations with other devices.
Only master type of devices can have the token and request data or send data without
being specifically requested.
Sensors are sometimes manufactured to operate as slave devices, and they can only send
messages when specifically requested – they never have the token
This LAN type uses EIA-485 twisted pair for signaling up to 4000 feet. It is the most
popular type of BACnet LAN for unitary and application-specific controllers, and is also
the lowest cost.
Baud Rate is the rate at which data is communicated to the devices.
You can configure the MS/TP networks to communicate at the following baud rates:
● 9.6 kbps
● 19.2 kbps
● 38.4 kbps
● 76.8 kbps
All the devices on the MS/TP segment must communicate at the same baud rate.
BACnet can be used directly with Ethernet 8802-3 networks. This MAC type is
comparable to BACnet/IP in terms of cost and speed, but limited to a single
physical infrastructure that does not make use of IP routers.
This MAC type has two forms: 2.5Mbs coax, and 156Kbs over EIA-485. The
ARC156K form has a modest increase in performance compared to MS/TP for a
slight cost difference. A limited number of vendors support BACnet using ARCNET.
BACnet Point-to-Point
This MAC type is only used over dial-up telephone networks. The direct EIA-232
connection style is generally no longer used in favor of direct Ethernet connection.
This MAC is a wireless mesh network generally used with very low-cost devices. It
is typically used as a gateway to ZigBee devices and not as a native BACnet
transport.
Modbus Protocol
The Modbus protocol is a communication protocol that allows devices to
communicate over various types of media, such as serial lines and ethernet. It was
developed in 1979 by Modicon, a company that produced Programmable Logic
Controllers (PLCs), to enable these devices to communicate with each other.
The Modbus protocol is simple and robust, making it a popular choice for industrial
control systems. It's an open standard, meaning it's free for anyone to use and
modify, leading to its widespread adoption throughout the industry.
Components of Modbus Protocol
● Modbus Devices/Machines
Modbus devices or machines are the actual physical devices that communicate
using the Modbus protocol. These devices can be anything from temperature
sensors to motor controllers, and they can be located anywhere from a factory
floor to a remote oil field.
Components of Modbus Protocol
● Modbus Master
● The Modbus master is the device that initiates a Modbus transaction. It sends
a request to a Modbus slave device and waits for a response. The master can
communicate with multiple slaves, and it can request different types of data
from each one.
● Modbus Slave
● A Modbus slave is a device that waits for a request from a Modbus master.
When it receives a request, it will process it and send a response back to the
master. The slave does not initiate communication; it only responds to
requests from the master.
Components of Modbus Protocol
● Data Model and Registers
● The Modbus data model is based on a series of registers. These registers are
simply memory locations in the device that can hold data—they represent
storage area within a device. There are two types of registers:
○ Holding registers: Can be read and written to by a Modbus master.
● Communications in IoT
● Modbus TCP/IP, is used to enable communication between IoT devices,
sensors, and controllers over ethernet networks. Its simplicity and wide
support make it a common choice for IoT communications.
Modbus uses
● Sensor and Actuator Communication
● The Modbus protocol plays a key role in facilitating communication between
sensors and actuators. It provides a standard interface for transmitting data,
such as sensor readings or control signals for actuators. This enables a
centralized control system or PLC to monitor and control a wide variety of
equipment in a coordinated manner. The use of Modbus protocol in sensor
and actuator communication is prevalent in a range of fields, from industrial
machinery to environmental monitoring systems.
KNX
● Bus system for building control.
● all devices in a KNX system use the same transmission method and are able
to exchange data via a common bus network.
● KNX bus system has decentralised structure and there is no need for a
central control unit, because the “intelligence” of the system is spread across
all of its devices.
● In order to transfer control data to all building management components (or
smart home devices/functions), a system is required that avoids the problem
of having isolated devices speaking 'different languages'.
● KNX works by ensuring all components, devices, features and functions of
any building (or outdoor space) communicate via one common language
instantly and remotely.
Building automation system
It enables the interaction and coordination between various devices and systems,
ranging from lighting, heating, ventilation, and air conditioning systems, to more
complex systems like security and energy management.
It is a green cable which is installed in addition to the conventional mains supply during a
new build or renovation project.
All of the various building technology elements are then connected to one another via the
main KNX bus line in accordance with the KNX standard for building automation.
The cable system is then managed by such things as sensors, detectors, parameters, etc. —
which can then be conveniently controlled by end users with a laptop, smartphone or tablet
device.
Installed KNX systems can be accessed via LAN, point to point links, or phone networks for
central or distributed control of the system via computers, tablets and touch screens, and
What is KNX protocol? The KNX protocol is a standardized, open protocol for commercial
and domestic building automation. It enables the integration and programming of a range of
devices from different manufacturers with different applications, including lighting control,
security, audio and video, and energy management.
How does KNX protocol work? KNX works by allowing devices to communicate with each
other over a common system. Devices can be connected via twisted pair, powerline, RF, or
IP/Ethernet. These devices can either be sensors or actuators needed for the control of
building management equipment such as HVAC, lighting, or security systems. The
communication between these devices is based on a decentralized structure where the
devices communicate directly with each other without the need for a central control unit.
KNX infrastructure and KNX smart building systems can be used in almost any
building or outdoor space — from a small house to a large shopping mall or
industrial complex.
● Private homes
● Residential accommodation (apartments, retirement homes, town houses, etc.)
● Offices
● Plazas
● Schools
● Casinos
● Hospitals
● Shopping Malls
● Public buildings and outdoor spaces (government buildings, libraries, council land,
etc).
The Advantages of KNX
● Increased safety
● Economic use of energy during the operation of buildings
● Simple adaptation of the electrical installation to the changing
requirements of the user
● Higher degree of convenience
● future-proof installations
● wide range of available off-the-shelf components from many
manufacturers
● large service network of qualified
contractors/planners/integrators
Communication media
Various communication media can be used for the exchange of data between
devices in a KNX system:
● Twisted Pair Wiring (KNX TP): This is the most commonly used form of KNX
installation. It requires a low-rate transmission of data (9600 bit/sec) over a
twisted pair of wires.
● Power Line (KNX PL): KNX PL uses existing AC electrical wiring for
communication, eliminating the need for separate data cables. It is often used
for retrofit applications where it is difficult to run new cables.
● Radio Frequency (KNX RF): KNX RF is a wireless communication medium
for KNX, ideal for retrofitting or in situations where it is impractical to install
data cables.
● KNX IP – communication via Ethernet
The KNX bus is routed in parallel to the electrical power supply to all
devices and systems on the network linking:
If two devices are sending a telegram at the same time, then inevitably one sender
will transmit a 0 while the other wants to transmit a 1. The device sending the 1
“hears” that a 0 is being transmitted along the bus,and detects the collision.
It is obliged to abort its own data transmission and give priority to the other
transmission.
Connection of bus devices
Bus devices are connected to the data cable via components known as bus
terminals – plugin terminals able to accommodate up to four KNX cables.
The bus terminals make it possible to disconnect devices from the bus without
interrupting the bus line.
KNX powerline
Using the existing electricity cables in a building as the KNX communication
medium is a cost-effective way of retrofitting a building with KNX.
In KNX Powerline (KNX PL) there is no need to lay a dedicated bus cable: the
electricity
cables already installed (one of the three phases + the neutral wire) themselves
become the communication medium.
The data signals are superimposed onto the mains voltage.the power required by
the bus devices comes from the 230 V mains electricity grid.
Phase couplers are used to ensure that data communication can take place via all
three phases, while band-stop filters prevent the propagation of data signals
through the building connection towards the mains grid.
KNX IP
Uses UDP/IP.The existing network infrastructure in the building can be used for
the KNX main and backbone lines.
● Buildings can be monitored and controlled via Ethernet from anywhere in the
world
● Several individual sites can be observed and maintained from a central
location over the internet
● KNX customer installations can be analysed and programmed remotely over
the internet by the designer of the KNX system.
The KNX system uses two Ethernet communication methods – tunneling and
routing – both of which use the UDP protocol.
Tunneling is used to access the bus from a local network or the internet for
purposes of e.g. programming the KNX installation, while routing is used for
exchanging telegrams over an Ethernet network,
(Engineering Tool Software)ETS is to be used to send KNX telegrams in a connection
oriented manner within an IP framework.In tunneling, communication always takes
place via the IP address of the KNXnet/IP device that is being used for tunneling.
A KNXnet/IP router serving as a line coupler for a KNX TP cable will only send a
telegram to the IP side if the corresponding group address appears in the filter table of
the KNXnet/IP router.
For forwarding via Ethernet, the KNX telegrams are individually packed in UDP/IP
telegrams and sent as multicast telegrams. All KNX/IP routers in the network receive
these telegrams simultaneously and use their routing tables to determine whether to
forward the telegram to the connected KNX line.
KNX topology
KNX systems can be added to as desired, and can consist of several KNX
subsystems based on different communication media such as twisted pair wiring
(KNX TP), powerline networking (KNX PL), Ethernet (KNX IP), and radio (KNX
RF)
KNX TP:
Line Couplers on the area line count as bus devices. In practice, area coupling is typically performed using
Line Couplers parameterised as area couplers.
The area line is also called the backbone, so it also needs its own power supply.
The LC00B01KNX KNX line
coupler has been made in a
compact design. It connects two
KNX bus segments (for example, a
KNX line with a KNX area). The
device has a filter table (8k bytes)
and ensures a galvanic isolation
between the lines.
KNX Addressing
Every device in a KNX system is assigned a unique, unambiguous number – its Individual
Address. This consists of three numbers separated by dots.
Physical addresses are needed in order to identify devices clearly, and also to program them.
The numbers depend on the position of the bus device in the topology:
Physical address 2.3.20: bus device 20 in the third line of the second area.
KNX RF
Can be installed virtually anywhere.Provided that they are within range of one
another, any sensor can communicate with any actuator.
Only those receivers paired with the transmitter are able to process telegrams sent
by it.
KNXnet/IP routers can additionally be used to connect entire separate systems
with one another via Ethernet.
It is generally not permitted for these cables to be longer than around 100 m.
For longer installations, special network components are needed to join together
individual network segments.
KNXnet/IP routers (routing) are given the sequential number 0 (like area and line
couplers). KNX IP interfaces (tunneling) can be given any sequential number.
Individual Address 1.5.0: KNXnet/IP router acting as a line coupler, coupling the
fifth line with the main line in the first area.
Modbus
Protocol that is used in many industrial and HVAC installations.
The ModBus/TCP specification, defines an IP-based link layer for ModBus frames.
The slaves take action as specified by the query, or return the requested data to
the master.
https://www.amazon.in/Port-Powered-Industrial-Communication-Anti-surge-Protection/dp/B01CXY9S6M/ref=pd_lpo_147_img_1/261-4
963277-1316620?_encoding=UTF8&pd_rd_i=B01CXY9S6M&pd_rd_r=674f20a5-dba2-4ed5-9120-8c9809455172&pd_rd_w=buM8t&p
d_rd_wg=Yz6Ra&pf_rd_p=5a903e39-3cff-40f0-9a69-33552e242181&pf_rd_r=H7H1848GNS4HR30SBK04&psc=1&refRID=H7H1848
GNS4HR30SBK04
Modbus working
sends a message, and depending on the contents of the message, the slave interprets
Physical slave addressing in the message header is used to define which slave device
should respond to a message. All other nodes on the Modbus network ignore the
Modbus functions perform read and write instructions to the slave’s internal memory
registers to configure, monitor, and control the slave’s inputs and outputs.
MODES
Controllers can be setup to communicate on standard Modbus networks using either of two
transmission modes: ASCII or RTU.
ASCII Mode
When controllers are setup to communicate on a Modbus network using ASCII mode, each
eight-bit byte in a message is sent as two ASCII characters. The main advantage of this mode is
that it allows time intervals of up to one second to occur between characters without causing an
error.
Coding System
Hexadecimal ASCII printable characters 0 ... 9, A ... F
Bits per Byte
1 start bit
7 data bits, least significant bit sent first
1 bit for even / odd parity-no bit for no parity
1 stop bit if parity is used-2 bits if no parity
Error Checking
Longitudinal Redundancy Check (LRC)
RTU Mode (Remote Terminal Unit)
Each eight-bit byte in a message contains two four-bit hexadecimal characters. The main advantage of
this mode is that its greater character density allows better data throughput than ASCII for the same
baud rate. Each message must be transmitted in a continuous stream.
Coding System
Eight-bit binary, hexadecimal 0 ... 9, A ... F.Two hexadecimal characters contained in each
eight-bit field of the message
1 start bit
This protocol primarily uses an RS-232 or RS-485 serial interfaces for communications .
In order to build the Modbus application data unit, the client must initiate a Modbus
transaction. It is the function which informs the server as to which type of action to
perform.
When the Master sends a message to the Slave, it is the function code field which informs
the server of what type of action to perform.
Modbus RTU is a relatively simple serial protocol that can be transmitted via
traditional UART technology. Data is transmitted in 8-bit bytes, one bit at a time, at
baud rates ranging from 1200 bits per second (baud) to 115200 bits per second.
The majority of Modbus RTU devices only support speeds up to 38400 bits per
second.
configuration, input and output data can be written and read from. You should always
refer to the slave’s register map of your device to gain a better understanding of its
overall operation.
The Modbus data model has a simple structure described in four basic data types:
1. Discrete Inputs
2. Coils Outputs
reference types and this data type is further identified by the leading number used in
– Zero (0) based register referencing a message to Read or Write “discrete outputs
or coils”.
registers”.
Modbus RTU Common Starting
address
Data Type name
The complete Modbus TCP/IP Application Data Unit is embedded into the data
field of a standard TCP frame and sent via TCP to well-known system port 502,
which is specifically reserved for Modbus applications.
Modbus TCP/IP clients and servers listen and receive Modbus data via port 502.
Modbus TCP/IP shares the same physical and data link layers of traditional IEEE
802.3 Ethernet and uses the same TCP/IP suite of protocols, it remains fully
compatible with the already installed Ethernet infrastructure of cables, connectors,
network interface cards, hubs, and switches.
A TCP connection is established by the client. Servers cannot initiate TCP
transactions. It is good practice to keep a TCP connection open with a remote
server and not open and close it for each Modbus message.
Some Modbus devices may operate as both clients and servers. two-way
communication is possible with separate connections opened for the client data
flow and the server data flow.
A Modbus client may have many simultaneous TCP connections open at any
given time. It uses a local port to send its message while the remote server
receives this message on well-known port 502.
A client can initiate several Modbus messages with a remote server without
waiting for the end of a previous one. Thus, several Modbus messages can be
sent on the same TCP connection (but not the same PDU). In this case, the
Modbus transaction identifier (of the MBAP header) is used to match requests to
A TCP frame must transport only one Modbus Application Data Unit (ADU) at a
time.
IEEE 802.15.4 provides provides the MAC and PHY layers, leaving the upper layers to
be developed for specific higher later standards like Thread, Zigbee, 6LoWPAN and many
others.
Low power is one of the key elements of 802.15.4 as it is used in many areas where
remote sensors need to operate on battery power, possibly for years without
attention.
The IEEE 802.15.4 standard is aimed at providing the essential lower network layers
for a WPAN. The chief requirements are low-cost, low-speed ubiquitous
communication between devices.
1. The 2.4 GHz ISM band (S-band) worldwide, providing a data rate of 250 kbps
(O-QPSK modulation) and 15 channels (numbered 11–26);
2. The 902–928 MHz ISM band (I-band) in the US, providing a data rate of 40
kbps(BPSK modulation), 250 kbps (BPSK+O-QPSK or ASK modulation) or
250 kbps (ASK modulation) and ten channels (numbered 1–10)
The star topology: data transfers are possible only between the PAN coordinator
and the devices.
The peer to peer topology: data transfers can occur between any two devices.
A 802.15.4 network can be formed of multiple clusters (each having its own PAN
ID) in a tree configuration: the root PAN coordinator instructs one of the FFD to
become the coordinator of an adjacent PAN.
Each child PAN coordinator may also instruct a FFD to become a coordinator for
another PAN, and so on.
Association
6LoWPAN came to exist from the idea that the Internet Protocol could and should be applied
even to the smallest devices, and that low-power devices with limited processing
capabilities should be able to participate in the Internet of Things.
It is connecting more things to the cloud.
There are three types of LoWPANs : Ad-Hoc LoWPANs, Simple
LoWPANs, and Extended LoWPANs.
1) the data exchange between 6LoWPAN devices and the Internet (or other
IPv6 network);
it was believed that using packet data over a low power wireless sensor network would offer
significant advantages in terms of data handling and management.
Because edge routers forward datagrams at the network layer they do not
maintain any application-layer state.
These application gateways must understand any application profiles that may be
used in the network, and any changes to application protocols on the wireless
nodes must also be accompanied by changes on the gateway.
In contrast, IP-based border routers, like the edge router, remain agnostic to
application protocols used in the 6LoWPAN.
This lowers the burden put on the edge router in terms of processing power
thus making it possible to use embedded devices that are lower cost, runs simpler
software and has less complex hardware
6LoWPAN introduces an adaptation layer between the IP stack’s link and
network layers to enable transmission of IPv6 datagrams over IEEE 802.15.4
radio links.
The 6LoWPAN adaptation layer, providing adaptation from IPv6 to IEEE 802.15.4,
also resides in the data link layer.
However, HTTP can still be very useful for communications between 6LoWPAN
and the Internet.
For this reason, the industry and community have developed alternative
application layer protocols, such as the constrained application protocol
(COAP), a message protocol running over UDP with a bit-optimized REST
mechanism very similar to HTTP
There are three main functions of this layer.
The throughput under this standard is limited to 250 kbps, and the frame length is
limited to 127 bytes to ensure low packet and bit error rates in a lossy RF
environment.
IEEE 802.15.4 uses two addresses: a 16-bit short address and an EUI-64
extended address. These addresses reduce header overhead and minimize
memory requirements.
6LoWPAN operates most commonly over multiple hops forming a low-power mesh
network, a fundamental difference from Ethernet- or Wi-Fi-based networks.
Challenges
IPv6 datagrams are not a natural fit for IEEE 802.15.4 networks. Low throughput,
limited buffering and datagrams that are one-tenth of IPv6 minimum MTU make
header compression and data fragmentation a necessity
Since IEEE 802.15.4 is both low power and low throughput, in addition to the use
of RF as media, it is more prone to spurious interference, link failures and
asymmetric links
The 6LoWPAN adaptation layer
When sending data over MAC and PHY layers, an adaptation layer is always
used.
RFC 6282 defines how an IPv6 data frame is encapsulated over an IEEE 802.15.4
radio link.
Header compression, which compresses the 40-byte IPv6 and 8-byte UDP
headers by assuming the usage of common fields.
Fragmentation and reassembly. The data link of IEEE 802.15.4 with a frame
length of maximum 127 bytes does not match the MTU of IPv6, which is 1280
bytes.
Stateless auto configuration is the process where devices inside the 6LoWPAN
network automatically generate their own IPv6 address.
There are methods to avoid the case where two devices get the same address;
this is called duplicate address detection (DAD).
Throughout the 6LoWPAN adaptation layer, the key concept is to use stateless or
shared-context compression to elide header fields. This can compress all
headers (adaptation, network and transport layers) down to a few bytes.
3. Similar to 2, but without knowing the prefix of the external device, that gives an
IPv6 header of 20 bytes.
IPV6 headers
Fragmentation and Reassembly
To enable transmission over radio links packets are fragmented and assembled
with addition of extended information which are latter dropped.
If any fragments are missing (in a mesh-under system) during the reassemble, the
complete packet needs to be re-transmitted.
Therefore, keeping the payload low (includes selecting the appropriate application
level protocols) and using header compression are of the utmost importance.
Routing
Two categories of routing are defined: mesh-under or route-over.
Mesh-under uses the layer-two (link layer) addresses (IEEE 802.15.4 MAC or short address)
to forward data packets; while route-over uses layer three (networklayer) addresses (IP
addresses).
All fragments will be sent to the next hop by mesh routing and finally reach to the
destination. Different fragments of one IP packet might reach the destination via different
route-paths.
If all fragments are received at the destination successfully, the destination’s adaptation layer
reassembles all fragments into an IP packet. The adaptation layer of destination node starts
reconstruction process.
However, any fragment is missing in forwarding process; all fragments of this IP packet are
retransmitted from the source to the destination.
In route-over scheme, each sensor node inside the route path acts as an IP router. The
IP packet is forwarded hop by hop from the source node to the destination node .
The IP packet’s payload is encapsulated with IPv6 header. After that, IP packet is
fragmented by the adaptation layer and all IP fragments will be sent to the next hop
based on routing table.
The next hop has to reassemble them in order to reconstruct the original IP packet in
adaptation layer when all fragments are received successfully. The reconstruction
process starts only when the last fragment arrives.
Once reconstructed, the IP packet will be sent to the network layer. Finally, the IP
packet will be fragmented again and these fragments will be delivered to the nexthop.
However, the retransmission executes only in one-hop distance if there is any fragment
lost in this forwarding process.
Auto configuration and neighbor discovery
In IPv6 it allows a device to automatically generate its IPv6 address without any
outside interaction with a DHCP server or such.
If it does not hear an NA message within a defined timeframe,it assumes that the
address is unique. This procedure is called duplicate address detection,DAD.
Now, to get the network prefix, the host sends out an RS message to the router to
get the correct prefix. Using these four messages, a host is able to assign itself a
worldwide unique IPv6 address.
Security
6LoWPAN takes advantage of the strong AES-128 link layer security defined in IEEE
802.15.4. The link layer security provides link authentication and encryption. In addition to
link layer security, transport layer security (TLS) mechanisms have been shown to work
great in 6LoWPAN systems.
For constrained environments and systems where UDP is chosen as the transport layer
protocol, the RFC 6347 (datagram transport layer security) can be used to provide
security at the transport layer.
However, it should be noted that implementing TLS/DTLS requires the devicet o have
necessary resources, such as a hardware encryption engine to enable the use of
advanced cipher suites, etc.
A device especially developed for this purpose is TI’s CC2538 wireless MCU, which
integrates a powerful ARM® Cortex®-M3 CPU and an IEEE 802.15.4 radio. The device has
up to 512kB Flash and 32kB RAM, and also features a hardware encryption engine capable
of supporting TLS/DTLS.