Setting up the System¶
This page describes setting up the software on the system for the first time. If you already have a running system, there is no need to read on, except for satisfying your own curiosity.
What comprises the System?¶
At a high level, the software consists of two parts: the part that runs on the Microzed, and the part that runs on the processing computer. The software on the Microzed is responsible for controlling the transceiver, setting up scan configuration, loading the FPGA and programming all device registers.
The processing computer is a single-board computer that runs Linux Mint. It is connected via one ethernet port to the Microzed, and via another ethernet port to the outside world. The processing computer is responsible for running the user interface and processing the data that it receives from the Microzed
All of the code that runs on both computers is in a single repository.
Setting up the Processing Computer¶
Hardware Requirements¶
The processing computer has a few hardware requirements
- Run a 64-bit Intel processor. (The software can, and has, run on ARM, but
debugging tools like
valgrind
andperf
work better on Intel chips.) - Have two Ethernet ports. It is okay if one is a USB3->ethernet adapter.
- Quad-core cpu.
- 4 GB of ram
Processing PC Installation Instructions¶
The steps that must be taken are laid out in the README of the repository’s
sw
directory:
https://git.arrc.ou.edu/WNI/wni/tree/master/sw#processing-computer. The script
processing_computer_setup.sh
does all the required steps.
Install Linux Mint on the processing computer.
Install git:
sudo apt install git
Clone the software repository:
git clone https://git.arrc.ou.edu/WNI/wni ~/eagle
. (You may need to change the repository URL)Run the installer script (and cross your fingers…)
cd ~/eagle/sw/scripts ./processing_computer_setup.sh all
processing_computer_setup.sh
installs all dependencies and sets up the Python virtual environment. The only thing left to do is to set up the environment variables, which is discussed below.At the end of your
~/.bashrc
, add the linesource ~/.radarconfig.sh
Setting up the Microzed¶
The Microzed is less straightforward to set up than the processing computer because it requires a custom kernel and filesystem. First, a MicroSD card is required. The Microsd card must be partitioned as described in the Xilinx Wiki: basically, the card must have two partitions: the first partition must be bootable and formatted as a FAT filesystem. The first partition can be pretty small; 200 MB is more than enough. The second partition should be formatted as ext4 and take up the rest of the microSD card.
Microzed setup instructions¶
Now that your microSD card is set up correctly, you need to get some files on
it. The binary files that you can use are located at
https://gitlab.com/ouradar/eagle-binaries. These files were generated with the
Yocto project. The scripts for generating these files are in the README.md of
the yocto
directory of the source code repository; however, unless you are
upgrading the kernel or making changes to the
Partition and format the Microzed according to the Xilinx Wiki
Download the binary files from the repository on GitLab
git clone https://gitlab.com/ouradar/eagle-binaries
Run the intaller script provided in that repository
cd /path/to/eagle-binaries/20181003 # replace /dev/sdX with the microSD device, and repo URL with correct source repository url ./install.sh /dev/sdX all https://git.arrc.ou.edu/WNI/wni
Insert the microSD card into the Microzed
Apply power to the Microzed via the transceiver board. A 6V, 2A power supply is required.
Connect the Microzed to the internet (not directly to the processing computer at this point)
Connect a Micro USB to USB cable into the Microzed. The Microzed uses this as a UART console.
Connect to the Microzed via the uART console. On Linux, using
screen
, issue the following commandsudo screen /dev/ttyUSB0 115200
You should be able to log in as root. Change your password if that’s the type of thing you like to do.
Ensure you have an internet connection
ping google.com # or your favorite url
Do the one-time setup required on the Microzed:
cd ~/wni/sw/scripts ./install.sh all
If everything went well, the Microzed is now set up! The next thing to do is to let the Microzed and processing computer work together. They need to know about each other’s IP addresses and whatnot.
Setting up the Microzed and processing computer together¶
Setting up Networking¶
Because some of the software runs on the Microzed and some runs on the processing compuer, some additional configuration is required to ensure that the two can operate together. The Microzed’s networking configuration is already finished, but the processing computer needs to be set up so they can talk to each other. Follow these steps for setting up networking on the processing computer.
Warning
The following steps assume that the Processing Computer can be given the
IP address 192.168.1.10. This is usually a safe assumption. However,
if the processing computer is already connected to a network where
192.168.1.10
is a valid IP address, the IP addresses for the Microzed
and Processing computer need to be changed.
If the processing computer is already connected to a network where 192.168.1.10 is a valid IP address, a few changes need to be made. First, on the Microzed:
Edit the static IP address in
/etc/network/interfaces
to the new IP address; e.g.192.168.32.1
. The netmask will remain the same.Edit the file ~/.zshrc_local to contain the following lines:
export UZ_IP=192.168.32.1 export PC_IP=192.168.32.10
On the processing computer, make the following changes
- In step 4. below, use the new processing computer IP adress, e.g.
192.168.32.10
- In ~/.radarconfig.sh, change the variables
PC_IP
andUZ_IP
to be the same as you did in .zshrc_local on the Microzed.
Connect the processing computer to the internet.
Connect the processing computer to the Microzed via another ethernet port.
Determine the name of the interface connected to the Microzed, by using
ifconfig
for example. We’ll assume the interface name isenp4s0
.Configure
/etc/network/interfaces
to give the interface connected to the Microzed a static IP address:auto enp4s0 iface enp4s0 inet static address 192.168.1.10 netmask 255.255.255.0
Restart that interface:
sudo ifdown enp4s0 sudo ifup enp4s0
Note
If the interface was unable to come up, try restarting the processing computer.
Check that you can reach the Microzed:
ping 192.168.1.1 # should see some activity ssh root@192.168.1.1
Note
If connecting to the Microzed didn’t work, double check a few things:
Ensure that you have selected the correct interface (
enp4s0
in this example)Ensure that the network you are currently on is not the network
192.168.1.0
.On the Microzed (which you can connect to via UART still), check the output of
ifconfig eth0:0
. It should contain the lineinet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
Get your ssh public key onto the Microzed
ssh-copy-id root@192.168.1.1
Everything should be working now… well done!