Dynamic Host Configuration Protocol (DHCP) is a network management protocol that automatically assigns IP addresses under your router’s IP network. This method provides the device within their network could communicate to the internet.
For creating this method, WIZnet’s has made a simple coding in their library for PICO users to easily get assigned IP address from your DHCP server. Please refer the steps below.
- Import libraries – wiznet5k
- Activate and set the GPIO pins for SPI communication and reset pin
- Set your MAC address settings
- Initialize your Ethernet interface with your Router
- Your router will automatically provide an IP address to you.
For more information, please refer the link below.
- WIZNet’s DHCP example codes- https://github.com/Wiznet/RP2040-HAT-CircuitPython/tree/master/examples/DHCP
- How to setup WIZnet Library into Raspberry Pi Pico? – https://www.iwiznet.cn/2021/12/13/how-to-install-wiznet-library-into-raspberry-pi-pico/
- How to create a simple TCP/IP connection? – https://www.iwiznet.cn/2021/12/15/how-to-create-a-simple-tcp-ip-connection/
- Thonny: https://thonny.org/
- Window’s cmd terminal