Network Setup
In standalone mode, configure both serial access and network access. Serial access keeps the DevKit reachable when network connectivity is unavailable or misconfigured.
By default, the DevKit network interfaces use DHCP.
- If you want to connect the DevKit directly to your computer, configure your computer's network interface with a static IP and connect it directly to the DevKit.
- If you want the DevKit to obtain its IP address automatically from a network, configure the interface to use DHCP.
Check the Current IP Address
From the serial console, run:
sima@modalix:~$ ip a | grep inet
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host noprefixroute
inet 192.168.91.181/22 brd 192.168.91.255 scope global dynamic noprefixroute end0
inet6 fe80::ab34:b995:9f6e:160e/64 scope link noprefixroute
- Network Setup in the Linux Shell
- Share a Host Network Connection
- Network Setup in the U-Boot Shell
If you want to toggle between static and DHCP without rebooting the device, follow these instructions.
If sima-cli is installed on the DevKit, run this command to switch between DHCP and static configuration without rebooting:
modalix:~$ sima-cli network
The command opens an interactive menu for static and DHCP network configuration.
If sima-cli is not available, use nmcli to switch between the preconfigured connection profiles: end0-static and end0-dhcp.
The following instructions use NetworkManager profiles and apply to DevKit systems running eLxr 2.1 or later. If your system is running an earlier release, see the v2.0.0 documentation.
Switching to Static IP
To change the network interface from DHCP to static, run:
modalix:~$ sudo nmcli connection up end0-static
modalix:~$ nmcli -f NAME,DEVICE,STATE connection show --active
modalix:~$ networkctl status
Switching to DHCP
To change the network interface from static to DHCP, run:
modalix:~$ sudo nmcli connection up end0-dhcp
modalix:~$ nmcli -f NAME,DEVICE,STATE connection show --active
modalix:~$ networkctl status
- Use this option when the DevKit cannot connect directly to the developer network.
- Connect the DevKit to the host Ethernet port. Use a USB-to-Ethernet dongle if the host does not have an Ethernet port.
- The host can share Internet access with the DevKit, including for Python package installation with
pip. - This option requires Internet connection sharing on the host computer.
-
On an Ubuntu host, enable Internet connection sharing:
- In the upper-right corner, open
Settings, then go to theNetworksection. - Under
Wired, click the plus sign to create a new settings profile if you do not have an existing profile for the board, or modify the existing one if you do. - If you are creating a new profile, name it "Shared" or any name you prefer.
- In the
IPv4tab, chooseShared to other computers. Click Apply. - If you had an existing connection, turn it off and on for the changes to take effect.
- The host should now be networked with the DevKit.
10.42.0.0/24is the default subnet used by Ubuntu for this setup, but your host may use a different subnet. - If the next step returns no results, run
ifconfigand look for the IP of your Ethernet interface.
- In the upper-right corner, open
-
Open a terminal on the Ubuntu host and scan devices in that IP range:
sima-user@sima-user-machine:~$ nmap -sn 10.42.0.0/24 | grep reportNmap scan report for sima-user-machine (10.42.0.1)Nmap scan report for 10.42.0.241The result lists the IP addresses in this subnet. The address ending in
.1is usually the host. The other address is the DevKit. In this example, the DevKit is10.42.0.241and the host is10.42.0.1. -
Test the connection by running:
sima-user@sima-user-machine:~$ ssh sima@10.42.0.241...Last login: Mon Nov 27 19:58:33 2023modalix:~$ -
From the DevKit, ping the host at
10.42.0.1. If an SSH server is running on the host, you can also connect with SSH.modalix:~$ ping 10.42.0.1 -
If you cannot ping or SSH to the DevKit, use the static IP configuration method.
This procedure applies only to DevKit firmware release 2.0 or earlier. On release 2.1 and later, use Linux-side configuration. Configuring the network in U-Boot keeps the network settings across firmware upgrades.
-
Connect to the DevKit via UART and serial terminal.
-
Reboot the DevKit.
-
Press any key to enter U-Boot when prompted with the message,
Hit any key to stop autoboot. -
To switch to a static IP, enter the following commands:
sima:~$ env set forcenetcfg static; saveenvsima:~$ boot -
The board reboots and uses
192.168.1.20and192.168.2.20for the first and second Ethernet ports. -
To modify the board's static IP address, edit the network file with
viafter the device boots.modalix:~$ sudo vi /etc/systemd/network/20-end0-static.network -
In the Network section, update the IP address as needed.
-
To configure DHCP mode, enter the commands below and boot the board.
sima:~$ env set forcenetcfg dhcp; saveenvsima:~$ boot