Upload
amitrana86
View
113
Download
5
Tags:
Embed Size (px)
DESCRIPTION
seminar report home automation over internet
Citation preview
Dr. BABASAHEB AMBEDKAR MARATHWADA UNIVERSITY,
AURANGABAD (M.S.)
“EMBEDDED WEB SERVER”
Submitted by
Pratik R. Adhal
Rakhi Kumari
Krishna Kumar Gupta
Under the guidance of
Prof. Mr. Hemant K. Waghmare
In partial fulfillment of the award of
Bachelor of Engineering (Electronics & Communication Engg.)
Department of Electronics & Communication Engg
Marathwada Institute of Technology, Aurangabad (Maharashtra)
[2010-2011]
CERTIFICATE
This is to certify that the seminar/project report entitled “Embedded Web Server”,
submitted by “Pratik R. Adhal”, “Rakhi Kumari”, “Krishna Kumar Gupta” is the bonafied
work completed under my supervision and guidance in partial fulfilment for the award of
Bachelor of Engineering (Electronics & Communication Engg) of Dr. Babasaheb
Ambedkar Marathwada University, Aurangabad (M.S.).
Place: Aurangabad
Date:
Prof. Mr. H. K. Waghmare
Guide
Dept.of Electronics & Communication Engg
Prof. Mrs. V. M. Kulkarni
Head of Department
Dept.of Electronics & Communication Engg
Prof. Dr. S. G. Tated
Principal
Marathwada Institute of Technology
Aurangabad (M.S.) – 431 005
CONTENTS
List of Symbols i
List of Figures ii
List of Graphs iii
List of Tables iv
Synopsis v
1. INTRODUCTION 1
1.1 Need for Introduction 1
1.2 Any Other Topic 2
1.3 Organization of Report 3
2. LITERATURE SURVEY 4
2.1 Literature Survey 4
3. SYSTEM MODELING 5
3.1 Sub Heading in Title Case 5
3.1.2 Sub-sub heading in sentence case 5
4. PERFORMANCE ANALYSIS 6
4.1 Performance of System 6
5. CONCLUSIONS 7
5.1 Conclusions 7
5.2 Future Scope 8
References
Acknowledgement
Appendix – A
List of Symbols
Symbol Illustration
Φ Pressure Angle Radian
τ Shearing Stress N/mm2
List of Figures
Figure Illustration Page
1.1 Block daigrom 2
2.1 Blockwise circuit diagram 5
2.2 Complete diagram 6
Table of Contents
Chapter 1 Home / Office Automation
1.1 Home Automation1.2 Functions1.3 Objectives of Home Automation1.4 The Real Benefits of Home Automation
Chapter 2 Project Description
2.1 Basic Idea2.2 Telnet2.3 Block Diagram
Chapter 3 Block Diagram 3.1 Block diagram3.2 Components
Chapter 4 Telnet
4.1 Introduction4.2 Ports for Different Purposes4.3 Telneting to your account through the Control Panel 4.4 Telneting to your account through other software 4.5 General Considerations4.6 The Network Virtual Terminal4.7 Standard Presentation of Control Functions
Chapter 5 TCP/IP
5.1 Introduction5.2 Structure of TCP/IP5.3 Main Features of TCP/IP5.4 Operation5.5 Model of Operation5.6 Header Format5.7 Functional Specification
Chapter 6 Microcontroller ARM 7
6.1 Microcontroller ARM 76.2 Important Features And Applications6.3 Memory Architecture6.4 Basic Registers6.5 Addressing Mode6.7 Interrupts6.8 Timers6.9 Serial port Operation
Chapter 7 Level Converter MAX 232
7.1 Introduction
Chapter 8 Home Automation Appliances
8.1 Introduction8.2 Different Home Automation Appliances
Chapter 9 Conclusions
9.1 Topic Background9.2 Project Scope9.3 Objective of System9.4 Functionality of System
CHAPTER 1
HOME / OFFICE AUTOMATION
1.1 Home / Office Automation
Automation is the process of automatically performing everyday functions around the home
to save you time, energy, money and at the same time offering improved security.
The automation’ is performed by a central controller. This can be either a standalone unit or a
piece of software on a PC. Both options have their advantages. The controller can carry out a
number of functions:
1.2 Functions
Send signals to switch lights and appliances on or off. Open and close contacts to operate
high and low voltage devices. Schedule and initiate events, such as watering the garden Issue
and accept infra red commands Interface with other systems, i.e. X 10, telephone, computer,
heating etc.
Home automation is anything that gives you remote or automatic control of things in &
around the home. The systems that you can control include: Lighting, Appliances, Heating
and cooling, Security and monitoring systems, Entertainment (home audio and video),
Communications (telephones and intercoms, internet), Lawn sprinklers, Curtain movements,
Pool filter pump, Spa heater, Filtration unit, Gate/garage door motor, Shade motor control,
Roof sprinklers, Electric strikes, Keyless entry etc.
This central controller can be accessed and controlled through interfaces like keypad, wired
or wireless touch-screens (with/without video), universal remotes, mobile devices. Home
automation provides a more convenient & elegant atmosphere for the family to compliment
and match the lifestyle. Everyone in the family experiences the comfort of automation with
added convenience through integrated control of scheduled common lifestyle activities
performed every day. An automated home can provide security, temperature, lighting, and
audio control for comfort, convenience, and safety. It creates reliable and coordinated
controls to operate home devices automatically for simplifying operations.
Home automation saves your time and effort by controlling you home automatically for
performing routine functions such as watering your grass, or turning off all lights, setting the
thermostat to economy mode, control scheduled appliances operation and arming the security
system when you retire for the night
Home automation provides you with the comfort of whole home audio/video integration so
that any source could be placed anywhere in a home and still be enjoyed everywhere in a
home.
Home automation provides you pro-active home security so that you can look in on your
home remotely from anywhere in the world, or that your home will phone you if it finds
anything suspicious, or that a fire will alert your home to wake you, shut down the gas and
ventilation system, turn on a lighting path for your escape, and automatically phone the
fire/police department. In other words it integrates your alarm system with other home
systems for a response to intrusion that meets your needs of enhanced Safety.
The term 'home automation' is now acknowledged as covering most I.T., automation,
communication and wiring aspects of our homes. Most of these functions can be installed
independently of each other, but the real benefits of the automated home are realized when
these different aspects communicate with each other. For example, having two PC’s
networked together in the home, giving both users access to the internet may seem like the
forefront of technology, but imagine if they were tied into our house wiring and could turn
lights and appliances on and off automatically when we are away from home, even via the
internet. Imagine that the PC was networked into our security system and could display
images from our home security cameras onto our computer screen at work. Imagine that your
security system was tied into your telephone and could ring your mobile in the event of a
burglary, you could even talk to visitors to your door from anywhere in the world.
1.3 Objectives of Home Automation
Home Automation Saves Money by lowering your monthly utility bills with the remote &
scheduled control of lights, appliances, sprinklers and your air conditioning
Never walk into a dark home again.
Have the porch light automatically turn on when you open the front door after
dark. Lighting and audio controls can make a vacant home look and sound occupied.
You could set your Omni home control system to automatically call you at
work when your child comes home from school and keys in his security code into
the security system.
Call your home control system over the phone to make changes to your
system.
Log into your home control system over the Internet via Snap-Link or Web-
Link II and change your temperature settings.
Set the temperature setting on your Omni state to automatically turn up when
the security system is armed in the morning. It is then automatically turned down
one-half hour before you normally get home in order for you to arrive home to a
comfortable house.
If you are leaving early from work, you can call into your home control
system to manually set the temperature to where you want it to be when you get
home.
1.4 The Real Benefits of Home Automation
Most controllers will offer all of the above plus more. When you use controllers connected in
the appropriate fashion, you can realize all sorts of benefits, limited primarily by your
imagination.
For example:-
When on holiday or working late, have the lights come on automatically and draw the
curtains.
Set room moods, i.e. one button push to switch off the main light, dim the perimeter lights
and switch the surround sound system on ready to play a movie.
At dusk, check that the garage door is closed.
Switch on the electric blanket whilst you're sitting on your sofa.
The controller can be either standalone or combined into a security system to give additional
benefits.
Security
There are real benefits to having your automation controller and security system combined in
one unit. You have the advantage of infra red detectors from the alarm system being available
to perform/trigger automation tasks. You can also benefit from the alarm system knowing
whether you’re at home or not (i.e. whether the alarm is set or not). This can give numerous
benefits, for example we could set the system so that if no movement is detected in the home
for a given period, say 16 hours, then it rings a mobile telephone and conveys a message to
the recipient. This can be particularly relevant when you have concerns about ailing relatives
having accidents around the home etc.
Needless to say, if the alarm system forms the basis of our automation system, then it needs
to be of a particularly high standard, able to expand to suit all requirements. You should be
able to connect smoke detectors in to the system and when triggered, automatically switch on
lights to illuminate the exit route whilst at the same time dialing the fire brigade with a pre
recorded message. For further information, see details of our Comfort System.
PC Networking
Who remembers the time when having our own PC in the home seemed like a dream that
could never happen?
Who sees a future when PC’s have a function in most rooms in our home?
Many families already have more than one PC in the home, the kids want one each, dad has
one for business use, but they only have one printer and one internet access line.
Network
Networking involves tying all of your computers together so that you can pass information
easily between them, and also share devices such as printers and internet access. This is
traditionally done with interface cards and cable although several manufacturers now offer a
wireless solution. Systems offering network connections via the existing in house power lines
are now starting to emerge. Using cable gives higher data transfer rates and greater reliability
at a more affordable price, but wireless solutions are neater and easier to install especially
where running cables would prove difficult or messy. Tying your PC into your automation
system generally requires installing a serial cable between the two.
Convenience
An automated home is about the convenience of saving your time and effort by having your
home automatically do routine functions such as watering your grass (but only if it has not
rained recently), or turning off all lights, setting the thermostat to economy mode and arming
the security system when you retire for the night.
CHAPTER 2
PROJECT DESCRIPTION
2.1 Basic Idea
Basic idea of Home automation using Telnet is conceived from router
configuration. As we use a remote terminal to access router instead of console to configure it,
we have used the same way to control our controller instead of router to control our Home
Appliances. The controller ARM 7 which is programmed such as that when it receives the
command through Telnet it processes on it and turns ON or OFF the appliance as per
command receive.
Telnet server is used for interfacing. Server connects controller with telnet remote PC
through serial port i.e. DB9 and connects controller with remote pc through internet medium
i.e. TCP/IP.
2.2 Telnet
Telnet is a terminal emulation program for TCP/IP networks such as the Internet.
The Telnet program runs on your computer and connects your PC to a server on
the network.
We can enter commands through the Telnet program and they will be executed as
if you were entering them directly on the server.
To start a Telnet session, you must log in to a server by entering a valid username
and password.
Telnet is a common way to remotely control Web servers.
2.3 Block Diagram
Home Automation Server
Central Controller Internet Medium
TCP/IP
Home Appliances
Remote PC
CHAPTER 3
COMPONENTS DATA AND CIRCUIT DIAGRAM
3.1 Circuit Diagram
a- Control And Display Section
3.2 Circuit Components
MAX-232
Microcontroller ARM 7
LCD 2*16
LM7805
2SC1383
Push Buttons
Crystal 11.0592MHZ
CHAPTER 4
TELNET
4.1 Introduction
The purpose of the TELNET Protocol is to provide a fairly general, bi-directional, eight-bit
byte oriented communications facility. Its primary goal is to allow a standard method of
interfacing terminal devices and terminal-oriented processes to each other. It is envisioned
that the protocol may also be used for terminal-terminal communication and process-process
communication (distributed computation).
Telnet is a way to connect to a machine and run commands. Using Telnet, you can connect to
you Telnet or Telecommunication Network is a network protocol which is mostly used to
connect to remote machines over a local area network or the internet. Let us dive into
knowing more about telnet through this basic tutorial for beginners.
Telnet was developed in 1969 to aid in remote connectivity between computers over a
network. Telnet can connect to a remote machine that on a network and is port listening.
Most common ports to which one can connect to through telnet are:
4.2 Ports For Different Purposes
Port 21 - File Transfer Protocol
Port 22 - SSH Remote Login Protocol
Port 23 - Telnet Server
Port 25 - Simple Mail Transfer Protocol (SMTP)
Port 53 - Domain Name Server (DNS)
Port 69 - Trivial File Transfer Protocol (TFTP)
Port 70 - Gopher
Port 80 - Hyper Text Transfer Protocol (HTTP)
Port 110 - Post Office Protocol 3 (POP3)
4.3 Telneting to your account through other software
Connect to your local Internet Service Provider.
Open your Telnet program.
There are many popular shareware programs on the web available for download. If
you're running Windows 3.x/95/98 you already have a telnet program installed on
your system called telnet.exe. To run it, click on the "Start" button on your taskbar,
highlight "Run" on the menu, and then type in the command "telnet" in the window
that appears.
Connect to the server.
Once the programming is running, you'll need to tell the program where to connect to.
Look for a selection called "Connection", "Make New Connection", or "Remote
System". Enter www.yourdomain.com and press "OK" or "Connect". You'll see a
screen very similar to the one shown above, with a "login" prompt and possibly a
blinking cursor.
Type in your login name and press enter, then enter your password when prompted
and press enter. (Your login and password are the same ones that you use to FTP to
your account.)
If you entered the information correctly, then you're in! If the server gives you a login
or password incorrect error, just re-enter your login and password.
Terminal Type
If you see the line "TERM = (vt100)", just press enter and you're ready to start
entering commands.
Enter commands.
At this point you can start typing in Unix commands. A description of some common
ones can be found in the "About Telnet" page of your Control Panel, and we've also
gathered some in our Unix Commands page. Type in the commands and hit enter.
Disconnect.
To end your telnet session, simply type in the command "exit" or "logout" and then
hit enter.
4.4 General Considerations
A TELNET connection is a Transmission Control Protocol (TCP) connection used to
transmit data with interspersed TELNET control information.
The TELNET Protocol is built upon three main ideas: first, the concept of a "Network
Virtual Terminal"; second, the principle of negotiated options; and third, a symmetric view of
terminals and processes.
1. When a TELNET connection is first established, each end is assumed to originate and
terminate at a "Network Virtual Terminal", or NVT. An NVT is an imaginary device which
provides a standard, network-wide, intermediate representation of a canonical terminal.
2. The principle of negotiated options takes cognizance of the fact that many hosts will wish
to provide additional services over and above those available within an NVT, and many users
will have sophisticated terminals and would like to have elegant.
3. The symmetry of the negotiation syntax can potentially lead to non terminating
acknowledgment loops -- each party seeing the incoming commands not as acknowledgments
but as new requests which must be acknowledged. To prevent such loops, the following rules
prevail:
Transmission of data
Although a TELNET connection through the network is intrinsically full duplex, the NVT is
to be viewed as a half-duplex device operating in a line-buffered mode. That is, unless and
until options are negotiated to the contrary, the following default conditions pertain to the
transmission of data over the TELNET connection:
1) Insofar as the availability of local buffer space permits, data should be accumulated
in the host where it is generated until a complete line of data is ready for transmission, or
until some locally-defined explicit signal to transmit occurs. This signal could be generated
either by a process or by a human user.
2) When a process has completed sending data to an NVT printer and has no queued
input from the NVT keyboard for further processing (i.e., when a process at one end of a
TELNET connection cannot proceed without input from the other end), the process must
transmit the TELNET Go Ahead (GA) command.
4.6 Standard Representation Of Control Functions
As stated in the Introduction to this document, the primary goal of the TELNET protocol is
the provision of a standard interfacing of terminal devices and terminal-oriented processes
through the network. Early experiences with this type of interconnection have shown that
certain functions are implemented by most servers, but that the methods of invoking these
functions differ widely. For a human user who interacts with several server systems, these
differences are highly frustrating. TELNET, therefore, defines a standard representation for
five of these functions.
The Telnet "SYNCH" Signal
Most time-sharing systems provide mechanisms which allow a terminal user to regain control
of a "runaway" process; the IP and AO functions described above are examples of these
mechanisms. Such systems, when used locally, have access to all of the signals supplied by
the user, whether these are normal characters or special "out of band" signals such as those
supplied by the teletype "BREAK" key or the IBM 2741 "ATTN" key. This is not
necessarily true when terminals are connected to the system through the network; the
network's flow control mechanisms may cause such a signal to be buffered elsewhere, for
example in the user's host.
To counter this problem, the TELNET "Synch" mechanism is introduced. A Synch signal
consists of a TCP Urgent notification, coupled with the TELNET command DATA MARK.
The Urgent notification, which is not subject to the flow control pertaining to the TELNET
connection, is used to invoke special handling of the data stream by the process which
receives it. In this mode, the data stream is immediately scanned for "interesting" signals as
defined below, discarding intervening data. The TELNET command DATA MARK (DM) is
the synchronizing mark in the data stream which indicates that any special signal has
already occurred and the recipient can return to normal processing of the data stream.
CHAPTER 5
TCP/IP
5.1 Introduction
The Transmission Control Protocol (TCP) is intended for use as a highly reliable host-to-host
protocol between hosts in packet-switched computer
communication networks, and in interconnected systems of such networks.
The functions to be performed by the Transmission Control Protocol, the program that
implements it, and its interface to programs or users that require its services.
5.2 Structure of TCP/IP
The TCP fits into a layered protocol architecture just above a basic Internet Protocol
which provides a way for the TCP to send and receive variable-length segments of
information enclosed in internet datagram "envelopes". The internet datagram provides a
means for addressing source and destination TCPs in different networks. The internet
protocol also deals with any fragmentation or reassembly of the TCP segments required to
achieve transport and delivery through multiple networks and interconnecting gateways.
The internet protocol also carries information on the precedence, security classification and
compartmentation of the TCP segments, so this information can be communicated end-to-end
across multiple networks.
Protocol Layering
higher-level
TCP
internet protocol
internet protocol
Figure 1
Some computer systems will be connected to networks via front-end computers which house
the TCP and internet protocol layers as well as network specific software. The TCP
specification describes an interface to the higher level protocols which appears to be
implementable even for the front-end case, as long as a suitable host-to-front end protocol is
implemented.
5.3 Main Features of TCP/IP
The following are main features of TCP/IP
Scope
The TCP is intended to provide a reliable process-to-process communication service in a
multinetwork environment. The TCP is intended to be a host-to-host protocol in common use
in multiple networks.
Interfaces
The TCP interfaces on one side to user or application processes and on the other side to a
lower level protocol such as Internet Protocol. The interface between an application process
and the TCP is illustrated in reasonable detail. This interface consists of a set of calls much
like the calls an operating system provides to an application process for manipulating files.
For example, there are calls to open and close connections and to send and receive data on
established connections. It is also expected that the TCP can asynchronously communicate
with application programs. Although considerable freedom is permitted to TCP
implementers to design interfaces which are appropriate to a particular operating system
environment, a minimum functionality is required at the TCP/user interface for any valid
implementation.
The interface between TCP and lower level protocol is essentially unspecified except that it is
assumed there is a mechanism whereby the two levels can asynchronously pass information
to each other. Typically, one expects the lower level protocol to specify this interface. TCP is
designed to work in a very general environment of interconnected networks. The lower level
protocol which is assumed throughout this document is the Internet Protocol.
5.4 Operation
The primary purpose of the TCP is to provide reliable, securable logical circuit or connection
service between pairs of processes. To provide this service on top of a less reliable internet
communication system requires facilities in the following areas:
Basic Data Transfer
Reliability
Flow Control
Multiplexing
Connections
Precedence and Security
Basic Data Transfer:
The TCP is able to transfer a continuous stream of octets in each direction between its users
by packaging some number of octets into segments for transmission through the internet
system. In general, the TCPs decide when to block and forward data at their own
convenience.
Sometimes users need to be sure that all the data they have submitted to the TCP has been
transmitted. For this purpose a push function is defined. To assure that data submitted to a
TCP is actually transmitted the sending user indicates that it should be pushed through to the
receiving user. A push causes the TCPs to promptly forward and deliver data up to that point
to the receiver. The exact push point might not be visible to the receiving user and the push
function does not supply a record boundary marker.
Reliability:
The TCP must recover from data that is damaged, lost, duplicated, or delivered out of order
by the internet communication system. This is achieved by assigning a sequence number to
each octet transmitted, and requiring a positive acknowledgment (ACK) from the receiving
TCP. If the ACK is not received within a timeout interval, the data is retransmitted. At the
receiver, the sequence numbers are used to correctly order segments that may be received out
of order and to eliminate duplicates. Damage is handled by adding a checksum to each
segment transmitted, checking it at the receiver, and discarding damaged segments.
As long as the TCPs continue to function properly and the internet system does not become
completely partitioned, no transmission errors will affect the correct delivery of data. TCP
recovers from internet communication system errors.
Flow Control:
TCP provides a means for the receiver to govern the amount of data sent by the sender. This
is achieved by returning a "window" with every ACK indicating a range of acceptable
sequence numbers beyond the last segment successfully received. The window indicates an
allowed number of octets that the sender may transmit before receiving further permission.
Multiplexing:
To allow for many processes within a single Host to use TCP communication facilities
simultaneously, the TCP provides a set of addresses or ports within each host. Concatenated
with the network and host addresses from the internet communication layer, this forms a
socket. A pair of sockets uniquely identifies each connection. That is, a socket may be
simultaneously used in multiple connections.
The binding of ports to processes is handled independently by each Host. However, it proves
useful to attach frequently used processes (e.g., a "logger" or timesharing service) to fixed
sockets which are made known to the public.
These services can then be accessed through the known addresses. Establishing and learning
the port addresses of other processes may involve more dynamic mechanisms.
Connections:
The reliability and flow control mechanisms described above require that TCPs initialize and
maintain certain status information for each data stream. The combination of this
information, including sockets, sequence numbers, and window sizes, is called a connection.
Each connection is uniquely specified by a pair of sockets identifying its two sides.When two
processes wish to communicate, their TCP's must first establish a connection (initialize the
status information on each side). When their communication is complete, the connection is
terminated or closed to free the resources for other uses.
Since connections must be established between unreliable hosts and over the unreliable
internet communication system, a handshake mechanism with clock-based sequence numbers
is used to avoid erroneous initialization of connections.
Precedence and Security:
The users of TCP may indicate the security and precedence of their communication.
Provision is made for default values to be used when these features are not needed.
5.5 Model of Operation
Processes transmit data by calling on the TCP and passing buffers of data as arguments. The
TCP packages the data from these buffers into segments and calls on the internet module to
transmit each segment to the destination TCP. The receiving TCP places the data from a
segment into the receiving user's buffer and notifies the receiving user.
The TCPs include control information in the segments which they
use to ensure reliable ordered data transmission.
The model of internet communication is that there is an internet
protocol module associated with each TCP which provides an interface to the local network.
This internet module packages TCP segments inside internet datagrams and routes these
datagrams to a destination internet module or intermediate gateway. To transmit the
datagram through the local network, it is embedded in a local network packet.
The Host Environment
The TCP is assumed to be a module in an operating system. The users access the TCP much
like they would access the file system. The TCP may call on other operating system
functions, for example, to manage data structures. The actual interface to the network is
assumed to be controlled by a device driver module. The TCP does not call on the network
device driver directly, but rather calls on the internet datagram protocol module which may in
turn call on the device driver. The mechanisms of TCP do not preclude implementation of the
TCP in a front-end processor. However, in such an implementation, a host-to-front-end
protocol must provide the functionality to support the type of TCP-user interface described in
this document.
Interfaces
The TCP/user interface provides for calls made by the user on the TCP to OPEN or CLOSE a
connection, to SEND or RECEIVE data, or to obtain STATUS about a connection. These
calls are like other calls from user programs on the operating system, for example, the calls to
open, read from, and close a file.
The TCP/internet interface provides calls to send and receive
datagrams addressed to TCP modules in hosts anywhere in the internet system. These calls
have parameters for passing the address, type of service, precedence, security, and other
control information.
Relation to Other Protocols
The following diagram illustrates the place of the TCP in the protocol Hierarchy:
Telnet, FTP, Voice Application Level
TCP, RTP Host Level
Internet Protocol & ICMP Gateway Level
Local Network Protocol Network Level
Figure 2. Protocol Relationships
Connection Establishment and Clearing
To identify the separate data streams that a TCP may handle, the TCP provides a port
identifier. Since port identifiers are selected independently by each TCP they might not be
unique. To provide for unique addresses within each TCP, we concatenate an internet
address identifying the TCP with a port identifier to create a socket which will be unique
throughout all networks connected together.
Data Communication
The data that flows on a connection may be thought of as a stream of octets. The sending
user indicates in each SEND call whether the data in that call (and any preceding calls)
should be immediately pushed through to the receiving user by the setting of the PUSH flag.
A sending TCP is allowed to collect data from the sending user and to send that data in
segments at its own convenience, until the push function is signaled, then it must send all
unsent data. When a receiving TCP sees the PUSH flag, it must not wait for more data from
the sending TCP before passing the data to the receiving process.
There is no necessary relationship between push functions and segment boundaries. The
data in any particular segment may be the result of a single SEND call, in whole or part, or of
multiple SEND calls.
The purpose of push function and the PUSH flag is to push data through from the sending
user to the receiving user. It does not provide a record service.
5.6 Header Format
TCP segments are sent as internet datagrams. The Internet Protocol header carries several
information fields, including the source and destination host addresses [2]. A TCP header
follows the internet header, supplying information specific to the TCP protocol. This header,
supplying information specific to the TCP protocol.
TCP Header Format
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Port | Destination Port |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Sequence Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Acknowledgment Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Data | |U|A|P|R|S|F| |
| Offset| Reserved |R|C|S|S|Y|I| Window |
| | |G|K|H|T|N|N| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Checksum | Urgent Pointer |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Options | Padding |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| data |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
TCP Header Format
Source Port: 16 bits
The source port number.
Destination Port: 16 bits
The destination port number.
Sequence Number: 32 bits
The sequence number of the first data octet in this segment (except when SYN is present). If
SYN is present the sequence number is the initial sequence number (ISN) and the first data
octet is ISN+1.
Acknowledgment Number: 32 bits
If the ACK control bit is set this field contains the value of the next sequence number the
sender of the segment is expecting to receive. Once a connection is established this is always
sent.
Data Offset: 4 bits
The number of 32 bit words in the TCP Header. This indicates where the data begins. The
TCP header (even one including options) is an integral number of 32 bits long.
Reserved: 6 bits
Reserved for future use. Must be zero.
Control Bits: 6 bits (from left to right):
URG: Urgent Pointer field significant
ACK: Acknowledgment field significant
PSH: Push Function
RST: Reset the connection
SYN: Synchronize sequence numbers
FIN: No more data from sender
Window: 16 bits
The number of data octets beginning with the one indicated in the acknowledgment field
which the sender of this segment is willing to accept.
Checksum: 16 bits
The checksum field is the 16 bit one's complement of the one's complement sum of all 16 bit
words in the header and text. If a segment contains an odd number of header and text octets
to be check summed, the last octet is padded on the right with zeros to form a 16 bit word for
checksum purposes. The pad is not transmitted as part of the segment. While computing the
checksum, the checksum field itself is replaced with zeros. The checksum also covers a 96 bit
pseudo header conceptually
Urgent Pointer: 16 bits
This field communicates the current value of the urgent pointer as a positive offset from the
sequence number in this segment. The urgent pointer points to the sequence number of the
octet following the urgent data. This field is only be interpreted in segments with the URG
control bit set.
5.7 Functional Specification
There are essentially three cases:
Case 1: Local user initiates the close
In this case, a FIN segment can be constructed and placed on the outgoing segment queue.
No further SENDs from the user will be accepted by the TCP, and it enters the FIN-WAIT-1
state. RECEIVEs are allowed in this state. All segments preceding and including FIN will
be retransmitted until acknowledged. When the other TCP has both acknowledged the FIN
and sent a FIN of its own, the first TCP can ACK this FIN. Note that a TCP receiving a FIN
will ACK but not send its own FIN until its user has CLOSED the connection also.
Case 2: TCP receives a FIN from the network
If an unsolicited FIN arrives from the network, the receiving TCP can ACK it and tell the
user that the connection is closing. The user will respond with a CLOSE, upon which the
TCP can send a FIN to the other TCP after sending any remaining data. The TCP then waits
until its own FIN is acknowledged whereupon it deletes the connection. If an ACK is not
forthcoming, after the user timeout the connection is aborted and the user is told.
Case 3: both users close simultaneously
A simultaneous CLOSE by users at both ends of a connection causes FIN segments to be
exchanged. When all segments preceding the FINs have been processed and acknowledged,
each TCP can ACK the FIN it has received. Both will, upon receiving these ACKs, delete
the connection.
CHAPTER 7
LEVEL CONVERTER MAX 232
7.1 Introduction
The MAX232 is an integrated circuit that converts signals from an RS-232 serial port to
signals suitable for use in TTL compatible digital logic circuits. The MAX232 is a dual
driver/receiver and typically converts the RX, TX, CTS and RTS signals.
The drivers provide RS-232 voltage level outputs (approx. ±7.5V) from a single +5V supply
via on-chip charge pumps and external capacitors. This makes it useful for implementing RS-
232 in devices that otherwise do not need any voltages outside the 0V to +5V range, as power
supply design does not need to be made more complicated just for driving the RS-232 in this
case.
The receivers reduce RS-232 inputs (which may be as high as ±25V), to standard 5V TTL
levels. These receivers have a typical threshold of 1.3V, and a typical hysteresis of 0.5V.
The later MAX232A is backwards compatible with the original MAX232 but may operate at
higher baud rates and can use smaller external capacitors – 0.1μF in place of the 1.0μF
capacitors used with the original device.
Voltage levels
It is helpful to understand what occurs to the voltage levels. When a MAX232 IC receives a
TTL level to convert, it changes a TTL Logic 0 to between +3 and +15V, and changes TTL
Logic 1 to between -3 to -15V, and vice versa for converting from RS232 to TTL.
RS232 Line Type & Logic Level RS232 VoltageTTL Voltage to/from
MAX232
Data Transmission (Rx/Tx) Logic 0 +3V to +15V 0V
Data Transmission (Rx/Tx) Logic 1 -3V to -15V 5V
Control Signals
(RTS/CTS/DTR/DSR) Logic 0-3V to -15V 5V
Control Signals (RTS/CTS/DTR/DSR) Logic 1
+3V to +15V 0V
CHAPTER 8
HOME / OFFICE AUTOMATION APPLIANCES
8.1 Introduction
A major appliance, or domestic appliance, is usually defined as a large machine which
accomplishes some routine housekeeping task, which includes purposes such as cooking,
food preservation, or cleaning, whether in a household, institutional, commercial or industrial
setting. An appliance is differentiated from a plumbing fixture because it uses an energy input
for its operation other than water, generally using electricity or natural gas/propane. An
object run by a watermill would also be considered an appliance. Major appliances are
differentiated from small appliances because they are large, difficult to move, and generally
fixed in place to some extent. They are often considered fixtures and part of real estate and as
such they are often supplied to tenants as part of otherwise unfurnished rental properties.
Another frequent characteristic of major appliances is that they may have substantial
electricity requirements that necessitate special electrical wiring to supply higher current than
standard electrical outlets can deliver. This limits where they can be placed in a home.
Home automation may designate an emerging practice of increased automation of household
appliances and features in residential dwellings, particularly through electronic means that
allow for things impracticable, overly expensive or simply not possible in recent past
decades. The term may be used in contrast to the more mainstream "building automation,"
which refers to industrial settings and the automatic or semi-automatic control of lighting,
climate doors and windows, and security and surveillance systems. The techniques employed
in home automation include those in building automation as well as the control of home
entertainment systems, houseplant watering, pet feeding, "scenes" for different events (such
as dinners or parties), and the use of domestic robots.
Home automation has been around since World War I. A television remote was first patented
in 1950 and a remote control device was first used by the Germans in World War I to control
motorboats. From there, the evolution of controllers and automation has been growing and
still continue to grow to this day.
In advanced installations, rooms can sense not only the presence of a person but know who
that person is and perhaps set appropriate lighting, temperature, music or television levels
taking into account the day of the week, the time of day, and other factors.
Other automated tasks may include setting the air conditioning to an energy saving setting
when the house is unoccupied, and restoring the normal setting when an occupant is about to
return. More sophisticated systems can maintain an inventory of products, recording their
usage through an RFID tag, and prepare a shopping list or even automatically order
replacements.
8.2 Different Home / Office Automation Appliances
1- Heating, Ventilation and Air Conditioning
Heating, Ventilation and Air Conditioning solutions include temperature and humidity
control (climatic). This is generally one of the most important aspects to a homeowner. An
Internet-controlled thermostat, for example, can both save money and help the environment,
by allowing the homeowner to control the building's heating and air conditioning systems
remotely.
2- Lighting
Lighting control systems involves aspects related to controlling electric lights.
Extinguished general of all the lights of the house
Automation of switched off / ignition in every point of light
Regulation of the illumination according to the level of ambient luminosity
3- Natural lighting
Natural lighting control involves controlling window shades, LCD shades, draperies and
awnings. Recent advances include use of RF technology to avoid wiring to switches and
integration with third party home automation systems for centralized control.
4- Audio
Major companies associated with Audio Distribution include: There are three components
that allow the consumer to listen to audio throughout your home, or business:
o Cat 5e/CAT 6 cable from Audio central unit.
o 2 sets of speaker cabling (4ply from amplifier, and 2 ply from key pad to
ceiling or wall speakers).
o A keypad to control your volume and sources.
This category includes audio switching and distribution. Audio switching determines the
selection of an audio source. Audio distribution allows an audio source to be heard in one or
more rooms. This feature is often referred to as 'multi-zone' audio.
5- Video
This includes video switching and distribution, allowing a video source to be viewed on
multiple TVs. This feature is often referred to as 'multi-zone' video.
Integration of the intercom to the telephone, or of the video door entry system to the
television set, allowing the residents to view the door camera automatically.
6- Security
Control and integration of security systems.
With Home Automation, the consumer can select and watch cameras live from an Internet
source to their home or business. Security cameras can be controlled, allowing the user to
observe activity around a house or business right from a Monitor or touch panel. Security
systems can include motion sensors that will detect any kind of unauthorized movement and
notify the user through the security system or via cell phone.
This category also includes control and distribution of security cameras
Detection of possible intrusion
o sensors of detection of movement
o sensors of magnetic contact of door/window
o sensors of glass breaking
o sensors of pressure changes
Simulation of presence.
Detection of fire, gas leaks, water leaks (see fire alarm and gas alarm)
Medical alert. Teleassistance.
Precise and safe closing of blinds.
7- Intercoms
An intercom system allows communication via a microphone and loud speaker between
multiple rooms.
Ubiquity in the external control as much internal, remote control from the Internet,
PC, wireless controls electrical equipment.
Transmission of alarms.
Intercommunications.
Using special hardware, almost any device can be monitored and controlled automatically or
remotely.
8 - Plant Watering
Pool pump(s) and heater, Hot tub and Spa
Sump Pump (need info and links)
CHAPTER 9
CONCLUSION
9.1 Topic Background
This project is developed for Houses, small, Large, Medium size national and multinational
organizations which keeps large amount of money in their office and want 100% security.
Their main requirements were they wanted a system that could alert them when burglary
takes place at the time when office is closed. These organizations are very big and have many
employees; most of the employees do overtime and stay at office for late nights. Supervisor is
responsible to switch off the electric lights, other appliances and lock the office after
everyone leaves but the main problem was this supervisor had to stay with employees for
long time until they finish their work, so we proposed this system to these organizations that
can solve out their problems. Now supervisor can monitor the employees from their houses
using live web cams, turn off lights and doors when everyone is gone.
9.2 Project Scope
The system being developed will focus an automating security and electronic appliances for
homes and offices. This involves providing the feature of tracking the status of appliances
and manipulating them accordingly. It also involves monitoring and remotely the security
related events. The scope is also consists of sending remote messages to the user by any
means. The proposed security and home/office automation system will also focus on user
remote system connectivity so that it can be manage by the user when he/she is outside.
It also comes in boundary of the system, to detect unwanted motions through different
intruder devices and maintain passed activities and event logs. The system will target on
controlling other home and office processes which are being perform manually, controlling
doors can be one of those processes and also will target on modern connectivity technologies
to minimize the failure chance. The proposed system will also subject on controlling home
and office electricity flow remotely from different locations.
9.3 Objective Of System
The main objective of the system is to automate all home/office and security processes. It is
an objective of the proposed security system to monitor unwanted intruder activities through
attached security device i.e. PIR motion detectors, Glass-break sensors and etc and inform the
user on real time using SMS services and alarms. The objective of the system is to enable the
user to monitor his property when he is not present there using security cameras and also to
provide facility to the user to track passed activities and events logs by accessing web-based
reports, tracking current status of the system from anywhere in the world using pocket paces,
laptops and other devices is also a part of an objective of the system. An objective of the
proposed system is also to enable user to manage other important home/office features like
i.e. controlling curtains, controlling door/gates and etc. Providing feature to the user to
manage electricity appliances automatically when he/she is outside using timer settings also
comes under the boundary of an objective of the proposed system.
9.4 Functionality of System
Main Functionality
Core
• Online real-time house watch through security cameras
• Wireless Connectivity.
• Real-time picture capture from remote location
• Timer to automatically switching (on/off) electronic appliances.
• Control Door Locks
• Control room curtains
• Video/Audio recording when system is triggered.
Switch ON/OFF Electronic Appliances (Desktop/Web Based)
This system have many special features controlling the electricity of the building is one of the
feature which enables the user to control the electronic appliances of his/her building from
within the building boundary or anywhere in the world using web based system.
Timer To Automatically Switching (ON/OFF) Electronic Appliances
Timer feature automatically switch on or switch off the electricity of the building on the set
time. User can change its time and set it according to his need. User doesn’t have to go
physically outside and open the lights, now simply set the required time and the system will
switch on and off the electric flow itself.
Loud Alarm To Alert About Danger
When any unwanted activity is detected by the system, it immediate activates a loud alarm
siren to alert the user and people around about the danger.
Live Streaming Videos Of House Through Online Security Cameras
Special feature of live streaming videos enable the user to view live online web cam location
to remote location from anywhere in the world. Now when unwanted activity is detected at
user’s premises user can simply log onto the website and view live videos of every area of the
building.
Captures Pictures Of Remote Location
User can capture pictures of remote location from anywhere in the world using his/her
cellular, laptop or PDA. Now whenever user is informed about the burglary, he/she may go
on the website view the remote web cameras and if he/she finds anyone in camera. User can
capture pictures for evidence.
Control Electronic Door Locks
Now user can control his/her door locks using his cellular. If anyone arrives and gives bell,
User may check on the gate camera and if she/he knows the person. He/She can open the
door from the cell phone.
Control Room Curtains By PC
This system has a feature to control the curtains of the room using cellular. Now opening and
closing the curtains of room is on your fingertip. User doesn’t need to go physically and
open/close curtains.