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

Linux Network commands
Linux Network commandsLinux Network commands
Linux Network commandsHanan Nmr
 
NGiNX, VHOSTS & SSL (let's encrypt)
NGiNX, VHOSTS & SSL (let's encrypt)NGiNX, VHOSTS & SSL (let's encrypt)
NGiNX, VHOSTS & SSL (let's encrypt)Marcel Cattaneo
 
Rasperry pi Part 12
Rasperry pi Part 12Rasperry pi Part 12
Rasperry pi Part 12Techvilla
 
Vert.x clustering on Docker, CoreOS and ETCD
Vert.x clustering on Docker, CoreOS and ETCDVert.x clustering on Docker, CoreOS and ETCD
Vert.x clustering on Docker, CoreOS and ETCDTim Nolet
 
securing_syslog_onFreeBSD
securing_syslog_onFreeBSDsecuring_syslog_onFreeBSD
securing_syslog_onFreeBSDwebuploader
 
Opentalk at Large - StS 2005
Opentalk at Large - StS 2005Opentalk at Large - StS 2005
Opentalk at Large - StS 2005Martin Kobetic
 
OpenSSH: keep your secrets safe
OpenSSH: keep your secrets safeOpenSSH: keep your secrets safe
OpenSSH: keep your secrets safeGiovanni Bechis
 
Service Discovery for Continuous Delivery with Docker
Service Discovery for Continuous Delivery with DockerService Discovery for Continuous Delivery with Docker
Service Discovery for Continuous Delivery with DockerTim Nolet
 
Docker Networking
Docker NetworkingDocker Networking
Docker NetworkingWeaveworks
 
Docker-OVS
Docker-OVSDocker-OVS
Docker-OVSsnrism
 
Weave Networking on Docker
Weave Networking on DockerWeave Networking on Docker
Weave Networking on DockerStylight
 
OlinData Puppet Presentation for MOSC 2012
OlinData Puppet Presentation for MOSC 2012OlinData Puppet Presentation for MOSC 2012
OlinData Puppet Presentation for MOSC 2012Walter Heck
 
Securing the tunnel with Raccoon
Securing the tunnel with RaccoonSecuring the tunnel with Raccoon
Securing the tunnel with RaccoonGloria Stoilova
 
IPv6 in CloudStack Basic Networking
IPv6 in CloudStack Basic NetworkingIPv6 in CloudStack Basic Networking
IPv6 in CloudStack Basic NetworkingWido den Hollander
 
TRENDnet IP Camera Multiple Vulnerabilities
TRENDnet IP Camera Multiple VulnerabilitiesTRENDnet IP Camera Multiple Vulnerabilities
TRENDnet IP Camera Multiple Vulnerabilitiesinsight-labs
 
Dockerffm meetup 20150113_networking
Dockerffm meetup 20150113_networkingDockerffm meetup 20150113_networking
Dockerffm meetup 20150113_networkingAndreas Schmidt
 

Tendances (18)

Linux Network commands
Linux Network commandsLinux Network commands
Linux Network commands
 
NGiNX, VHOSTS & SSL (let's encrypt)
NGiNX, VHOSTS & SSL (let's encrypt)NGiNX, VHOSTS & SSL (let's encrypt)
NGiNX, VHOSTS & SSL (let's encrypt)
 
Rasperry pi Part 12
Rasperry pi Part 12Rasperry pi Part 12
Rasperry pi Part 12
 
Vert.x clustering on Docker, CoreOS and ETCD
Vert.x clustering on Docker, CoreOS and ETCDVert.x clustering on Docker, CoreOS and ETCD
Vert.x clustering on Docker, CoreOS and ETCD
 
Netmiko library
Netmiko libraryNetmiko library
Netmiko library
 
securing_syslog_onFreeBSD
securing_syslog_onFreeBSDsecuring_syslog_onFreeBSD
securing_syslog_onFreeBSD
 
Opentalk at Large - StS 2005
Opentalk at Large - StS 2005Opentalk at Large - StS 2005
Opentalk at Large - StS 2005
 
OpenSSH: keep your secrets safe
OpenSSH: keep your secrets safeOpenSSH: keep your secrets safe
OpenSSH: keep your secrets safe
 
Service Discovery for Continuous Delivery with Docker
Service Discovery for Continuous Delivery with DockerService Discovery for Continuous Delivery with Docker
Service Discovery for Continuous Delivery with Docker
 
Docker Networking
Docker NetworkingDocker Networking
Docker Networking
 
Docker-OVS
Docker-OVSDocker-OVS
Docker-OVS
 
Weave Networking on Docker
Weave Networking on DockerWeave Networking on Docker
Weave Networking on Docker
 
OlinData Puppet Presentation for MOSC 2012
OlinData Puppet Presentation for MOSC 2012OlinData Puppet Presentation for MOSC 2012
OlinData Puppet Presentation for MOSC 2012
 
Securing the tunnel with Raccoon
Securing the tunnel with RaccoonSecuring the tunnel with Raccoon
Securing the tunnel with Raccoon
 
IPv6 in CloudStack Basic Networking
IPv6 in CloudStack Basic NetworkingIPv6 in CloudStack Basic Networking
IPv6 in CloudStack Basic Networking
 
Linux networking
Linux networkingLinux networking
Linux networking
 
TRENDnet IP Camera Multiple Vulnerabilities
TRENDnet IP Camera Multiple VulnerabilitiesTRENDnet IP Camera Multiple Vulnerabilities
TRENDnet IP Camera Multiple Vulnerabilities
 
Dockerffm meetup 20150113_networking
Dockerffm meetup 20150113_networkingDockerffm meetup 20150113_networking
Dockerffm meetup 20150113_networking
 

Similaire à Arduino Ethernet Shield Setup and HTTP Communication

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 à Arduino Ethernet Shield Setup and HTTP Communication (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
 
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
 
The HTML5 WebSocket API
The HTML5 WebSocket APIThe HTML5 WebSocket API
The HTML5 WebSocket API
 

Plus de Tinker

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
 
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
 
Programming for Artists and Designers: Week1
Programming for Artists and Designers: Week1Programming for Artists and Designers: Week1
Programming for Artists and Designers: Week1Tinker
 
Milan Mobile Games
Milan Mobile GamesMilan Mobile Games
Milan Mobile GamesTinker
 
Arduino and Open Hardware
Arduino and Open HardwareArduino and Open Hardware
Arduino and Open HardwareTinker
 
Playful
PlayfulPlayful
PlayfulTinker
 
XBee and RFID
XBee and RFIDXBee and RFID
XBee and RFIDTinker
 

Plus de Tinker (7)

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
 
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: Week1
Programming for Artists and Designers: Week1Programming for Artists and Designers: Week1
Programming for Artists and Designers: Week1
 
Milan Mobile Games
Milan Mobile GamesMilan Mobile Games
Milan Mobile Games
 
Arduino and Open Hardware
Arduino and Open HardwareArduino and Open Hardware
Arduino and Open Hardware
 
Playful
PlayfulPlayful
Playful
 
XBee and RFID
XBee and RFIDXBee and RFID
XBee and RFID
 

Dernier

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 

Dernier (20)

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

Arduino Ethernet Shield Setup and HTTP Communication

  • 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