If a valid connection between the phyBOARD-i.MX7 and a DHCP enabled network is made before boot-up then the phyBOARD-i.MX7 will automatically secure a connection and assign an ip address.


Gigabit Ethernet links are provided via ETH1 and ETH2 on the phyBOARD-i.MX7 development kit. This guide shows you how to connect and use these interfaces. You will need a CAT5e cable and a network switch connected to a DHCP enabled network to follow this guide. 

Step-by-Step Guide

  • Connect your Ethernet cable between ETH1 on the development kit and an Ethernet switch connected to the network. 


  • On the phyCORE-i.MX7 Linux console, enter the following command to bring up the Ethernet interface. ETH1 and ETH2 in the hardware are represented in sysfs as interfaces eth0 and eth1 respectively. 

    Target (Linux)

    ifconfig eth0 up && udhcpc -i eth0
    CODE
  • Wait until the link is ready and an IP address has been assigned.
  • Test your connection by entering the following and verify that you are able to send and receive packets over your network connection:

    Target (Linux)

    ping google.com -c 10
    CODE

    Expected Output

    root@imx7d-phyboard-zeta-004:~# ping google.com -c 10
    PING google.com (216.58.193.78) 56(84) bytes of data.
    64 bytes from sea15s07-in-f78.1e100.net (216.58.193.78): icmp_seq=1 ttl=53 time=12.7 ms
    64 bytes from sea15s07-in-f78.1e100.net (216.58.193.78): icmp_seq=2 ttl=53 time=13.5 ms
    64 bytes from sea15s07-in-f78.1e100.net (216.58.193.78): icmp_seq=3 ttl=53 time=14.5 ms
    64 bytes from sea15s07-in-f78.1e100.net (216.58.193.78): icmp_seq=4 ttl=53 time=14.4 ms
    64 bytes from sea15s07-in-f78.1e100.net (216.58.193.78): icmp_seq=5 ttl=53 time=12.5 ms
    64 bytes from sea15s07-in-f78.1e100.net (216.58.193.78): icmp_seq=6 ttl=53 time=12.2 ms
    64 bytes from sea15s07-in-f78.1e100.net (216.58.193.78): icmp_seq=7 ttl=53 time=14.5 ms
    64 bytes from sea15s07-in-f78.1e100.net (216.58.193.78): icmp_seq=8 ttl=53 time=12.7 ms
    64 bytes from sea15s07-in-f78.1e100.net (216.58.193.78): icmp_seq=9 ttl=53 time=12.8 ms
    64 bytes from sea15s07-in-f78.1e100.net (216.58.193.78): icmp_seq=10 ttl=53 time=13.2 ms
    
    --- google.com ping statistics ---
    10 packets transmitted, 10 received, 0% packet loss, time 9015ms
    rtt min/avg/max/mdev = 12.242/13.331/14.541/0.841 ms
    CODE

Repeating the above steps with ETH1 would yield similar connection results. 


  • To view the IP address assigned to your device, use the following command:

    Target (Linux)

    ifconfig
    CODE

    Expected Output

    root@imx7d-phyboard-zeta-004:~# ifconfig
    eth0 	Link encap:Ethernet HWaddr 50:2d:f4:0a:30:60
    		inet addr:192.267.3.339 Bcast:192.267.3.245 Mask:255.0.255.0
    		inet6 addr: fe10::522c:f4f4:fe0a:4460/64 Scope:Link
    		UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    		RX packets:53 errors:0 dropped:0 overruns:0 frame:0
    		TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
    		collisions:0 txqueuelen:1000
    		RX bytes:7139 (6.9 KiB) TX bytes:4848 (4.7 KiB)
    
    lo 		Link encap:Local Loopback
    		inet addr:127.0.0.0 Mask:255.0.0.0
    		inet6 addr: ::1/128 Scope:Host
    		UP LOOPBACK RUNNING MTU:65536 Metric:1
    		RX packets:9520 errors:0 dropped:0 overruns:0 frame:0
    		TX packets:9520 errors:0 dropped:0 overruns:0 carrier:0
    		collisions:0 txqueuelen:1
    		RX bytes:723520 (706.5 KiB) TX bytes:723520 (706.5 KiB)
    CODE
  • In the above example we can see that the assigned IP address is 192.267.3.339