seminario embedded internet - investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/sase... ·...

38
Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education Seminario Embedded Internet

Upload: others

Post on 22-Aug-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

Seminario

“Embedded Internet”

Page 2: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

Objectivos:

Presentar el concepto de “Internet Embebido” y sus aplicaciones.

Desarrollar los conceptos del Stack TCP/IP desde la óptica del desarrollador de sistemas embebidos.

Presentar y detallar los componentes de un sistema embebido basado en arquitectura ARM.

Presentar y utilizar las herramientas de desarrollo para sistemas embebidos.

Presentar el libro “Embedded Internet”.

Page 3: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

Agenda:

Introducción a “Internet Embebido”

Presentación del Libro “Embedded Internet”

Sistemas Embebidos

Internet Embebido

Implementación de un Stack de TCP/IP

Page 4: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

Agenda:

Implementación de un Stack de TCP/IP

• Preparing the Labs (Configuration, Utilities, etc)

• The Application and the TCP/IP Stack

• Connecting to a LAN: Ethernet and ARP

• Dial-Up Networking: the PPP protocol

• Implementing the IP layer (IP and ICMP)

• Implementing the Transport layer (UDP and TCP)

Page 5: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

Agenda:

Implementación de un Stack de TCP/IP

• UDP-based and TCP-based Embedded Servers

• Sending e-mail messages: SMTP

• An Embedded WebServer: HTTP

• Outsourcing embedded code: using Web Services

Page 6: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

Introducción a “Internet Embebido”

Definición de Sistemas Embebidos:Special-purpose system in which the computer is

encapsulated by the device it constrols.

Aplicaciones de los Sistemas Embebidos:Home appliances, industrial plants, medicalequipments, communication devices,

automotiveapplications, etc.Beneficios de conectarlos en red / internet:Remote operation/service/monitoring, applicationsoftware update, automatic message dispatch, etc.

Use of the “external intelligence” (internetresources).

Page 7: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

Presentación del Libro:

“Embedded Internet:TCP/IP Basics, Implementation, and Applications”

Sergio Scaglia

[Pearson Education, 2006 - ISBN: 0321306384]

Page 8: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

Presentación del Libro:

“Embedded Internet:TCP/IP Basics, Implementation, and Applications”

• Contenido del Libro

• Contenido del CD

• Getting Started Guide

• Estadísticas

Page 9: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

Sistemas Embebidos:

Arquitectura ARM (Reduced Instruction Set Computer)

PHILIPS (NXP) LPC2100 ARM-Core family

Microcontroladores LPC2124 / LPC2129

• Block diagram

• Pin configuration

• GPIO registers

(PINSEL0 / PINSEL1)

Page 10: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

Sistemas Embebidos:

Herramientas de Desarrollo

• ‘C’ Compiler - IDE – Debugger - JTAG

• Flash Utility

Kit de Desarrollo

• LPC-E2129

• LPC-P2129

Ejemplo de Aplicación

Page 11: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

Internet Embebido: Networking concepts:

• Networking is the process of working with networksand related technologies.• Network is a group of independent units connected together to share information (computers, telephone,electrical networks).

Networking advantages:• Connectivity• Communication

Networking applications:• Data Sharing• Hardware Sharing

Page 12: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

Internet Embebido:

Networking benefits example: Hardware Sharing

Page 13: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

Internet Embebido:

Networking Fundamentals

Switching Network types:

• Circuit Switching Networks

Page 14: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

Internet Embebido:

Networking Fundamentals

Switching Network types:

• Packet Switching Networks

Page 15: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

Internet Embebido:

Networking Fundamentals

Network protocols

Connectionless and Connection-Oriented Protocols

Network Message Structure

Page 16: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

Internet Embebido:

Networking Fundamentals

Network protocols

Connectionless and Connection-Oriented Protocols

Network Message Structure

Message Transmission types

• Unicast Messages

• Multicast Messages

• Broadcast Messages

Page 17: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

Internet Embebido:

Networking Fundamentals

