STAGE 2: Radxa Zero 2 Pro with minimal Armbian image (3/4) - Third add ethernet support

Adding ethernet next so that ultimately we can add vncserver and work headlessly

9/13/20243 min read

The ultimate goal of Stage 2 is to go headless ad ditch the dedicated screen, keyboard and mouse ... step 1 is to get ethernet running on the Radxa Zero 2 Pro to maximise the speed of any vnc communications given that we want to be running a GUI. The other goal here (although we didn't yet figure out how to do this) is to use connect the Radxa Zero 2 Pro via a single usb-c cable to an ipad providing fast ethernet for vnc and power ... just one cable

0) You need a USB-c to ethernet adapter, ethernet cable for the Radxa Zero 2 Pro side of things. You may need an ethernet adapter to usb-c / a for the other side of the ethernet cable if your computer you want to connect to doesn't have an ethernet socket.
  • Connect the ethernet to the second usb-c socket on the Radxa Zero 2 Pro (not the corner one which will need for power)

1a) Boot the device with keyboard, mouse and screen attached, log into xfce and open a terminal
1b) Disconnect all keyboard, mice and screens and SSH in using the wifi connection
  • Disconnect everything (having noted the IP address of your device ... type "ip a" in a promopt and check out the address for your wlan0 adapter on the device).

  • Open a terminal on another device and enter ...

  • ssh username@ipaddress_of_your_Zero2Pro

  • You need to add your username and ipaddress

  • You will be asked to proceed and warned, you can accept for now and maybe tighten security later

  • That will bring you into a CLI prompt

  • Note that in case you have already created an SSH link before to this IP address it will not connect and instead tell you of a conflict. To remove the old fingerprints for the old IP address device type ..

  • ssh-keygen -R the_old_ip_address_you_want_to_use_now

2) You need to set up the ethernet adapter side on your computer to have a static IP address
  • System settings -> Network and find your adapter

  • Find TCP/IP settings and set configure IPv4 to manual, set an IP address 162.105.x.x and a subnet mask 255.255.0.0 however you want and OK this

3) With a bash shell open on the Radxa Zero 2 pro we need to add some ethernet details to our netplan config file
  • You need the name of the ethernet adapter connected to the Radxa 2 Zero Pro so type

  • ip a

  • It should be obvious ... you are looking for something on ethernet and the name can be exotic like enx734a9743ff or simple like eth0, you can decude it by looking at where wlan0 is for your wireless adapter and get the name from the same place in the ethernet entry in the output from ip a.

  • Now we need to add information to our netplan config file ... same rules apply for formatting to avoid endless hours pulling your hair out ! Indents are precise and exactly 2 spaces.

  • sudo nano /etc/netplan/01-netcfg.yaml

  • Add the following (the indents should start the the same level as the wifis: command which is already in the file. Start at the end of the wifis: section after the password at the same level as the wifis: command .. start after all this ...

  • wifis:

  • blar blar blar

  • password: "xxxxxxxx"

  • now add ...

  • ethernets: the_name_of_your_ethernet_adapter_connected_to_the_Radxa:

  • dhcp4: no

  • dhcp6: no

  • addresses:

  • - a_static_IP_address_for_the_Radxa/add_the_subnet_mask

  • nameservers:

  • addresses:

  • - 8.8.8.8

  • - 8.8.4.4

  • You need the : at the end of the ethernets name !

  • Static IP address can be what you want provided it is sub to the one you chose for the PC / Mac / other device you want to connect to .. 162.105.x.x in our example above

  • The subnet mask is 24 for 255.255.255.0 and 16 for 255.255.0.0 depending on how you set up the subnet mask on the PC / Mac / other device you want to connect to

  • Save the changes

  • sudo netplan try

  • sudo netplan apply

  • sudo ip addr add a_static_IP_address_for_the_Radxa/add_the_subnet_mask dev the_name_of_your_ethernet_adapter_connected_to_the_Radxa

  • then do a test ping to the IP address you set for the PC / Mac / other device you want to connect to

Reboot and you should now have a persistent ethernet connection.

Next lets go headless with vncserver using our super fast ethernet cable connection.