• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Ethernet Shield
 

Ethernet Shield

on

  • 1,034 views

Introduction to using the ethernet shield with Arduino. Part of Internet of Things workshop at dConstruct 2009.

Introduction to using the ethernet shield with Arduino. Part of Internet of Things workshop at dConstruct 2009.

Statistics

Views

Total Views
1,034
Views on SlideShare
1,033
Embed Views
1

Actions

Likes
0
Downloads
8
Comments
0

1 Embed 1

http://www.slideshare.net 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Ethernet Shield Ethernet Shield Presentation Transcript

    • Arduino Ethernet Shield
    • Arduino + Ethernet
    • Twittering plant
    • ★Wiznet W5100 ethernet chip ★Client ★Server ★TCP ★UDP ★Four channels Capabilities
    • ★All looks like a serial port ★Ethernet: initialise network ★Client: connect to a port on a server, then read() and write() ★Server: waits for a connection on a port The Ethernet library
    • ★DHCP needs 3rd-party library ★No DNS ★DIY for high-level protocols (no HTTP library, etc) - lots of print() statements ★Library memory footprint Ethernet limitations
    • Practical 1: on the network
    • Example file: ChatServer Practical 1: on the network
    • byte mac[] = { 0xDE,0xAD,0xBE,0xEF,0xFE, 0xED }; byte ip[] = { 10, 0, 0, 177 }; byte gateway[] = { 10, 0, 0, 1 }; byte subnet[] = { 255, 255, 0, 0 }; ... Ethernet.begin(mac,ip,gateway,subnet); Configuration
    • Talking HTTP
    • $ curl -v http://www.example.com Talking HTTP
    • $ curl -v http://www.example.com * About to connect() to www.example.com port 80 (#0) * Trying 208.77.188.166... connected * Connected to www.example.com (208.77.188.166) port 80 (#0) Talking HTTP: the request
    • $ curl -v http://www.example.com * About to connect() to www.example.com port 80 (#0) * Trying 208.77.188.166... connected * Connected to www.example.com (208.77.188.166) port 80 (#0) > GET / HTTP/1.1 > User-Agent: curl/7.16.3 > Host: www.example.com > Accept: */* > Talking HTTP: the request
    • $ curl -v http://www.example.com * About to connect() to www.example.com port 80 (#0) * Trying 208.77.188.166... connected * Connected to www.example.com (208.77.188.166) port 80 (#0) > GET / HTTP/1.1 > User-Agent: curl/7.16.3 > Host: www.example.com > Accept: */* > < HTTP/1.1 200 OK < Date: Sun, 16 Aug 2009 16:05:42 GMT < Server: Apache/2.2.3 (Red Hat) < Last-Modified: Tue, 15 Nov 2005 13:24:10 GMT < ETag: "b80f4-1b6-80bfd280" < Accept-Ranges: bytes < Content-Length: 438 < Connection: close < Content-Type: text/html; charset=UTF-8 Talking HTTP: the response
    • $ curl -v http://www.example.com * About to connect() to www.example.com port 80 (#0) * Trying 208.77.188.166... connected * Connected to www.example.com (208.77.188.166) port 80 (#0) > GET / HTTP/1.1 > User-Agent: curl/7.16.3 > Host: www.example.com > Accept: */* > < HTTP/1.1 200 OK < Date: Sun, 16 Aug 2009 16:05:42 GMT < Server: Apache/2.2.3 (Red Hat) < Last-Modified: Tue, 15 Nov 2005 13:24:10 GMT < ETag: "b80f4-1b6-80bfd280" < Accept-Ranges: bytes < Content-Length: 438 < Connection: close < Content-Type: text/html; charset=UTF-8 < <HTML> .......... Talking HTTP: the document
    • > GET / HTTP/1.1 > Host: www.example.com > < HTTP/1.1 200 OK < Content-Type: text/html; charset=UTF-8 < <HTML> .......... The most important bits
    • Practical 2: retrieving data
    • Example file: WebClient Practical 2: retrieving data
    • ★It’s just HTTP ★At least, the good ones are Web APIs
    • ★HTTPS ★Crypto (e.g. OAuth) ★XML parsing ★JSON parsing ★Large documents Web API challenges
    • Practical 3: serving data
    • Example file: WebServer Practical 3: serving data