SlideShare une entreprise Scribd logo
1  sur  22
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

DRAFT Internet and world wide web protocol ; pu t ty ; telnet ; wireshark
DRAFT Internet and world wide web protocol ; pu t ty ; telnet ; wiresharkDRAFT Internet and world wide web protocol ; pu t ty ; telnet ; wireshark
DRAFT Internet and world wide web protocol ; pu t ty ; telnet ; wiresharkmeazza_15
 
Building interactivity with websockets
Building interactivity with websocketsBuilding interactivity with websockets
Building interactivity with websocketsWim Godden
 
Your app lives on the network - networking for web developers
Your app lives on the network - networking for web developersYour app lives on the network - networking for web developers
Your app lives on the network - networking for web developersWim Godden
 
Nmap Scripting Engine and http-enumeration
Nmap Scripting Engine and http-enumerationNmap Scripting Engine and http-enumeration
Nmap Scripting Engine and http-enumerationRobert Rowley
 
Monitoring with Syslog and EventMachine
Monitoring with Syslog and EventMachineMonitoring with Syslog and EventMachine
Monitoring with Syslog and EventMachineWooga
 
Nessus scan report using microsoft patchs scan policy - Tareq Hanaysha
Nessus scan report using microsoft patchs scan policy - Tareq HanayshaNessus scan report using microsoft patchs scan policy - Tareq Hanaysha
Nessus scan report using microsoft patchs scan policy - Tareq HanayshaHanaysha
 
Help, my browser is leaking! Exploring XSLeaks attacks and defenses - Tom Van...
Help, my browser is leaking! Exploring XSLeaks attacks and defenses - Tom Van...Help, my browser is leaking! Exploring XSLeaks attacks and defenses - Tom Van...
Help, my browser is leaking! Exploring XSLeaks attacks and defenses - Tom Van...NoNameCon
 
Docker-OVS
Docker-OVSDocker-OVS
Docker-OVSsnrism
 
Docker Networking
Docker NetworkingDocker Networking
Docker NetworkingWeaveworks
 
HTTPS: All you need to know
HTTPS: All you need to knowHTTPS: All you need to know
HTTPS: All you need to knowOVHcloud
 
Vm ware fuzzing - defcon russia 20
Vm ware fuzzing  - defcon russia 20Vm ware fuzzing  - defcon russia 20
Vm ware fuzzing - defcon russia 20DefconRussia
 
Network programming using python
Network programming using pythonNetwork programming using python
Network programming using pythonAli Nezhad
 
Metodologias de Programação IV - Aula 4, Secção 1 - Suporte para cache no pro...
Metodologias de Programação IV - Aula 4, Secção 1 - Suporte para cache no pro...Metodologias de Programação IV - Aula 4, Secção 1 - Suporte para cache no pro...
Metodologias de Programação IV - Aula 4, Secção 1 - Suporte para cache no pro...Leonel Morgado
 
Scalable Socket Server by Aryo
Scalable Socket Server by AryoScalable Socket Server by Aryo
Scalable Socket Server by AryoAgate Studio
 
OSMC 2014: MQTT for monitoring (and for the lo t) | Jan-Piet Mens
OSMC 2014: MQTT for monitoring (and for the lo t) | Jan-Piet MensOSMC 2014: MQTT for monitoring (and for the lo t) | Jan-Piet Mens
OSMC 2014: MQTT for monitoring (and for the lo t) | Jan-Piet MensNETWAYS
 
Ostinato FOSS.IN 2010
Ostinato FOSS.IN 2010Ostinato FOSS.IN 2010
Ostinato FOSS.IN 2010pstavirs
 

Tendances (19)

DRAFT Internet and world wide web protocol ; pu t ty ; telnet ; wireshark
DRAFT Internet and world wide web protocol ; pu t ty ; telnet ; wiresharkDRAFT Internet and world wide web protocol ; pu t ty ; telnet ; wireshark
DRAFT Internet and world wide web protocol ; pu t ty ; telnet ; wireshark
 
Building interactivity with websockets
Building interactivity with websocketsBuilding interactivity with websockets
Building interactivity with websockets
 
Your app lives on the network - networking for web developers
Your app lives on the network - networking for web developersYour app lives on the network - networking for web developers
Your app lives on the network - networking for web developers
 
Nmap Scripting Engine and http-enumeration
Nmap Scripting Engine and http-enumerationNmap Scripting Engine and http-enumeration
Nmap Scripting Engine and http-enumeration
 
