Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updating numbered headings
Table of Contents
minLevel1
maxLevel6
outlinefalse
stylenone
typelist
printablefalse

1. Connecting to Ethernet LAN

To connect the kit to Ethernet LAN, plug the Ethernet cable (included with the kit) between the J14 Ethernet connector on the HGI NAVQ Plus board and an Ethernet switch (or similar) connected to your LAN. The following picture illustrates connection on the kit side:

...

To unplug the cable from the kit, push the two buttons on the sides of the cable connector while pulling the connector out of the kit.

2. Using Ethernet in Linux

When Linux boots, the Ethernet interface is enabled and configured in the default image installed to the kit. The IP address is obtained from a DHCP server. Use the following command to see the IP address that has been assigned to your kit:

Code Block
root@imx8mmcubeuser@imx8mpnavq:~# ifconfig eth0 
eth0~$ sudo ifconfig eth1 up                                                                                                                                                                    
 Link encap:Ethernet  HWaddr D6:1D:22:5D:D6:B6[sudo] password for user:                                                                                                                                                                                  
user@imx8mpnavq:~$ ifconfig eth1                                                                                                                                                                           
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500                                                                                                                                                 
        inet addr:192.168.1.16  Bcast:.0.202  netmask 255.255.255.0  broadcast 192.168.1.255  Mask:255.255.255.00.255                                                                                                                                 
        inet6 addr: fe80::d41dfb68:22ff4822:fe5d:d6b6/64 Scope:Link1adf:db5d  prefixlen 64  scopeid 0x20<link>                                                                                                                                  
... 

At this point, you can have the full Linux TCP/IP stack enabled in Linux. To provide a most basic example of how you can use Ethernet in Linux, the following command copies a file from your Linux host to the kit via scp:

Code Block
$ scp tmp/target.file/bin/sh root@192.168.1.6:/tmp 

3. Setting Ethernet MAC in U-Boot

The Ethernet MAC PHY may or may not be set as a U-Boot environment variable on your kit. If the MAC PHY is not set in U-Boot, the Linux Ethernet kernel driver uses a randomly-generated MAC on every boot. With IP address obtained from DHCP, this will result in your board getting a new IP address on every boot, which is not always convenient.

To set up the board MAC address in U-Boot, perform the following step-wise procedure:

  1. Reset the kit.

  2. Stop at the U-Boot prompt, by hitting any key in the serial console window at the U-Boot countdown.

  3. Run the following command to determine if a MAC PHY address has been already allocated to your kit:

    Code Block
    u-boot=> printenv ethaddr

    If this command returns a valid MAC address, all is good, you can proceed to boot to Linux at this point.

    If there is no MAC PHY set up in U-Boot, perform the following commands to set up the MAC PHY in U-Boot:

    Code Block
    u-boot=> setenv ethaddr 3C:FB:96:DC:59:7F 
    u-boot=> saveenv

    For interfaces other than first (eth0), use environment variables eth1addr for eth1 and so on. If you have several kits on your LAN, increase the last digit for each kit so the MAC addresses are all unique in your LAN.

  4. Boot to Linux, check that the kernel makes use of the MAC PHY you have assigned to your kit:

    Code Block

...

  1. user@imx8mpnavq:

...

  1. ~$ ifconfig eth0

...

  1.                                                                                                                                                                             

...

  1. 
    

...

  1. eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500                                                                                                                                                 
            inet 

...

  1. 192.168

...

  1. .0.202  netmask 255.255.255.0  broadcast 192.168.

...

  1. 0.255

...

  1.                                                                                                                                  
            inet6

...

  1.  fe80::

...

  1. fb68:

...

  1. 4822:

...

  1. 1adf:db5d  prefixlen 64  scopeid 0x20<link>                                                                                                                                  
            ether e6:56:76:21:d7:ef  txqueuelen 1000  (Ethernet)
    ...