We will go through the steps of communicating to a digilent Zedboard using the UART and the Ethernet port.
This tutorial assumes that the zedboard SD card was flashed with the Xillinux distribution for Zynq-7000 EPP
and the host system is running a ubuntu 14.04 or newer (tested on 16.04).
Connect the host (USB) to the zedboard's UART port (micro USB) and execute on the host:
# Install minicom
apt update && apt install minicom
minicom –D /dev/ttyACM0 –b 115200 -8 -o
Congratulations, you are connected to the zedboard
- For minicom help:
CTRL+a z
- To exit minicom
CTRL+a x
Connect the zedboard to the host using the ethernet port on the host system, or an ethernet to usb adapter.
By default the zedboard's os has eth0 cunfigured to have the static ip of: 192.168.1.10
Configure on the host:
- Network Connections > (Select the connection interface to the zedboard) > Edit > IPv4 Settings:
- Change
Method
toManual
- Edit Address to:
192.168.1.1
- Edit Netmask to:
255.255.255.0
Use the menu on the host to disconnect and connect to the interface that you have just configured.
- Connect to the board by:
ssh root@192.168.1.10
Network Connections > (Select the connection interface) > Edit > IPv4 Settings:
- Change
Method
toShare to other computers
Use the menu on the host to disconnect and connect to the interface that you have just configured
execute ip addr
and confirm the ip of the connection interface that is being shared
10.42.0.1
in my machine
Use minicom to connect to the board (see above).
In the zedboard:
- Edit the file
/etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 10.42.0.10
netmask 255.255.255.0
gateway 10.42.0.1
- And fix your DNS resolver by editing the file
/etc/resolv.conf
to
nameserver 10.42.0.1
Execute the command to change the configurations of your zedboard
ifdown eth0; ifup eth0
And voiala! At this point should would be able to ping your host at:
root@localhost:~# ping 10.42.0.1
PING 10.42.0.1 (10.42.0.1) 56(84) bytes of data.
64 bytes from 10.42.0.1: icmp_req=1 ttl=64 time=0.424 ms
64 bytes from 10.42.0.1: icmp_req=2 ttl=64 time=0.498 ms
Ping a internet hosted website 8.8.8.8
through your host connection:
root@localhost:~# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_req=1 ttl=53 time=6.93 ms
64 bytes from 8.8.8.8: icmp_req=2 ttl=53 time=6.89 ms
64 bytes from 8.8.8.8: icmp_req=3 ttl=53 time=7.22 ms
And if you have setup /etc/resolv.conf
correctly you can also access the internet using full domain names:
root@localhost:~# ping www.google.com
PING www.google.com (172.217.10.132) 56(84) bytes of data.
64 bytes from lga34s16-in-f4.1e100.net (172.217.10.132): icmp_req=1 ttl=53 time=7.02 ms
64 bytes from lga34s16-in-f4.1e100.net (172.217.10.132): icmp_req=2 ttl=53 time=7.20 ms
Files to keep in mind
/etc/network/interfaces describes the network interfaces
/etc/hostname configures the nameserver credentials
/etc/hosts resolves IP addresses to hostnames
/etc/resolv.conf configure your DNS resolver