Monitoring with Syslog and EventMachine
Monitoring with Syslog and EventMachineMonitoring with Syslog and EventMachine
Monitoring with Syslog and EventMachine
 
Nessus scan report using microsoft patchs scan policy - Tareq Hanaysha
Nessus scan report using microsoft patchs scan policy - Tareq HanayshaNessus scan report using microsoft patchs scan policy - Tareq Hanaysha
Nessus scan report using microsoft patchs scan policy - Tareq Hanaysha
 
Help, my browser is leaking! Exploring XSLeaks attacks and defenses - Tom Van...
Help, my browser is leaking! Exploring XSLeaks attacks and defenses - Tom Van...Help, my browser is leaking! Exploring XSLeaks attacks and defenses - Tom Van...
Help, my browser is leaking! Exploring XSLeaks attacks and defenses - Tom Van...
 
Phd3
Phd3Phd3
Phd3
 
Docker-OVS
Docker-OVSDocker-OVS
Docker-OVS
 
Docker Networking
Docker NetworkingDocker Networking
Docker Networking
 
HTTPS: All you need to know
HTTPS: All you need to knowHTTPS: All you need to know
HTTPS: All you need to know
 
Vm ware fuzzing - defcon russia 20
Vm ware fuzzing  - defcon russia 20Vm ware fuzzing  - defcon russia 20
Vm ware fuzzing - defcon russia 20
 
Network programming using python
Network programming using pythonNetwork programming using python
Network programming using python
 
Dns centos
Dns centosDns centos
Dns centos
 
Metodologias de Programação IV - Aula 4, Secção 1 - Suporte para cache no pro...
Metodologias de Programação IV - Aula 4, Secção 1 - Suporte para cache no pro...Metodologias de Programação IV - Aula 4, Secção 1 - Suporte para cache no pro...
Metodologias de Programação IV - Aula 4, Secção 1 - Suporte para cache no pro...
 
Scalable Socket Server by Aryo
Scalable Socket Server by AryoScalable Socket Server by Aryo
Scalable Socket Server by Aryo
 
OSMC 2014: MQTT for monitoring (and for the lo t) | Jan-Piet Mens
OSMC 2014: MQTT for monitoring (and for the lo t) | Jan-Piet MensOSMC 2014: MQTT for monitoring (and for the lo t) | Jan-Piet Mens
OSMC 2014: MQTT for monitoring (and for the lo t) | Jan-Piet Mens
 
Ostinato FOSS.IN 2010
Ostinato FOSS.IN 2010Ostinato FOSS.IN 2010
Ostinato FOSS.IN 2010
 
tit
tittit
tit
 

Similaire à Ethernet Shield

WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)Ericom Software
 
Application Layer and Socket Programming
Application Layer and Socket ProgrammingApplication Layer and Socket Programming
Application Layer and Socket Programmingelliando dias
 
Apache web server installation/configuration, Virtual Hosting
Apache web server installation/configuration, Virtual HostingApache web server installation/configuration, Virtual Hosting
Apache web server installation/configuration, Virtual Hostingwebhostingguy
 
16network Programming Servers
16network Programming Servers16network Programming Servers
16network Programming ServersAdil Jafri
 
Rpi python web
Rpi python webRpi python web
Rpi python websewoo lee
 
Network Prog.ppt
Network Prog.pptNetwork Prog.ppt
Network Prog.pptEloOgardo
 
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdfJean-Frederic Clere
 
Socket Programming it-slideshares.blogspot.com
Socket  Programming it-slideshares.blogspot.comSocket  Programming it-slideshares.blogspot.com
Socket Programming it-slideshares.blogspot.comphanleson
 
IBM dwLive, "Internet & HTTP - 잃어버린 패킷을 찾아서..."
IBM dwLive, "Internet & HTTP - 잃어버린 패킷을 찾아서..."IBM dwLive, "Internet & HTTP - 잃어버린 패킷을 찾아서..."
IBM dwLive, "Internet & HTTP - 잃어버린 패킷을 찾아서..."Dongwook Lee
 
17937858 squid-server - [the-xp.blogspot.com]
17937858 squid-server - [the-xp.blogspot.com]17937858 squid-server - [the-xp.blogspot.com]
17937858 squid-server - [the-xp.blogspot.com]Krisman Tarigan
 
