Sie sind auf Seite 1von 46

ICEM, E&TC Engineering 2011-12

A
SEMINAR REPORT ON

ARM BASED EMBEDDED WEB SERVER


SUBMITTED TO

PUNE UNIVERSITY FOR THE DEGREE OF


BACHELOR OF ELECTONICS & TELECOMMUNICATION ENGINEERING BY DHIRAJ KUMAR (E414) AMIT KR SHARMA (E 404) AAKANKSHA RANGARI (E 445) UNDER THE GUIDANCE OF

Prof. Raju Kamble


DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION

Shree Chanakya Education Societys


INDIRA COLLEGE OF ENGINEERING AND MANAGEMENT PUNE 410 506. (UNIVERSITY OF PUNE) 2011 2012
1

ICEM, E&TC Engineering 2011-12

Shree Chanakya Education Societys

lndira College of Engineering And Management, Pune.

CERTIFICATE
This is to certify that DHIRAJ KUMAR AMIT KR.SHARMA ( E 414) (E 404)

AAKANKSHA RANGARI ( E 445) studying in Final Year Engineering (B.E.) for the Academic Year 2011-12 has completed the Seminar Report on ARM BASED EMBEDDED WEB SERVER as a part of Final Year Engineering Academics Prescribed by UNIVERSITY OF PUNE. This is the Self Sponsored Project. The Report carried out by the students was found to be complete and satisfactory.

Project Guide H.O.D Prof. Raju Kamble

Project C0-0rdinator

Asso.Prof.P.H.Patil

Prof.A.M.Patki

ICEM, E&TC Engineering 2011-12

ACKNOWLEDGEMENT
It gives us immense pleasure in presenting the report on ARM BASED EMBEDED WEB SERVER. The joy and satisfaction that come along with successful completion of any work would be incomplete unless we mention the people who made it possible. There are many people, we would like to thank for their contribution in completing this report successfully. First we would like to mention a special thank to our respected project guide Prof. Raju Kamble and Prof. Prakash H. Patil who has really taken lot of efforts to get this project at individual level and also given us a continuous and immense support, suggestions and courage to complete this task. He has applied a constant guiding force to help us, prepare and complete the project on schedule. We feel extremely fortunate to have worked under our project guide Prof. Raju Kamble. We would also like to thanks our H.O.D. Prof A.M.Patki for his faith in us and processing our report. We would also like to thank the entire Electronics& Telecommunication Department Faculty for giving invaluable suggestions.

DHIRAJ KUMAR AMIT KR.SHARMA AAKANKSHA RANGARI

ICEM, E&TC Engineering 2011-12

ABSTRACT
As the World-Wide Web (WWW) continues to evolve, it is clear that its underlying technologies are useful for much more than just browsing the web. Web browsers have become the de facto standard user interface for a variety of applications including embedded real time applications such as Remote Data Acquisition System. This brings in a need for web services being deployed on various embedded processors such as Advanced RISC Machine (ARM) in real time context. The main aim of the project is to develop an embedded web server using ARM7 TDMI processor. The web pages which are required for the web server will be developed using HTML. This embedded web server which will be developed by using Embedded C language can be beneficial for mission critical applications, remote data acquisition systems, ATM and controlling devices such as servo motor, dc motor, stepper motor ,turning ON or OFF the stereo sets., use as dimmerstat to control light intensities. can be used in home automation, store programs in flash memory and run the according to need.

ICEM, E&TC Engineering 2011-12

PROBLEM STATEMENT
To design and implement ARM BASED EMBEDDED WEB SERVER for remote applications

ICEM, E&TC Engineering 2011-12

INDEX Sr. No. 1) 2) 3) 4) 5) List of Figures Introduction Literature Survey Block Diagram and explanation Design and implementation 5.1 Hardware 5.2 Softwre TOPIC Page No. 7 9 11 12-14 15-25

6) 7)

HTTP serve overview TCP/IP stack overview

26-32 33-37

8) 9) 10) 11)

Goal and Future scope Application References Conclusion

38-39 40-41 42-43 44-45

ICEM, E&TC Engineering 2011-12

