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
- Insert the SD Card: Insert the SD card into your computer’s SD card slot.
- Access the Network Configuration File:
- Navigate to the
/etc/network/interfaces
file on the SD card.
- Navigate to the
- Modify the Network Interfaces Configuration:
- Open the file for editing (use a text editor like
nano
orvim
):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
- Open the file for editing (use a text editor like
- Save and Exit: Save the changes and safely remove the SD card.
- 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
- Open Netplan Configuration File:
- Open the terminal and type:
sudo nano /etc/netplan/01-network-manager-all.yaml
- Open the terminal and type:
- 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 typingifconfig
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]
- 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
ifconfig
in the terminal. You should see192.168.1.100
assigned to your Ethernet interface.
- After restarting, verify the IP address by typing
3. Setting up the MaRCoS Client (Your PC) with a Static IP (Windows)
Steps:
- Open Network Connections:
- Press
Windows + R
to open the Run dialog box. - Type
ncpa.cpl
and 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 theProperties
button.
- 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 addresses
and leave them blank.
- In the Internet Protocol Version 4 (TCP/IPv4) Properties window, select
- Save and Exit:
- Click
OK
to save the changes and close the properties window. - Click
Close
to 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.