How To Raspberry Pi Ethernet
How To Raspberry Pi Ethernet
by renakim
WiFi is convenient, but sometimes it's slow or disconnects. Some projects require a more reliable connection than
convenience.
In this case, it may be more advantageous to use a wired connection, that is, an Ethernet interface.
So, I'm going to explain how to add an Ethernet interface to Raspberry Pi Zero W.
Supplies:
Hardware
Raspberry Pi zero W
WIZ850io (W5500 ethernet module)
Jumper wires
The WIZ850io is a module from WIZnet, which is based on the W5500 Ethernet chip and includes an RJ45 connector.
The W5500 is an Ethernet controller chip with hardwired TCP/IP and supports SPI communication. It helps to easily add
an internet connection to the embedded system.
Details of the WIZ850io module can be found on the link below.
WIZ850io shop link
WIZ850io
Software
To store and manage sessions, I used PuTTY, a representative free terminal program. You can use the terminal program
you are comfortable with.
PuTTY (optional)
Raspberry Pi OS
I used 2021-10-30 released version (Linux kernel 5.10.63)
If all the pins are connected, it will look like the image.
To modify les in the boot directory, root authority is required, so use the sudo command.
sudo vi /boot/config.txt
Since the ssh connection is disconnected after rebooting, run putty again to connect.
Activate the W5500 ethernet device driver module using the modprobe command.
The W5500 device driver can be referred to in the following path.
Raspberry Pi linux - ethernet
Use the following command to check whether the driver module has been successfully loaded.
lsmod | grep w5100
Now, we can check the network interface with the ifcon g -a command.
We can see that the eth0 interface has been created. If a DHCP server is set up on the router, an IP can be assigned
automatically.
Optionally, you can con gure Ethernet to be used as a static IP. Set the IP according to the internal network IP band of the
environment in use.
Since my AP uses the 192.168.50.X band, I set it up like below.
Open a network con guration le with VIM.
sudo vi /etc/dhcpcd.conf
interface eth0
static ip_address=192.168.50.96/24
static routers=192.168.50.1
static domain_name_servers=168.126.63.1 168.126.63.2
Now, you can connect to Raspberry Pi zero W with ethernet interface using static IP!