29

Embedded Network Controller with Web Interface Bradley University Department of Electrical & Computer Engineering By: Ed Siok Advisor: Dr. Malinowski

  • View
    216

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Embedded Network Controller with Web Interface Bradley University Department of Electrical & Computer Engineering By: Ed Siok Advisor: Dr. Malinowski
Page 2: Embedded Network Controller with Web Interface Bradley University Department of Electrical & Computer Engineering By: Ed Siok Advisor: Dr. Malinowski

Embedded Network Controller with Web Interface

Bradley UniversityDepartment of Electrical & Computer Engineering

By: Ed SiokAdvisor: Dr. Malinowski

April 27th, 2006

Page 3: Embedded Network Controller with Web Interface Bradley University Department of Electrical & Computer Engineering By: Ed Siok Advisor: Dr. Malinowski

Topics

Summary Detailed Description

System Block Diagram Software Description

Internet Theory TCP/IP Software

Methods of Implementation Current Status

Page 4: Embedded Network Controller with Web Interface Bradley University Department of Electrical & Computer Engineering By: Ed Siok Advisor: Dr. Malinowski

Summary

Embedded Network Controller with Web Interface

Proof-Of-Concept project showing the use of network and internet protocols with embedded systems

Page 5: Embedded Network Controller with Web Interface Bradley University Department of Electrical & Computer Engineering By: Ed Siok Advisor: Dr. Malinowski

Applications

The internet protocols create an efficient method of communication among devices

Networked devices are being used to control many things Factory Automation Industrial Plants Security & Surveillance

Many can be controlled remotely through a web interface

Page 6: Embedded Network Controller with Web Interface Bradley University Department of Electrical & Computer Engineering By: Ed Siok Advisor: Dr. Malinowski

Topics

Summary Detailed Description

System Block Diagram Software Description

Internet Theory TCP/IP Software

Methods of Implementation Current Status

Page 7: Embedded Network Controller with Web Interface Bradley University Department of Electrical & Computer Engineering By: Ed Siok Advisor: Dr. Malinowski

System Block Diagram

Networked Controller

Internet / Network

Sensors Actuators

Client Computer

Page 8: Embedded Network Controller with Web Interface Bradley University Department of Electrical & Computer Engineering By: Ed Siok Advisor: Dr. Malinowski

System Block Diagram

Networked Controller

Internet / Network

Sensors Actuators

Client Computer

Microcontroller Board: M5282 LITE 5282 Coldfire Processor Complete Development

Board On board Network

Controller

Page 9: Embedded Network Controller with Web Interface Bradley University Department of Electrical & Computer Engineering By: Ed Siok Advisor: Dr. Malinowski

Internet / Network

Network Interface Input & Output – All

interaction with users Addition of XML

information output to be used by a data collection server

Networked Controller

Internet / Network

Temperature Sensors

HVAC

Zoned Dampers

Client Computer

Page 10: Embedded Network Controller with Web Interface Bradley University Department of Electrical & Computer Engineering By: Ed Siok Advisor: Dr. Malinowski

Topics

Summary Detailed Description

System Block Diagram Software Description

Internet Theory TCP/IP Software

Methods of Implementation Current Status

Page 11: Embedded Network Controller with Web Interface Bradley University Department of Electrical & Computer Engineering By: Ed Siok Advisor: Dr. Malinowski

Internet Theory

Internet is merely the interconnection of many networks (internetworking)

Internet Protocol suite: defines how information is sent over the hardware networks

Different network hardware / same communication

Internet works over ethernet, satellite, coaxial cables, wireless

Page 12: Embedded Network Controller with Web Interface Bradley University Department of Electrical & Computer Engineering By: Ed Siok Advisor: Dr. Malinowski

Internet Theory

Goals of Internet Communication: Efficiency Reliability

These goals are achieved through the Internet Protocol Suite

Consider the analogy of the internet vs. postal mail in the protocol suite

Page 13: Embedded Network Controller with Web Interface Bradley University Department of Electrical & Computer Engineering By: Ed Siok Advisor: Dr. Malinowski

Internet Protocol Suite

Hardware Layer

Data Link Layer

Network Layer

Transport Layer

Application Layer

1010100101101010

IP Data

TCP Data

Data

Ethernet Frame

Page 14: Embedded Network Controller with Web Interface Bradley University Department of Electrical & Computer Engineering By: Ed Siok Advisor: Dr. Malinowski

Internet Protocols

Application

Transport

Network

Data Link

Network

Data Link

Network

Data Link

Application

Transport

Network

Data Link

Page 15: Embedded Network Controller with Web Interface Bradley University Department of Electrical & Computer Engineering By: Ed Siok Advisor: Dr. Malinowski