LIST OF FIGURES: 1. Block diagram of embedded web server


2. Pin diagram of ENC28J60 3. Ethernet control interfacing 4. Block diagram of HTTP SERVER 5. WEB server state diagram 6. TCP/IP stack block diagram

ICEM, E&TC Engineering 2011-12

Chapter 1 INTRODUCTION

ICEM, E&TC Engineering 2011-12

Introduction
Embedded systems are specialized computer systems designed and optimized to perform a particular task. Usually they are a part of a larger system or a machine In today's world, embedded systems are everywhere homes, offices, cars, factories, hospitals, plains and consumer electronics. They span all aspects of modern life and examples of their use are numerous. Modern embedded systems are able to connect to the internet and can be remotely maintained and diagnosed . M2M(Machine to machine) communication is growing with a considerable rate. The possibility to connect two or more embedded systems enables developers to build more powerful distributed systems such as networked embedded systems .Remote maintenance is performed by different communication protocols. The most common communication protocol is HTTP which enables remote system control and monitoring. A web server is a computer program that implements HTTP protocol. It accepts HTTP requests from clients like web browsers and serves HTTP responses which are usually HTML pages with linked objects. There are many web servers available, and a number of them are free, like Apache, AOL , Roxen . Internet Information Services, Sun Java System web Server are some of the most common commercial web servers. Some web servers can run on almost any operating system while others are platform specific. The general purpose web servers are intended to run on powerful server computers, workstations or personal computers and support a number of advanced features. On the other hand, web servers for embedded system shave limited resources and offer only a set of required features. Requirements of an embedded system web server are: small RAM and ROM footprint, low CPU consumption, static link with the operating system and application, serving pages from the RAM if there is no hard drive.

ICEM, E&TC Engineering 2011-12 Embedded system web servers are used in different applications. In our case, we will develop a generic embedded system web server for remote monitoring in integrated ICT solutions for aging society. In the following, we describe our approach and the main features of the system.

Chapter 2 LITERATURE SURVEY

10

ICEM, E&TC Engineering 2011-12

11

ICEM, E&TC Engineering 2011-12

LITERATURE SURVEY
The embedded web server can be used to acquire data from any field or site and display or retrieve from any corner of the world so first of all we decided to look for any particular application to which it can applied considering the demand and importance of application specified server we have decided to go for such application that can fulfill demands. We decided to go for stepper motor control and home automation such as switching of light and fan using relay control through the embedded web server. The project require hardware and software knowledge, hence we started looking for what a current technology for most suitable and economically viable for this project. We decided to carry small market survey to look out for current conditions selfability of product. 2.1 Sources of Literature Survey Websites Books New Papers and Technical magazines

12

ICEM, E&TC Engineering 2011-12

Chapter 3 BLOCK DIAGRAM

13

ICEM, E&TC Engineering 2011-12

BLOCK DIAGRAM

POWER SUPPLY

LCD

RELAYDRIVER

RJ-45 JACK

KEYPAD

ARM7TDMI LPC2138 CONTROLLER

ETHERNET CONTROLLER

SIGNAL CONDITIONING

SIGNAL CONDITIONING

ANALOG SENSOR

ANALOG SENSOR

Figure 1: Block Diagram of Embedded Web Server

14

ICEM, E&TC Engineering 2011-12

3.1 EXPLANATION:
This project implements an EMBEDDED WEBSERVER with networking capability using ARM microcontroller. Various Analog Sensors can be connected to the ARM Board. The project includes complete implementation of an HTTP Web Server in am ARM7 microcontroller. The websites are stored inside the program space of the ARM7 microcontroller and features a flexible pattern parsing algorithm. This supports using keywords to instruct the web server to include special data in the page delivered to the browser (i.e. current temperature as ASCII text). Using any standard web browser on any PC you can access the web pages performing a variety of operations like viewing a temperature plot of the last 24 hours, control the servo motor , read/write any I/O pin by using a simple mouse-click, upload any file to the Data Flash storage and access files stored on the flash. The web server implements ARP,IP, TCP, UDP, HTTP (server), NTP (client), servo control, I/O Pin control, 2nd software UART etc. This system is very suitable for acquiring data or signals form a large scale industry field. Hundreds of such terminals can be grouped within a network. One PC is enough for monitoring many terminals. Link from server to the internet can be also established to realize remote monitoring. You can see the data in the office, even at home if you have internet access. This system can also be integrated into ERP system, which will improve management level access. This system will not only be useful in industry field, but also has great future in smart-house applications, networked lighting control system and other distributed control systems.

