Configure DevKit Networkï
By default, the DevKit network interfaces use DHCP configuration.
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, you will need to configure the interface to use DHCP.
Checking the current IP address
From the serial console, run:
davinci:~$ networkctl status
* State: routable
Online state: partial
Address: 192.168.1.20 on end0
Gateway: 192.168.1.10 on end0
Note
Configuring the network in U-Boot ensures the network settings persist 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 static IP, enter the following commands below:
sima:~$ env set forcenetcfg static; saveenv sima:~$ boot
The board will reboot and use
192.168.1.20
and192.168.2.20
for the first and second ethernet port.To modify the boardâs static IP address, edit the network file using the
vi
command after the device is booted.davinci:~$ 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 up the board.
sima:~$ env set forcenetcfg dhcp; saveenv sima:~$ boot
Note
If you want to toggle between static and DHCP configuration without rebooting the device, follow this instruction.
If you have sima-cli
installed on the DevKit and want to switch between DHCP and Static configuration dynamically without rebooting, run:
davinci:~$ sima-cli network
You will be prompted with an interactive menu to switch network configuration between static and DHCP.
Without using sima-cli
, you can modify the systemd-networkd
configuration files under the /etc/systemd/network
folder.
Switching to Static IP
To change the network interface from DHCP to static, run:
davinci:~$ sudo sed -i '/KernelCommandLine=!netcfg=dhcp/d' /etc/systemd/network/20-end0-static.network
davinci:~$ sudo mv /etc/systemd/network/10-endx-dhcp.network /etc/systemd/network/10-endx-dhcp.network.backup
davinci:~$ sudo systemctl restart systemd-networkd
davinci:~$ networkctl status
Switching to DHCP
To change the network interface from static to DHCP, run:
davinci:~$ sudo mv /etc/systemd/network/10-endx-dhcp.network.backup /etc/systemd/network/10-endx-dhcp.network
davinci:~$ sudo systemctl restart systemd-networkd
davinci:~$ networkctl status
Note
These instructions use systemd-networkd
to configure the network interface.
A firmware upgrade will reset this configuration.
To preserve the setting across firmware upgrades, configure it in U-Boot instead.
Note
Suitable when the developerâs network is not available for Ethernet connection from the DevKit.
Plug the DevKit into the Ethernet port of the developerâs computer, use a USB-to-Ethernet dongle if developerâs computer doesnât have an ethernet port available.
The computer can share internet with the DevKit, enabling Python package installation using
pip
.Requires enabling internet connection sharing on the host computer.
Follow the instructions below for an Ubuntu machine. On other platforms, the instructions may vary; please look for related instructions online on how to share network connections.
On your upper right corner open
Settings
then go to theNetwork
section.Under the
Wired
section, click the plus sign to create a new settings profile if you donât have an existing profile for the board or just modify the existing one if you do.If you are creating a new profile, name the profile âSharedâ or whatever you want.
In the
IPv4
tab, chooseShared to other computers
. Click Apply.If you had an existing connection, turn off and on the connection for the changes to take effect.
Your computer should now be networked with the AP.
10.42.0.0/24
this is the default subnet used by Ubuntu for this setup, but thereâs not necessarily a guarantee that your computer will use that subnet.If the next step returns no results, run
ifconfig
and look for the IP of your Ethernet interface (usuallyeth0
) there.
Open a terminal on the Ubuntu machine. Type the following to scan the devices in that IP range:
sima-user@sima-user-machine:~$ nmap -sn 10.42.0.0/24 | grep report Nmap scan report for sima-user-machine (10.42.0.1) Nmap scan report for 10.42.0.241
Here you will be listing the IP addresses used in this subnet. The one ending in
.1
is your host machine. The one that doesnât end in.1
will be the IP address for the SiMa DevKit. From the code example above, the board is10.42.0.241
and 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 2023 davinci:~$
To test that you can connect to your host from the board, ping
10.42.0.1
from the board, if you have an ssh server running in your host, you can also ssh:davinci:~$ ping 10.42.0.1 PING 10.42.0.1 (10.42.0.1): 56 data bytes 64 bytes from 10.42.0.1: seq=0 ttl=64 time=0.598 ms 64 bytes from 10.42.0.1: seq=1 ttl=64 time=0.703 ms 64 bytes from 10.42.0.1: seq=2 ttl=64 time=0.639 ms ^C --- 10.42.0.1 ping statistics --- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max = 0.598/0.646/0.703 ms
If you are unable to ping or SSH to the board, use the static IP configuration method.