Topics

Summary Detailed Description

System Block Diagram Software Description

Internet Theory TCP/IP Software

Methods of Implementation Current Status

Page 16: Embedded Network Controller with Web Interface Bradley University Department of Electrical & Computer Engineering By: Ed Siok Advisor: Dr. Malinowski

TCP/IP Data Flow

Ethernet Packet?

IP Processing

ARP Processing

TCP

UDP

ICMP

HTTP

DHCP

How packet data flows through the TCP/IP stack to its final application

Page 17: Embedded Network Controller with Web Interface Bradley University Department of Electrical & Computer Engineering By: Ed Siok Advisor: Dr. Malinowski

Software

Packet data in the buffer?

Main Loop

Split Data & Process

Manage HTTP Connections

DHCP Client Function

Manage ARP Entries

Update TCP Connections

Timer Interrupt

Yes

No

Main Loop: Manages all connections and applications

Page 18: Embedded Network Controller with Web Interface Bradley University Department of Electrical & Computer Engineering By: Ed Siok Advisor: Dr. Malinowski

HTTP Request

File Name ? Var1=XX & Var2=XX

Page 19: Embedded Network Controller with Web Interface Bradley University Department of Electrical & Computer Engineering By: Ed Siok Advisor: Dr. Malinowski

HTTP Function

Receive TCP Data into Buffer, Call HTTP Check if received data includes “GET”, parse

file name, parse desired variables Generate hash value to decide which file to

host Store variables in local memory Depending upon file name, run functions to

update web pages desired

Page 20: Embedded Network Controller with Web Interface Bradley University Department of Electrical & Computer Engineering By: Ed Siok Advisor: Dr. Malinowski

Topics

Summary Detailed Description

System Block Diagram Software Description

Internet Theory TCP/IP Software

Methods of Implementation Current Status

Page 21: Embedded Network Controller with Web Interface Bradley University Department of Electrical & Computer Engineering By: Ed Siok Advisor: Dr. Malinowski

Methods of Implementation

1st method: uClinux Positives:

Embedded Linux for Microcontrollers Contains everything needed for development Multithreading Capabilities

Negatives: Large footprint, many involved files Difficult to troubleshoot and make an environment for Took 1 month to build a Cross-Compiler and toolchain

Page 22: Embedded Network Controller with Web Interface Bradley University Department of Electrical & Computer Engineering By: Ed Siok Advisor: Dr. Malinowski

Methods of Implementation

2nd method: OpenTCP stack Positives:

Less files to modify and troubleshoot with Already had a toolchain and cross-compiler built No linux knowledge necessary

Negatives: Several bugs in the software to fix Missing some parts of the TCP stack: IGMP,

Multicasting No file system

Page 23: Embedded Network Controller with Web Interface Bradley University Department of Electrical & Computer Engineering By: Ed Siok Advisor: Dr. Malinowski

Methods of Implementation

As an experiment, both methods were using Cygwin, a linux environment in Windows and a GNU cross compiler Metrowerks Codewarrior is expensive (not on my

laptop) Command based compiling using makefiles and

the GNU C Compiler

Page 24: Embedded Network Controller with Web Interface Bradley University Department of Electrical & Computer Engineering By: Ed Siok Advisor: Dr. Malinowski

Implemented using OpenTCP

Page 25: Embedded Network Controller with Web Interface Bradley University Department of Electrical & Computer Engineering By: Ed Siok Advisor: Dr. Malinowski

Topics

Summary Detailed Description

System Block Diagram Software Description

Internet Theory TCP/IP Software

Methods of Implementation Final Status

Page 26: Embedded Network Controller with Web Interface Bradley University Department of Electrical & Computer Engineering By: Ed Siok Advisor: Dr. Malinowski

Final Status:

Completed: Simple TCP stack implemented DHCP, HTTP, simple CGI applications

implemented Parsing of URLs and storage of variables Dynamic web pages

Page 27: Embedded Network Controller with Web Interface Bradley University Department of Electrical & Computer Engineering By: Ed Siok Advisor: Dr. Malinowski

Current Status

Summary Internet Protocols are implemented on an embedded

microcontroller board A simple web server is implemented

Expansion The next logical step is to interface with sensors and

actuators Expanding the network software to support IGMP /

Multicasting

Page 28: Embedded Network Controller with Web Interface Bradley University Department of Electrical & Computer Engineering By: Ed Siok Advisor: Dr. Malinowski
Page 29: Embedded Network Controller with Web Interface Bradley University Department of Electrical & Computer Engineering By: Ed Siok Advisor: Dr. Malinowski

Any Questions?