HTTP2 and gRPC
HTTP2 and gRPCHTTP2 and gRPC
HTTP2 and gRPCGuo Jing
 
Http capturing
Http capturingHttp capturing
Http capturingEric Ahn
 

Similaire à Ethernet Shield (20)

WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
 
Application Layer and Socket Programming
Application Layer and Socket ProgrammingApplication Layer and Socket Programming
Application Layer and Socket Programming
 
03 sockets
03 sockets03 sockets
03 sockets
 
Apache web server installation/configuration, Virtual Hosting
Apache web server installation/configuration, Virtual HostingApache web server installation/configuration, Virtual Hosting
Apache web server installation/configuration, Virtual Hosting
 
Unidade3 roteiro proxy
Unidade3 roteiro proxyUnidade3 roteiro proxy
Unidade3 roteiro proxy
 
Unit 8 Java
Unit 8 JavaUnit 8 Java
Unit 8 Java
 
16network Programming Servers
16network Programming Servers16network Programming Servers
16network Programming Servers
 
Rpi python web
Rpi python webRpi python web
Rpi python web
 
T2
T2T2
T2
 
Network Prog.ppt
Network Prog.pptNetwork Prog.ppt
Network Prog.ppt
 
Net Programming.ppt
Net Programming.pptNet Programming.ppt
Net Programming.ppt
 
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
 
Socket Programming it-slideshares.blogspot.com
Socket  Programming it-slideshares.blogspot.comSocket  Programming it-slideshares.blogspot.com
Socket Programming it-slideshares.blogspot.com
 
Sockets intro
Sockets introSockets intro
Sockets intro
 
IBM dwLive, "Internet & HTTP - 잃어버린 패킷을 찾아서..."
IBM dwLive, "Internet & HTTP - 잃어버린 패킷을 찾아서..."IBM dwLive, "Internet & HTTP - 잃어버린 패킷을 찾아서..."
IBM dwLive, "Internet & HTTP - 잃어버린 패킷을 찾아서..."
 
17937858 squid-server - [the-xp.blogspot.com]
17937858 squid-server - [the-xp.blogspot.com]17937858 squid-server - [the-xp.blogspot.com]
17937858 squid-server - [the-xp.blogspot.com]
 
Pemrograman Jaringan
Pemrograman JaringanPemrograman Jaringan
Pemrograman Jaringan
 
28 networking
28  networking28  networking
28 networking
 
HTTP2 and gRPC
HTTP2 and gRPCHTTP2 and gRPC
HTTP2 and gRPC
 
Http capturing
Http capturingHttp capturing
Http capturing
 

Plus de Tinker London

Homesense @ La Cantine
Homesense @ La CantineHomesense @ La Cantine
Homesense @ La CantineTinker London
 
Programming for Artists and Designers: Week 3
Programming for Artists and Designers: Week 3Programming for Artists and Designers: Week 3
Programming for Artists and Designers: Week 3Tinker London
 
Programming for Artists and Designers: Week 2
Programming for Artists and Designers: Week 2Programming for Artists and Designers: Week 2
Programming for Artists and Designers: Week 2Tinker London
 
Programming for Artists and Designers: Week 1
Programming for Artists and Designers: Week 1Programming for Artists and Designers: Week 1
Programming for Artists and Designers: Week 1Tinker London
 
Mobile Games and Hardware Hacking
Mobile Games and Hardware HackingMobile Games and Hardware Hacking
Mobile Games and Hardware HackingTinker London
 
Arduino and Open Hardware
Arduino and Open HardwareArduino and Open Hardware
Arduino and Open HardwareTinker London
 

Plus de Tinker London (9)

Homesense @ La Cantine
Homesense @ La CantineHomesense @ La Cantine
Homesense @ La Cantine
 
Arduino Power
Arduino PowerArduino Power
Arduino Power
 
Programming for Artists and Designers: Week 3
Programming for Artists and Designers: Week 3Programming for Artists and Designers: Week 3
Programming for Artists and Designers: Week 3
 
XBee and RFID
XBee and RFIDXBee and RFID
XBee and RFID
 
Programming for Artists and Designers: Week 2
Programming for Artists and Designers: Week 2Programming for Artists and Designers: Week 2
Programming for Artists and Designers: Week 2
 
Programming for Artists and Designers: Week 1
Programming for Artists and Designers: Week 1Programming for Artists and Designers: Week 1
Programming for Artists and Designers: Week 1
 