15

ICEM, E&TC Engineering 2011-12

Chapter 4 DESIGN AND IMPLEMENTATION

16

ICEM, E&TC Engineering 2011-12

DESCRIPTION HARDWARE DEVELOPMENT:


4.1 ARM7TDMI CONTRLLER:

It is a microcomputer chip, which store our program executes them and takes necessary action. The chip used here is ARM7 LPC2138 microcontroller. The LPC2138 microcontrollers are based on a 16/32-bit ARM7TDMI-S CPU with real-time emulation and embedded trace support, that combine the microcontroller with 32kB, 64kB, 128kB, 256kB and 512 kB of embedded high-speed ash memory. A 128-bit wide memory interface and unique accelerator architecture enable 32-bit code Execution at maximum clock rate. For critical code size applications, the alternative16-bit Thumb mode reduces code by more than 30% with minimal performance penalty. Due to their tiny size and low power consumption, these microcontrollers are ideal for applications where miniaturization is a key requirement, such as access control and point-of-sale. With a wide range of serial communications interfaces and on-chip SRAM options of 8kB, 16kB, and 32kB, they are very well suited for communication gateways and protocol converters, soft modems, voice recognition and low-end imaging, providing both large buffer size and high processing power

17

ICEM, E&TC Engineering 2011-12

4.1.1 Features:
The ARM7TDMI controller is a member of the Advanced RISC machine family of general purpose 32-bit microcontroller. 16/32-bit ARM7TDMI-S microcontroller in a tiny LQFP64 or HVQFN package ARM7 - 32-bit Advanced RISC Machine T - Thumb architecture extension Two separate instruction sets, 32-bit ARM instructions and 16-bit Thumb instructions D - Debug extension M - Enhanced multiplier I - Embedded ICE macro cell extension Von Neumann Architecture 3-stage pipeline -fetch, decode, execute 32-bit Data Bus 32-bit Address Bus 37 32-bit registers 32-bit ARM instruction set 16-bit THUMB instruction set 32x8 Multiplier Barrel Shifter. 8/16/32kB of on-chip static RAM and 32/64/128/256/512kB of on-chip ash program memory. 128-bit wide interface/accelerator enables high-speed 60MHz operation.

18

ICEM, E&TC Engineering 2011-12 One (LPC2131/32) or two (LPC2134/36/38) 8-channel 10-bit ADCs provide a total of up to 16 analog inputs, with conversion times as low as 2.44 s per channel. Single 10-bit DAC provides variable analog output (LPC2132/34/36/38). Two 32-bit timers/external event counters (with four capture and four compare channels each), PWM unit (six outputs) and watchdog. Low power Real-time clock with independent power and dedicated 32 kHz clock input. Multiple serial interfaces including two UARTs (16C550), two Fast I2C bus (400kbit/s), SPI and SSP with buffering and variable data length capabilities. Vectored interrupt controller with congurable priorities and vector addresses. Up to forty-seven 5V tolerant general purpose I/O pins in tiny LQFP64 or HVQFN package. Up to nine edge or level sensitive external interrupt pins available. 60MHz maximum CPU clock available from programmable on-chip PLL with settling time of 100 s. On-chip integrated oscillator operates with external crystal in range of 1MHz to 30MHz and with external oscillator up to 50MHz. Power saving modes include Idle and Power-down. Individual enable/disable of peripheral functions as well as peripheral clock scaling down for additional power optimization. Processor wake-up from Power-down mode via external interrupt or BOD. Single power supply chip with POR and BOD circuits: u CPU operating voltage range of 3.0V to 3.6V (3.3V 10%) with 5V tolerant I/O pads

19

ICEM, E&TC Engineering 2011-12

4.2 ETHERNET CONTROLLER :

Ethernet is a protocol that controls the way data is transmitted over a local area network (LAN ). It is designed to serve as an Ethernet network interface for any controller equipped with Serial Peripheral Interface. The ENC28J60 is a stand-alone Ethernet controller with an industry standard Serial Peripheral Interface SPI. The ENC28J60 meets all of the IEEE 802.3 specifications. It incorporates a number of packet filtering schemes to limit incoming packets. It also provides an internal DMA module for fast data throughput and hardware assisted checksum calculation, which is used in various network protocols. Communication with the host controller is implemented via an interrupt pin and the SPI, with clock rates of up to 20MHz. Two dedicated pins are used for LED link and network activity indication. With the ENC28J60, two pulse transformers and a few passive components are all that is required to connect a microcontroller to an Ethernet network

20

ICEM, E&TC Engineering 2011-12

Figure2: pin diagram of ENC28J60

4.2.1 FEATURES IEEE 802.3 compatible Ethernet controller Integrated MAC and 10BASE-T PHY Supports one 10BASE-T port with automatic polarity detection and correction Supports Full and Half-Duplex modes Programmable automatic retransmit on collision Programmable padding and CRC generation Programmable automatic rejection of erroneous packets SPI Interface with clock speeds up to 20MHz

21

ICEM, E&TC Engineering 2011-12

4.2.2 ETHERNET CONTROLLER INTERFACE OVERVIEW

Figure 3: Ethernet controller Media Access Controller (MAC) Part of the Data Link Layer. The MAC provides addressing and channel access control mechanisms that make it possible for several terminals or network nodes to communicate within a multipoint network. Physical Layer (PHY) - The most basic network layer, providing only the means of transmitting raw bits rather than packets over a physical data link connecting network nodes Magnetics (Isolation Transformer) - Part of the Physical layer used to decouple PHY from the physical Ethernet cable RJ45 - That Ethernet Connector

22

ICEM, E&TC Engineering 2011-12

4.3 SENSORS: A sensor (also called detector) is a device that measures a physical quantity and converts it into a signal which can be read by an observer or by an instrument. A sensor is a device which receives and responds to a signal. A sensor's sensitivity indicates how much the sensor's output changes when the measured quantity changes

4.3.1 LEVEL SENSOR

Level sensors detect the level of substances that flow, including liquids, slurries, granular materials, and powders. Fluids and fluidized solids flow to become essentially level in their containers (or other physical boundaries) because of gravity whereas most bulk solids pile at an angle of repose to a peak. The substance to be measured can be inside a container or can be in its natural form (e.g. a river or a lake). The level measurement can be either continuous or point values. Continuous level sensors measure level within a specified range and determine the exact amount of substance in a certain place, while point-level sensors only indicate whether the substance is above or below the sensing point. Generally the latter detect levels that are excessively high or low. There are many physical and application variables that affect the level monitoring method for industrial and commercial processes. 23 selection of the optimal

ICEM, E&TC Engineering 2011-12

The selection criteria include the physical: phase (liquid, solid or slurry), temperature, pressure or vacuum, chemistry, dielectric constant of medium, density (specific gravity) of medium, agitation (action), acoustical or electrical noise, vibration, mechanical shock, tank or bin size and shape. Also important are the application constraints: price, accuracy, appearance, response rate, ease of calibration or programming, physical size and mounting of the instrument, monitoring or control of continuous or discrete (point) levels.

4.3.2 Load Cell

A load cell is a transducer that is used to convert a force into electrical signal. This conversion is indirect and happens in two stages. Through a mechanical arrangement, the force being sensed deforms a strain gauge. The strain gauge measures the deformation (strain) as an electrical signal, because the strain changes the effective electrical resistance of the wire. A load cell usually consists of four strain gauges in a Wheatstone bridge configuration. Load cells of one strain gauge (quarter bridge) or two strain gauges (half bridge) are also available.The electrical signal output is typically in the order of a few millivolts and requires amplification by an instrumentation amplifier before it can be used. The output of the transducer is plugged into an algorithm to calculate the force applied to the transducer.