Network protocols

Connectionless and Connection-Oriented Protocols

Network Message Structure

Message Transmission types

Connection Operation Modes

• Simplex Operation

• Half-Duplex Operation

• Full-Duplex Operation

Page 18: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

Internet Embebido:The Open System Interconnection (OSI) Reference Model

Layer 1: Physical Layer (PHY)

Page 19: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

Internet Embebido:The Open System Interconnection (OSI) Reference Model

Layer 2: Data Link Layer (DLL)

Page 20: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

Internet Embebido:The Open System Interconnection (OSI) Reference Model

Layer 3: Network Layer

Page 21: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

Internet Embebido:The Open System Interconnection (OSI) Reference Model

Layer 4: Transport Layer

Page 22: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

Internet Embebido:The Open System Interconnection (OSI) Reference Model

Layer 5: Session Layer

Page 23: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

Internet Embebido:The Open System Interconnection (OSI) Reference Model

Layer 6: Presentation Layer

Page 24: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

Internet Embebido:The Open System Interconnection (OSI) Reference Model

Layer 7: Application Layer

Page 25: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

Internet Embebido:The Open System Interconnection (OSI) Reference Model

Inter-Layer Communications

Page 26: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

Internet Embebido:The Open System Interconnection (OSI) Reference Model

Message Routing

Page 27: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

Internet Embebido:The TCP/IP STACK

The TCP/IP STACK Architecture

Page 28: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

Internet Embebido:The TCP/IP STACK

The TCP/IP STACK Architecture

The TCP/IP Protocol Suite

TCP/IP STACK Protocols Dependencies

Page 29: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

Internet Embebido:The TCP/IP STACK

TCP/IP STACK Protocols Dependencies

Page 30: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

Internet Embebido:The TCP/IP STACK

The TCP/IP STACK Architecture

The TCP/IP Protocol Suite

TCP/IP STACK Protocols Dependencies

Two Perspectives of the TCP/IP SERVICES

The TCP/IP Protocols Standardization Process

• Request For Comments

• Internet Draft• Proposed Standard

• Draft Standard

• Internet Standard

Page 31: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

FIN PARTE I

Page 32: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

Embedded TCP/IP Stack:

Page 33: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

The Application:

Page 34: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

Embedded Application Modules:

Source files

Utilities files

Page 35: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

TCP/IP Stack Structure:

Page 36: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

Embedded TCP/IP Stack Modules:

Layer Module Functionality

stack.c This module inserts the TCP/IP Stack functionality in any source code. It must be included in all sources requiring TCP/IP communications.

ethernet.c It implements the drivers for the Ethernet interface. It is required for the LPC-E212X boards.

arp.c It implements the ARP protocol, needed by the Ethernet drivers to translate IP addresses into MAC addresses.

NE

TW

OR

K

INT

ER

FA

CE

ppp.c It implements the PPP protocol for the Serial interface. It is required for the LPC-P212X boards.

ip.c It implements the Internet Protocol, for the Internet layer.

INT

ER

NE

T

icmp.c It implements the Internet Control Message Protocol.

udp.c It implements the User Datagram Protocol for the Transport layer. It provides simple, fast, unreliable transport over the internetwork.

TR

AN

SP

OR

T

tcp.c It implements the Transmission Control Protocol for the Transport layer. It provides a connection oriented, with flow control, reliable transport over the internetwork.

smtp.c It implements the Simple Message Transport Protocol, needed to send electronic mails.

AP

PL

ICA

TIO

N

http.c It implements the HyperText Transport Protocol, required to implement a web server.

Page 37: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

Embedded TCP/IP Stack Modules:

Page 38: Seminario Embedded Internet - Investigaciónlaboratorios.fi.uba.ar/lse/sase/2010/slides/SASE... · • Preparing the Labs (Configuration, Utilities, etc) • The Application and the

Seminario “Embedded Internet” - © 2006 - Sergio SCAGLIA – Pearson Education

Embedded TCP/IP Stack: