Access your Red Pitaya from the Web

Make your Red Pitaya accessible from anywhere via the Yaler relay.

Prerequisites

Setting up your device requires a relay domain. Please sign up to get one.

Setting up the hardware

Make sure the Red Pitaya is connected to the Internet via Ethernet or Wi-Fi.

Installing YalerTunnel on Debian

Follow these steps to install YalerTunnel on the Red Pitaya.

This tutorial is still in beta. Installation details will change. Found a bug? Let us know.

  1. Open a shell on your Red Pitaya (default login is root, password root), or type
    $ cd ~
  2. Update apt-get with
    $ sudo apt-get update
  3. Download and install libssl and ca-certificates with
    $ sudo apt-get install libssl-dev ca-certificates
  4. Create a yalertunnel directory
    $ mkdir yalertunnel
    $ cd yalertunnel
  5. Download, unzip and build the YalerTunnel source
    $ wget http://s3.yaler.net/yalertunnel/YalerTunnel2-v2.3.2.src.tar.gz
    $ tar xfzmv YalerTunnel2-v2.3.2.src.tar.gz
    $ make
  6. To check the installation, display the YalerTunnel version and usage with
    $ ./yalertunnel
  7. Done. Now either enable Web access or SSH access or SCPI access.


Web access

Prerequisites

A Web server or service has been installed and is running on the Red Pitaya.

Enabling Web access on Debian

How to configure YalerTunnel on your Red Pitaya to make a local Web service accessible from anywhere.

  1. Download and install runit with
    $ sudo apt-get install runit
  2. Create a yalertunnel service directory
    $ sudo mkdir /etc/service/yalertunnel
    $ cd /etc/service/yalertunnel
  3. Download the yalertunnel run script and make it executable
    $ sudo wget http://s3.yaler.net/redpitaya/run
    $ sudo chmod a+x run
  4. Download the yalertunnel finish script and make it executable
    $ sudo wget http://s3.yaler.net/redpitaya/finish
    $ sudo chmod a+x finish
  5. Open the run script with
    $ sudo nano /etc/service/yalertunnel/run
    Check the path (default: /home/root/yalertunnel), set the port of the local Web service (default: 80), and set your relay domain
    1 #!/bin/sh
    
    6 exec /home/root/yalertunnel/yalertunnel server 127.0.0.1:80 try.yaler.io:80 RELAY_DOMAIN -min-listeners 1 </dev/null 2>&1 | logger -t yalertunnel

    Save changes with CTRL-X, then Y, then RETURN. Do not change the local IP (default: 127.0.0.1), unless the Web service runs on a separate device in the same network.

  6. Reboot your Red Pitaya to run the script
    $ sudo reboot
  7. Done. Now access your device from any Web browser or with Curl or from iOS or from Android (and resolve errors).

Disabling Web access on Debian

How to remove YalerTunnel to disable Web access from anywhere.

  1. Open a shell on your Red Pitaya and type
    $ sudo sv stop yalertunnel
    $ sudo rm -r /etc/service/yalertunnel
    $ sudo reboot


SSH access

Prerequisites

The SSH daemon sshd is running (per default) on the Red Pitaya.

Enabling SSH access on Debian

Hot to configure YalerTunnel on your Red Pitaya to allow SSH access from anywhere.

  1. Download and install runit with
    $ sudo apt-get install runit
  2. Create a yalertunnel-ssh service directory
    $ sudo mkdir /etc/service/yalertunnel-ssh
    $ cd /etc/service/yalertunnel-ssh
  3. Download the yalertunnel run script and make it executable
    $ sudo wget http://s3.yaler.net/redpitaya/run-ssh -O run
    $ sudo chmod a+x run
  4. Download the yalertunnel finish script and make it executable
    $ sudo wget http://s3.yaler.net/redpitaya/finish
    $ sudo chmod a+x finish
  5. Open the run script with
    $ sudo nano /etc/service/yalertunnel-ssh/run
    Check the path (default: /home/root/yalertunnel), set the port of the local SSH service (default: 22), and set your relay domain
    1 #!/bin/sh
    
    6 exec /home/root/yalertunnel/yalertunnel proxy 127.0.0.1:22 try.yaler.io:80 RELAY_DOMAIN </dev/null 2>&1 | logger -t yalertunnel-ssh

    Save changes with CTRL-X, then Y, then RETURN. Do not change the local IP (default: 127.0.0.1), unless the SSH service runs on a separate device in the same network.

  6. Reboot your Red Pitaya to run the script
    $ sudo reboot
  7. Done. Now access your device with Putty or with SSH (for Linux, Mac OS X).

Disabling SSH access on Debian

How to remove YalerTunnel to disable SSH access from anywhere.

  1. Open a shell on your Red Pitaya and type
    $ sudo sv stop yalertunnel-ssh
    $ sudo rm -r /etc/service/yalertunnel-ssh
    $ sudo reboot


SCPI access

Prerequisites

A SCPI service has been installed and is running on the Red Pitaya.

Enabling SCPI access on Debian

How to configure YalerTunnel on your Red Pitaya to allow SCPI access from anywhere.

  1. Download and install runit with
    $ sudo apt-get install runit
  2. Create a yalertunnel-scpi service directory
    $ sudo mkdir /etc/service/yalertunnel-scpi
    $ cd /etc/service/yalertunnel-scpi
  3. Download the yalertunnel run script and make it executable
    $ sudo wget http://s3.yaler.net/redpitaya/run-scpi -O run
    $ sudo chmod a+x run
  4. Download the yalertunnel finish script and make it executable
    $ sudo wget http://s3.yaler.net/redpitaya/finish
    $ sudo chmod a+x finish
  5. Open the run script with
    $ sudo nano /etc/service/yalertunnel-scpi/run
    Check the path (default: /home/root/yalertunnel), set the port of the local SCPI service (default: 5000), and set your relay domain
    1 #!/bin/sh
    
    6 exec /home/root/yalertunnel/yalertunnel proxy 127.0.0.1:5000 try.yaler.io:80 RELAY_DOMAIN </dev/null 2>&1 | logger -t yalertunnel-scpi

    Save changes with CTRL-X, then Y, then RETURN. Do not change the local IP (default: 127.0.0.1), unless the SCPI service runs on a separate device in the same network.

  6. Reboot your Red Pitaya to run the script
    $ sudo reboot
  7. Done. Now, see how to access your device with SCPI.

Disabling SCPI access on Debian

How to remove YalerTunnel to disable SCPI access from anywhere.

  1. Open a shell on your Red Pitaya and type
    $ sudo sv stop yalertunnel-scpi
    $ sudo rm -r /etc/service/yalertunnel-scpi
    $ sudo reboot


Troubleshooting

How to fix common issues.


To enable SSH and Web or SCPI access at the same time, or tunnel another protocol, please get in touch.


Creative Commons License This work by Yaler GmbH is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.