24

ICEM, E&TC Engineering 2011-12

Although strain gauge load cells are the most common, there are other types of load cells as well. In industrial applications, hydraulic (or hydrostatic) is probably the second most common, and these are utilized to eliminate some problems with strain gauge load cell devices. As an example, a hydraulic load cell is immune to transient voltages (lightning) so might be a more effective device in outdoor environments.

4.4 SIGNAL CONDITIONING CIRCUIT

In electronics, signal conditioning means manipulating an analog signal in such a way that it meets the requirements of the next stage for further processing. Most common use is in analog-to-digital converters. In control engineering applications, it is common to have a sensing stage (which consists of a sensor), a signal conditioning stage (where usually amplification of the signal is done) and a processing stage (normally carried out by an ADC and a micro-controller). Operational amplifiers (op-amps) are commonly employed to carry out the amplification of the signal in the signal conditioning stage. Signal conditioning can include amplification, filtering, converting, range matching, isolation and any other processes required to make sensor output suitable for processing after conditioning.

25

ICEM, E&TC Engineering 2011-12

4.5 SOFTWARE DEVELOPMENT:


The software part deals in programming the ARM7microcontroller . We will be using EXPRESS PCB design software for PCB layout design. The KEIL software development tool to write and compile the source code for remote application which has been written in the EMBEDDED C language. The uCFLASH serial device programmer has been used to write this compile code into the microcontroller FOR server development we use APACHE SERVER developer and for web page development we use basic HTML and for scripting we use JAVA scripting and applets

26

ICEM, E&TC Engineering 2011-12

Chapter 5 SERVER OVERVIEW

27

ICEM, E&TC Engineering 2011-12

SERVER OVERVIEW: 5.1 HTTP SERVER:


HTTP is a simple protocol that is based on a TCP/IP protocol stack . HTTP uses TCP (Transmission Control Protocol). TCP is a relative complex and high-quality protocol to transfer data by the subordinate IP protocol. TCP itself always guarantees a safeguarded connection between two communication partners based on an extensive three way-handshake procedure. As a result the data transfer via HTTP is always protected.

HTTP TCP ICMP IP Ethernet,serial ARP HTTP-Client UDP

Request

HTML Files CGI

Response

HTTP-Server

Figure 4:HTTP server working diagram HTTP is based on a simple client/server-concept. HTTP server and client communicate via TCP connection. As default TCP port value the port number 80 will be used. The server works completely passive. He waits for a request (order) of a client. This request normally refers to the transmit ion of specific HTML documents. This HTML documents possibly have to be generated dynamically by CGI . As result of the requests, the server will answer with a response that usually contains the desired HTML documents among others HTTP requests normally consist of several text lines, which are transmitted to the server by TCP. The listing shows an example. The first line characterizes the request type (GET),the requested object (/test1.htm) and the used HTTP version (HTTP/1.1). In the second request line the client tells the server, which kind of files it is able to evaluate. The third line includes information about the client-software. The fourth and last line of the request from listing is used to inform the server about the IP address of the client. In according to the type of request and the used client software there could follow some further lines. As an end of the request a blank line is expected.The HTTP responses as request answer mostly consist of two 28

ICEM, E&TC Engineering 2011-12 parts. At first there is a header of individual lines of text. Then follows a content object (optional). This content object maybe consists of some text lines in case of a HTML file or a binary file when a GIF or JPEG image should be transferred. The first line of the header is especially important. It works as status or error message. If an error occurs, only the header or a part of it will be transmitted as answer.

5.2 FUNCTIONALITY PRINCIPAL OF A WEB SERVER Simplified a Web server can be imagined like a special kind of a file server. . The Web server receives a HTTP GET-request from the Web browser. By this request, a specific file is required as answer . After that ,the Web server tries to get access on the file system of the requested computer. Then it attempts to find the desired file (step 2). After the successful search the Web server read the entire file (step 3) and transmit it as an answer (HTTP response comprising of header and content object) to the Web browser (step 4). If the Web server cannot find the appropriate file in the file system, an error message (HTTP response which only contains the header) is simply be send as response to the client.

