loading

This project show you how to make the DHCP/DNS/HTTP request using a WIZwiki-W7500.

The objective of this project was to use and WIZwiki-W7500 to read a weather site receive the value to the ethernet, to be stored in a WIZwiki-W7500 and displayed.

first,

Let's look at the DHCP/ DNS / HTTP protocol.

1. DHCP protocol

Sets up a DHCP server that automatically assigns temporary IP addresses to client computers on the same network.

2. DNS protocol

You can take the IP of Domain using the DNS protocol.

3. HTTP protocol

It take the information of web page from web server.

Step 1: Part

WIZwiki-W7500

  • ARM Cortex-M0 + Hardwared TCP/IP

Hardware parts for Web Client

WIZwiki-W7500

  • 32-bit ARM Cortex-M0
  • Flash : 128KB / SRAM : 16KB (up to 48KB)
  • Hardwired TCP/IP Core (Supports MII Interface)
  • Internal 8MHz Oscillator
  • External crystal Oscillator (8~24MHz)
  • 48MHz maximum frequency
  • PLL for internal clock source
  • ADC - 12bit, 8ch, 1Mbps
  • DMA - UART, SPI, Software
  • GPIO 53ea I/O
  • 4 Timer/ 8 PWM
  • 3 UART, 2 SPI, 2 I2C
  • 32bit RNG
  • Serial Wire Debug(SWD)
  • Package : 64TQFP (7x7 mm)

For detailed, please visit to http://wizwiki.net/wiki/doku.php?id=products:wizwi...


Step 2: DHCP

The Dynamic Host Configuration Protocol (DHCP) is a standardized network protocol used on Internet Protocol (IP) networks for dynamically distributing network configuration parameters, such as IP addresses for interfaces and services. With DHCP, computers request IP addresses and networking parameters automatically from a DHCP server, reducing the need for a network administrator or a user to configure these settings manually.

In conclusion, DHCP Client take the Dynamic IP address from DHCP Server.

DHCP operate the four operation(Discovery,Offer,Request,Ack)

For detailed information, please refer to attached video or figure.

reference site : DHCP Basic(Korean)

Step 3: DNS

The Domain Name System maps DNS domain names to IP addresses

The process entails:

1. A network host is configured with an initial cache (so called hints) of the known addresses of the root name servers. Such a hint file is updated periodically by an administrator from a reliable source.
2. A query to one of the root servers to find the server authoritative for the top-level domain.
3. A query to the obtained TLD server for the address of a DNS server authoritative for the second-level domain.
4. Repetition of the previous step to process each domain name label in sequence, until the final step which returns the IP address of the host sought.

In conclusion,DNS(ex.www.google.com) covert Domain to IP address

reference site : DNS Basic(korean)

Step 4: HTTP Client

  • Domain : The physical server where website is hosted
  • URI : The ID which maps to files on server
  • Query String Part of GET request to in values to customize the output

The Hypertext Transfer Protocol(HTTP)is an application protocol for distributed, collaborative, hypermedia information systems.

HTTP is the foundation of data communication for the World Wide Web.

An HTTP client initiates a request by establishing a Transmission Control Protocol(TCP) connection to a particular port on a server(typically port 80, occasionally port 8080).

Step 5: Result

An HTTP server listening on that port waits for a client's request message. Upon receiving the request, the server sends back a status line, such as "HTTP/1.1 200 OK", and a message of its own. The body of this message is typically the requested resource, although an error message or other information may also be returned.

Step 6: Source Code

WIZwiki-W7500 firmware project based on Keil MDK and ARM-gcc. Libraries and example source code download from GitHub

Download Link : WIZnet GitHub

in ioLibrary\Internet\DNS\dns.h
#define  MAX_DOMAIN_NAME   50 //You must change the MAX_DOMAIN_NAME from 16 to 50

If you have question about W7500, please visit to http://wizwiki.net/wiki/doku.php?id=products:wizwiki_w7500:start

<p>Nicely done. Thanks for sharing this!</p>
<p>I hope that you find this useful</p>

About This Instructable

383views

7favorites

License:

Bio: I am SoC engineer^^
More by irinak1:Control ppt using bluetooth module. Of the cats, by the cats, for the cats Smart Watch using SNTP 
Add instructable to: