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
Steps
- Insert the SD Card: Insert the SD card into your computer SD card slot.
- Download compressed SD image.
- Extract SD image.
tar -xvf sdimage-bootpart-202004030120-mmcblk0.direct.tar.bz2 - Flash SD image into the SD card.
wheresudo dd if=./sdimage-bootpart-202004030120-mmcblk0.direct of=/dev/mmcblk0 bs=1M && sync/dev/mmcblk0is the SD card device; it may be different on your system. - Access the Network Configuration File: Navigate to the
/etc/networkfile inside the SD card. Then open theinterfacesfile:sudo nano interfaces - Modify
interfacesfile: Replace the# Wired or wireless interfacessection 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 - Save and Exit: Save the changes and safely remove the SD card.
- Insert the SD Card into 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
- Open Netplan Configuration File:
sudo nano /etc/netplan/01-network-manager-all.yaml - 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 typingifconfigin 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]
- Modify the file to include the following configuration (replace
- Apply the Configuration:
- Save and exit the editor.
- Apply the configuration by typing:
sudo netplan try - Confirm the changes when prompted.
- Restart the Computer:
- After restarting, verify the IP address by typing
ifconfigin the terminal. You should see192.168.1.100assigned to your Ethernet interface.
- After restarting, verify the IP address by typing
Note: New versions of Ubuntu allows to do the network configuration through the graphical interface.
3. Setting up the MaRCoS Client (Your PC) with a Static IP (Windows)
Steps:
- Open Network Connections:
- Press
Windows + Rto open the Run dialog box. - Type
ncpa.cpland press Enter to open the Network Connections window.
- Press
- Access Ethernet Properties:
- Right-click on your Ethernet connection and select
Properties.
- Right-click on your Ethernet connection and select
- Select IPv4 Properties:
- In the Ethernet Properties window, select
Internet Protocol Version 4 (TCP/IPv4)and click on thePropertiesbutton.
- In the Ethernet Properties window, select
- 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
- IP address:
- Select
Use the following DNS server addressesand leave them blank.
- In the Internet Protocol Version 4 (TCP/IPv4) Properties window, select
- Save and Exit:
- Click
OKto save the changes and close the properties window. - Click
Closeto close the Ethernet Properties window.
- Click

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.
- Open a terminal on your PC and type:
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.