Web Browser

Step 1 Step 4

Web Server

Step 2 Step 3

File System

Web Browser

Step 1

Web Server

Step 2

CGI Program

Step 4

Step 3

The web content is build by individual files. The base is build by static files with HTML pages. Within such HTML files there are references to further files embedded these files are typically pictures in GIF or JPEG format. However, also references to other objects, for example Java-Applets, are possible. After a Web browser has received a HTML file of a Web server, this file will be evaluated and then searched for external references. Now the steps 1 to 4 from picture 2.A will run again for every external reference in order to request the respective file from the corresponding Web server. Please note, that such a reference consists 29

ICEM, E&TC Engineering 2011-12 of the name or IP address of a Web server (e.g. "dilnetpc.com"), as well as the name of the desired file (e.g. "picture1.gif"). So virtually every reference can refer to another Web server. In other words, a HTML file could be located on the server "ssv-embedded.de" but the required picture -which is external referenced by this HTML file- is located on the Web server . "dilnetpc.com". Finally this (worldwide) networking of separate objects is the cause for the name World Wide Web (WWW). All files, which are required by a Web server, are requested from a browser like the procedure shown on picture 2.A. Normally these files are stored in the file system of the server. The Webmaster has to update these files from time to time .A further elementary functionality of a Web server is the Common Gateway Interface (CGI) -we have mentioned before. Originally this technology is made only for simple forms, whichare embedded into HTML pages. The data, resulting from the padding of a form, will be transmitted to a Web server via HTTP-GET or POST-request (see step 1 into picture 2.B). In such a GET- or POST-request the name of the CGI program, which is needed for the evaluation of a form, is fundamentally included. This program has to be on the Web server. Normally the directory "/cgi-bin" is used as storage location. As result of the GET- or POST request the Web server starts the CGI program located in the subdirectory "/cgi-bin" and delivers the received data in form of parameters (step 2). The outputs of a CGI program are guided to the Web server (step 3). Then the Web server sends them all as responses to the Web browser (step 4).

30

ICEM, E&TC Engineering 2011-12

SET INITIAL STATE

Accepted

LISTEN AcceptedACC

CONNECTION

Accepted

PASS HEADER REQUEST IP ADDRESS

Wrong Ip Accepted OK
GENERATE ERROR MESSAGE

OK

Time out
CLOSE CONNECTIO N MAP THE URL WEB DOCUMENTS (HTML FILE)

WAIT FOR NEW REQUEST

Accepted

SENT HTML PAGE

CREATE RESPONSE

Figure5: State diagram of web server

31

ICEM, E&TC Engineering 2011-12

5.3. Dynamic generated HTML Pages:


In contradiction to a company Web site server, which informs people about the product program and services by static pages and pictures, an embedded Web server has to supply dynamically generated contents. The embedded Web server will generate the dynamic pages in the moment of the first access by a browser. How else could we check the actual temperature of a system via Internet? Static HTML files are not interesting for an embedded Web server. The most information about the firmware version and service instructions are stored in HTML format. All other tasks are normally made via dynamic generated HTML.

Web Browser

Step1 Step6

Web Server

Step2 Step5

Step4

Scripting Engine

Step3 HTML with Script code

HTML without Script code

There are two different technologies to generate a specific HTML page in the moment of the request: First the so-called server-side-scripting and second the CGI programming. At the server-side-scripting, script code is embedded into a HTML page. If required, this code will be carried out on the server (server-sided). For this, there are numerous script languages available. All these languages are usable inside a HTML-page. In the Linux community PHP is used mostly. The favourite of Microsoft is VBScript. It is also possible to insert Java directly into HTML pages. Sun has named this technology JSP (Java Server Pages). The HTML page with the script code is statically stored in the file system of the Web server. Before this server file is delivered to the client, a special program replaces the entire script code with dynamic generated standard HTML. The Web browser will not see anything from the script language. Picture 3 shows the single steps of the server-side-scripting. In step 1the Web browser requests a specific HTML file via HTTP GET-request. The Web server recognizes the specific extension of the desired file (for example *.ASP or *.PHP instead of *.HTM and/or *.HTML) and starts a so-called scripting engine (see step 2). This program gets the desired HTML file including the script code from the file system (step 3), carry out 32

