Setting up Red Pitaya - josalggui/MaRGE GitHub Wiki

Configuring Static IPs for MaRCoS Client and Server

To establish a stable and efficient communication between your PC (the MaRCoS client) and the Red Pitaya (the MaRCoS server) when using MaRGE, you need to set up static IP addresses for both devices. Static IPs ensure that the IP address remains constant, facilitating easier and reliable connections. However, dynamic IPs should also work as long as they are within the range of 192.168.1.101 to 192.168.1.132. MaRGE will specifically look for IP addresses within this range. Here’s a step-by-step guide to configuring the static IPs for both the MaRCoS server and client:

1. Setting up the MaRCoS server (Red Pitaya) with a static IP

Prerequisites:

  • Ensure Linux is installed on the SD card that will be used in the Red Pitaya (see Section 1.2 on marcos_wiki)

Steps

  1. Insert the SD Card: Insert the SD card into your computer’s SD card slot.
  2. Access the Network Configuration File:
    • Navigate to the /etc/network/interfaces file on the SD card.
  3. Modify the Network Interfaces Configuration:
    • Open the file for editing (use a text editor like nano or vim):
      sudo nano /etc/network/interfaces
      
    • Replace the # Wired or wireless interfaces section with the following content to set a static IP:
      # Wired or wireless interfaces
      auto eth0
      iface eth0 inet static
         address 192.168.1.101
         netmask 255.255.255.0
         gateway 192.168.1.1
      
  4. Save and Exit: Save the changes and safely remove the SD card.
  5. Insert the SD Card into Red Pitaya: Place the SD card back into the Red Pitaya.

This fixes the IP of your sever to 192.168.1.101.

2. Setting up the MaRCoS Client (Your PC) with a Static IP (Ubuntu)

Steps

  1. Open Netplan Configuration File:
    • Open the terminal and type:
      sudo nano /etc/netplan/01-network-manager-all.yaml
      
  2. Edit the Configuration File:
    • Modify the file to include the following configuration (replace **your_ethernet_interface** with the actual name of your Ethernet interface, which you can find by typing ifconfig in the terminal):
      network:
        version: 2
        renderer: NetworkManager
        ethernets:
          **your_ethernet_interface**:
             dhcp4: no
             addresses: [192.168.1.100/24]
             gateway4: 192.168.1.1
             nameservers:
               addresses: [8.8.8.8, 8.8.4.4]
      
  3. Apply the Configuration:
    • Save and exit the editor.
    • Apply the configuration by typing:
      sudo netplan try
      
    • Confirm the changes when prompted.
  4. Restart the Computer:
    • After restarting, verify the IP address by typing ifconfig in the terminal. You should see 192.168.1.100 assigned to your Ethernet interface.

3. Setting up the MaRCoS Client (Your PC) with a Static IP (Windows)

Steps:

  1. Open Network Connections:
    • Press Windows + R to open the Run dialog box.
    • Type ncpa.cpl and press Enter to open the Network Connections window.
  2. Access Ethernet Properties:
    • Right-click on your Ethernet connection and select Properties.
  3. Select IPv4 Properties:
    • In the Ethernet Properties window, select Internet Protocol Version 4 (TCP/IPv4) and click on the Properties button.
  4. Configure Static IP:
    • In the Internet Protocol Version 4 (TCP/IPv4) Properties window, select Use the following IP address.
    • Enter the following details:
      • IP address: 192.168.1.100
      • Subnet mask: 255.255.255.0
    • Select Use the following DNS server addresses and leave them blank.
  5. Save and Exit:
    • Click OK to save the changes and close the properties window.
    • Click Close to close the Ethernet Properties window.

image

4. Connecting the MaRCoS Client and Server

  • Connect the Red Pitaya to the PC: Use an Ethernet cable to connect the Red Pitaya to your computer.
  • Access Red Pitaya via SSH:
    • Open a terminal on your PC and type:
      ssh [email protected]
      
    • You should now be able to access the Red Pitaya server.

By following these steps, you ensure that both the client (your PC) and the server (Red Pitaya) have static IP addresses, facilitating a stable and reliable communication channel for MaRGE.

5. Notes

Issues Related to Installing MaRCoS from Scratch

I realized that, at least in my case, when installing MaRCoS from scratch I can only run ./marcos_setup.sh 192.168.1.101 rp-122 and turn the blue LED on (indicating bitstream is running) using an old version of the marcos_extras repository. In particular, when installing MaRCoS from scratch I use the commit 433936c from marcos_extras to run ./marcos_setup.sh 192.168.1.101 rp-122, then I go back to the latest commit of MaRCoS master branch to run MaRGE.