Playful
PlayfulPlayful
Playful
 
Mobile Games and Hardware Hacking
Mobile Games and Hardware HackingMobile Games and Hardware Hacking
Mobile Games and Hardware Hacking
 
Arduino and Open Hardware
Arduino and Open HardwareArduino and Open Hardware
Arduino and Open Hardware
 

Dernier

2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)Delhi Call girls
 
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)Delhi Call girls
 
Top Rated Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Morcall Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Morvikas rana
 
KLINIK BATA Jual obat penggugur kandungan 087776558899 ABORSI JANIN KEHAMILAN...
KLINIK BATA Jual obat penggugur kandungan 087776558899 ABORSI JANIN KEHAMILAN...KLINIK BATA Jual obat penggugur kandungan 087776558899 ABORSI JANIN KEHAMILAN...
KLINIK BATA Jual obat penggugur kandungan 087776558899 ABORSI JANIN KEHAMILAN...Cara Menggugurkan Kandungan 087776558899
 
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...PsychicRuben LoveSpells
 
the Husband rolesBrown Aesthetic Cute Group Project Presentation
the Husband rolesBrown Aesthetic Cute Group Project Presentationthe Husband rolesBrown Aesthetic Cute Group Project Presentation
the Husband rolesBrown Aesthetic Cute Group Project Presentationbrynpueblos04
 
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)Delhi Call girls
 
Pokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy TheoryPokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy Theorydrae5
 
LC_YouSaidYes_NewBelieverBookletDone.pdf
LC_YouSaidYes_NewBelieverBookletDone.pdfLC_YouSaidYes_NewBelieverBookletDone.pdf
LC_YouSaidYes_NewBelieverBookletDone.pdfpastor83
 
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)Delhi Call girls
 
WOMEN EMPOWERMENT women empowerment.pptx
WOMEN EMPOWERMENT women empowerment.pptxWOMEN EMPOWERMENT women empowerment.pptx
WOMEN EMPOWERMENT women empowerment.pptxpadhand000
 

Dernier (14)

2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)
 
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
 
Top Rated Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Morcall Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
 
(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7
(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7
(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7
 
KLINIK BATA Jual obat penggugur kandungan 087776558899 ABORSI JANIN KEHAMILAN...
KLINIK BATA Jual obat penggugur kandungan 087776558899 ABORSI JANIN KEHAMILAN...KLINIK BATA Jual obat penggugur kandungan 087776558899 ABORSI JANIN KEHAMILAN...
KLINIK BATA Jual obat penggugur kandungan 087776558899 ABORSI JANIN KEHAMILAN...
 
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
 
the Husband rolesBrown Aesthetic Cute Group Project Presentation
the Husband rolesBrown Aesthetic Cute Group Project Presentationthe Husband rolesBrown Aesthetic Cute Group Project Presentation
the Husband rolesBrown Aesthetic Cute Group Project Presentation
 
(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...
(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...
(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...
 
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
 
Pokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy TheoryPokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy Theory
 
LC_YouSaidYes_NewBelieverBookletDone.pdf
LC_YouSaidYes_NewBelieverBookletDone.pdfLC_YouSaidYes_NewBelieverBookletDone.pdf
LC_YouSaidYes_NewBelieverBookletDone.pdf
 
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
 
WOMEN EMPOWERMENT women empowerment.pptx
WOMEN EMPOWERMENT women empowerment.pptxWOMEN EMPOWERMENT women empowerment.pptx
WOMEN EMPOWERMENT women empowerment.pptx
 

Ethernet Shield

  • 4. ★Wiznet W5100 ethernet chip ★Client ★Server ★TCP ★UDP ★Four channels Capabilities
  • 5. ★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
  • 6. ★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
  • 7. Practical 1: on the network
  • 8. Example file: ChatServer Practical 1: on the network
  • 9. 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
  • 11. $ curl -v http://www.example.com Talking HTTP
  • 12. $ 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
  • 13. $ 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
  • 14. $ 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
  • 15. $ 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
  • 16. > 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
  • 18. Example file: WebClient Practical 2: retrieving data
  • 19. ★It’s just HTTP ★At least, the good ones are Web APIs
  • 20. ★HTTPS ★Crypto (e.g. OAuth) ★XML parsing ★JSON parsing ★Large documents Web API challenges
  • 22. Example file: WebServer Practical 3: serving data