ICEM, E&TC Engineering 2011-12 the script code and make a new HTML file without script code (step 4). The included script code will be replaced by dynamic generated HTML. This new HTML file will be read by the Web server (step 5) and send to the Web browser (step 6). If a server-sided scripting is supposed to be used by an embedded Web server, so you have to consider the necessary additional resources. A simple example: In order to carry out the embedded PHP code into a HTML page, additional program modules are necessary for the server. A scripting engine together with the embedded Web server has to be stored in the Flash memory chip of an embedded system. Through that, during run time more main memory is required.

33

ICEM, E&TC Engineering 2011-12

CHAPTER 6 TCP/IP STACK OVERVIEV

34

ICEM, E&TC Engineering 2011-12

6.1 TCP/IP STACK OVERVIEW


TCP/IP refers to a set of standard protocols used for communication over a network. The protocols are based on the Open Systems Interconnection (OSI) Model, a layered abstract description of network communication. The layers specified in the OSI model are structured such that each layer only depends on the layers below it. Implementations of the OSI Model, such as TCP/IP, result in a protocol stack which describes functionality both at the application layer and at the low level physical interface. 6.1.1. Physical Layer The physical layer is typically implemented in hardware and can use a wide variety of interfaces. This allows networks to consist of Ethernet devices, wireless devices, dial-up modem devices, or a combination of all three. 6.1.2 Data Link Layer The data link layer is implemented in both software and hardware. It contains the low level device driver and the Ethernet Media Access Controller (MAC). At this level, data is exchanged in IEEE802.3 Ethernet frames using physical addressing. The CP220x is a single-chip Ethernet controller containing the physical and data link layers, buffer space, and 8 kB Flash memory preprogrammed with a unique physical address. 6.1.3. Network Layer The network layer builds on top of the data link layer by implementing logical addressing. Logical addressing allows devices with different data link and physical layers to communicate. It also allows devices to have a temporary address that can be easily changed or re assigned as it moves between networks. The logical address is also called an IP Address .Devices with different data link and physical layers can communicate using their logical addresses because of the Address Resolution Protocol (ARP). ARP is a protocol used to map the logical IP Address to a physical address. For Ethernet, the physical address is the MAC address, however, this can be different for other types of networks such as dial-up networking. The PING protocol allows a user to check if a device assigned to a particular IP address is responding. APING application sends a small 35

ICEM, E&TC Engineering 2011-12 packet to a devices logical address and measures the time it takes to receive a response. This round trip time can be used to estimate network latency.
6.1.4. Transport Layer

The transport layer builds on the network layer by dividing each IP address into 65536 ports. This allows multiple applications to run on a network node using a single IP address. A packets full destination at the transport level includes both an IP address and a port number.

Application Layer

HTTP

FTP TCP

SMTP

TFTP Net finder UDP

DHCP DNS BOOTP

Transport Layer Network Layer

IP+ARP/PING HARDWARE DEVICE DRIVERS

Data link Layer

Physical Layer

HARDWARE (ETHERNET, MODEM)

Figure6:TCP /IP PROTOCOL

There are two types of ports (also called sockets) at the transport level: TCP and UDP. Each is described below: Transmission Control Protocol (TCP) - TCP is a connectionoriented protocol providing a reliable byte-stream between two devices. Data delivery is guaranteed and always arrives in-order. User Datagram Protocol (UDP) - UDP is a connectionless protocol providing fast, best effort datagram delivery. A single node may broadcast or multicast packets to multiple nodes. transport layer protocols. Most network nodes implement one or both of the transport layer protocols.

36

ICEM, E&TC Engineering 2011-12 6.1.5 Application Layer The application layer is the topmost protocol level and directly implements the user interface. Each user interface relies on either UDP or TCP at the transport layer. Based on this, the application layer protocols can be divided into two groups. The application layer protocols below rely on UDP:
6.2 Automatic Network Configuration (BOOTP/DHCP)

