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

  1. Run a 64-bit Intel processor. (The software can, and has, run on ARM, but debugging tools like valgrind and perf work better on Intel chips.)
  2. Have two Ethernet ports. It is okay if one is a USB3->ethernet adapter.
  3. Quad-core cpu.
  4. 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.

  1. Install Linux Mint on the processing computer.

  2. Install git: sudo apt install git

  3. Clone the software repository: git clone https://git.arrc.ou.edu/WNI/wni ~/eagle. (You may need to change the repository URL)

  4. 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.

  5. At the end of your ~/.bashrc, add the line

    source ~/.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

  1. Partition and format the Microzed according to the Xilinx Wiki

  2. Download the binary files from the repository on GitLab

    git clone https://gitlab.com/ouradar/eagle-binaries
    
  3. 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
    
  4. Insert the microSD card into the Microzed

  5. Apply power to the Microzed via the transceiver board. A 6V, 2A power supply is required.

  6. Connect the Microzed to the internet (not directly to the processing computer at this point)

  7. Connect a Micro USB to USB cable into the Microzed. The Microzed uses this as a UART console.

  8. Connect to the Microzed via the uART console. On Linux, using screen, issue the following command

    sudo screen /dev/ttyUSB0 115200
    
  9. You should be able to log in as root. Change your password if that’s the type of thing you like to do.

  10. Ensure you have an internet connection

    ping google.com  # or your favorite url
    
  1. 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:

  1. 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.

  2. 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

  1. In step 4. below, use the new processing computer IP adress, e.g. 192.168.32.10
  2. In ~/.radarconfig.sh, change the variables PC_IP and UZ_IP to be the same as you did in .zshrc_local on the Microzed.
  1. Connect the processing computer to the internet.

  2. Connect the processing computer to the Microzed via another ethernet port.

  3. Determine the name of the interface connected to the Microzed, by using ifconfig for example. We’ll assume the interface name is enp4s0.

  4. 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
    
  5. Restart that interface:

    sudo ifdown enp4s0
    sudo ifup enp4s0
    

    Note

    If the interface was unable to come up, try restarting the processing computer.

  6. 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:

    1. Ensure that you have selected the correct interface (enp4s0 in this example)

    2. Ensure that the network you are currently on is not the network 192.168.1.0.

    3. On the Microzed (which you can connect to via UART still), check the output of ifconfig eth0:0. It should contain the line

      inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
      
  7. Get your ssh public key onto the Microzed

    ssh-copy-id root@192.168.1.1
    

Everything should be working now… well done!