These protocols allow the embedded system to automatically acquire an IP address from the network. A DHCP/BOOTP server must exist on the network. BOOTP is an older and less efficient version of the DHCP specification but is provided for compatibility with older network hardware
.6.2.1 Netfinder

The net finder protocol allows a PC application to search for embedded systems on a network. When using DHCP, this saves space and hardware costs because the embedded system does not need to display its IP address on an LCD screen .Multiple embedded systems can be differentiated through an external event path. If DHCP is not used, the Net finder protocol allows a PC application to assign a static IP address to an embedded system. This also saves space and hardware costs because static IP address assignment occurs over the network. A second interface (e.g. UART, keypad, etc.) is not required to program the IP Address.
6.2.2 Trivial File Transfer Protocol (TFTP)

The TFTP protocol is a simple way to transfer files. It is typically used to update firmware or download configuration information from a TFTP server.

6.3 The application layer protocols below rely on TCP:


6.3.1 Hyperterminal /Telnet Interface (TCP)

A Hyperterminal /Telnet interface is the simplest interface that can be implemented using TCP. Datais transmitted in both directions and is displayed on a terminal very similar to UART/RS-232.

37

ICEM, E&TC Engineering 2011-12


6.3.2 Web Server Interface (HTTP)

HTTP stands for Hyper Text Transfer Protocol and is used to transfer information (web pages, images, etc.) for display inside a web browser. This protocol allows an embedded system to be monitored and controlled from a web browser . 6.3.2 E-mail Interface (SMTP) SMTP stands for Simple Mail Transfer Protocol and is used to send e-mail messages. This interface allows the embedded system to send e-mail with or without attachments.
6.3.3 File Transfer Protocol (FTP)

This protocol allows the embedded system to become an FTP server accessible from an FTP Client. Files may be uploaded or downloaded to the embedded system.

6.3.4 Domain Name Service (DNS)

This protocol allows domain names such as www.silabs.com to be resolved into an IP address.

38

ICEM, E&TC Engineering 2011-12

CHAPTER 7 GOALS AND FUTURE SCOPE

39

ICEM, E&TC Engineering 2011-12

GOAL OF THE PROJECT: provides a fast control of the device from any part of the world.

FUTURE SCOPE:
Instead of manually entering of the available manpower in field we can use RF ID technology or thumb detector (based on DIP). We can modify this project in such way that it can control the applications. For example user can switch ON/OFF particular equipments such as fans, lights, ACs, etc. In petrol pump we can detect the number plate of all vehicles by using face recognition system for the security purpose.

40

ICEM, E&TC Engineering 2011-12

CHAPTER 8 APPLICATION

41

ICEM, E&TC Engineering 2011-12

APPLICATION
Home appliance .Electric wheel chairs and mobility devices Pumping and ventilation system Industrial Automation Environmental Monitoring Security Access And Gate Control Manufacturing Control And Test Systems HVAC Equipments Water Pumps Factory Automation Process Control Ethernet I/O Transport Building Automation Systems

42

ICEM, E&TC Engineering 2011-12

CHAPTER 9 REFERENCES

43

ICEM, E&TC Engineering 2011-12

REFERENCES

Books
1. Rajkmal, Embedded System, TMH. 2. Andrew Sloss,Arm System Developer Guide. 3. Steve Furber, Arm System on chip Architecture, Addison Wesely.

Websites
1. www.google.com 2. www.wikipedia.org 3. www.alldatasheet.com 4. www.microchip.com 5. www.nxp.com 6. www.keil.com 7. www.analog.com 8. www.stanford.com

44

ICEM, E&TC Engineering 2011-12

CH APTER10 CONCLUSION

45

ICEM, E&TC Engineering 2011-12

CONCLUSION
Hence, the ARM BASED EMBEDDED WEB SERVER projects seminar report is completed satisfactorily with mentioned literature survey and required completion of project as per the Academic Schedule of Pune University. The report work consists of most of innovative topics. This report is completely based on the area of project and project idea

46

Das könnte Ihnen auch gefallen