meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
groups:mg:red_pitaya [2022/11/30 14:25] – [Step by step: basic communication with red pitaya (SSH)] fienegroups:mg:red_pitaya [2024/03/20 09:37] (current) – Admin: Syntax-Update (Migration from deprecated "fontcolor" plugin to "color" plugin) klaus
Line 7: Line 7:
  
 Check the LED's to eventually detect some first problems: Check the LED's to eventually detect some first problems:
-  * <fc #00ffff>Blue LED:</fc> normally this LED is turned ON indicating fpga bitstream was successfully loaded +  * <color #00ffff>Blue LED:</color> normally this LED is turned ON indicating fpga bitstream was successfully loaded 
-  * <fc #00ff00>Green LED:</fc> normally this LED is turned ON indicating that all power supplies on Red Pitaya are working properly +  * <color #00ff00>Green LED:</color> normally this LED is turned ON indicating that all power supplies on Red Pitaya are working properly 
-  * <fc #ff0000>Red LED:</fc> heartbeat blinking pattern should show CPU load (in normal operation this LED is blinking after about 10 seconds or earlier) +  * <color #ff0000>Red LED:</color> heartbeat blinking pattern should show CPU load (in normal operation this LED is blinking after about 10 seconds or earlier) 
-  * <fc #ffa500>Orange LED:</fc> SD card access indicator (in normal operation this LED is blinking in slow intervals)+  * <color #ffa500>Orange LED:</color> SD card access indicator (in normal operation this LED is blinking in slow intervals)
  
 For the basic communication with the file system an SSH-connection works fine. You can use PuTTY to create it. To find out which IP-address your Red Pitaya has by checking all IP-addresses in your private network. Therefor you can enter the command ''arp -a'' in cmdlet. IP-addresses in private networks usually start with 192:168: and the physical address should match the address which is written on the board. Be aware that you need to be in the same network as your STEMlab. For the basic communication with the file system an SSH-connection works fine. You can use PuTTY to create it. To find out which IP-address your Red Pitaya has by checking all IP-addresses in your private network. Therefor you can enter the command ''arp -a'' in cmdlet. IP-addresses in private networks usually start with 192:168: and the physical address should match the address which is written on the board. Be aware that you need to be in the same network as your STEMlab.
Line 56: Line 56:
  
 All commands in the style of ''$this is a command'' should be typed in the console you get when connecting to your rp with putty.  All commands in the style of ''$this is a command'' should be typed in the console you get when connecting to your rp with putty. 
-python version 2.7 is preinstalled. Here's how to install the wanted python 3 version:+Python 2.7 is preinstalled.
  
-First run ''$sudo apt update && sudo apt upgrade'' and''$sudo apt-get install wget build-essential check''+Note that if you want to use PyRpl, you'll need Python 3.6, due to PySide. If you have Python 3.5 installed, remove it with ''$ sudo apt-get purge python3.5'' and ''$sudo apt autoremove''. Make sure it's completely gone by checking the ''/usr/bin'' direction! Next run ''$sudo apt update && sudo apt upgrade''.
  
-then install some packages: ''$sudo apt-get install libncurses5 tk libc6 zlib1g libffi-dev libsodium-dev''  +To install Python 3.6 on Ubuntu 16.04.7 you first need to install the dependencies with ''$sudo apt install build-essential checkinstall && sudo apt install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev zlib1g-dev libffi-dev libsodium-dev'' (packages for PyRpl included), then retrieve and unzip the file with ''wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tar.xz && tar xvf Python-3.6.0.tar.xz'' and last but not least install it by going to the directory ''$cd Python-3.6.0/'', executing the configuration file ''$ ./configure'' and install it with ''sudo make altinstall''.
-''$ sudo apt-get install python3'' on the rp via ssh (putty)+
-If you want a specific python3 versionyou have to specify, e.g.: +
-''$sudo apt-get install python3.7'' +
-To make this version of python your default version, do the following''$sudo update-alternatives --install /usr/bin/python python usr/local/bin/python3.7 10''"''/usr/bin/python''" is the path of your old default python, this will be exactly this path. "''usr/local/bin/python3.7''" is the path of the new python you want as default. To check which path it is use ''$whereis python''The "''10''" at the end gives it priority 10 (highest). Typing ''$python3 --version'' should now give you your current and newly installed version of python, here python3.7+
  
-Note that if you want to use PyRpl, you'll need Python 3.6, due to PySide. You can upgrade Python with [[https://phoenixnap.com/kb/how-to-install-python-3-ubuntu|deadsnakes ppa]]. For Ubuntu 16.04.7 it works like this:python 
  
-''$''+If you want a specific python3 version, you have to specify, e.g.: 
 +''$sudo apt-get install python3.7'' 
 +To make this version of python your default version, do the following: ''$sudo update-alternatives - -install /usr/bin/python python usr/local/bin/python3.7 10''. "''/usr/bin/python''" is the path of your old default python, this will be exactly this path. "''usr/local/bin/python3.7''" is the path of the new python you want as default. To check which path it is use ''$whereis python''. The "''10''" at the end gives it priority 10 (highest). Typing ''$python3 --version'' should now give you your current and newly installed version of python, here python3.7. 
  
-To install pyrpl via pip first upgrade pip if you have a lower version than pip 21.0 with ''$pip install --upgrade pip''. Then use ''$sudo pip install pyrpl'' (this takes a while). If installing PyNaCl takes too long, it's probably due to a bug in libsodium, which you can fix by installing PyNaCl manually with ''$SODIUM_INSTALL=system pip install pynacl'' before installing PyRpl. If you now type in ''$python3'' you can check whether the installation worked via ''>>>import pyrpl''. If it didn't work it will return something like ''Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named pyrpl''+To install pyrpl via pip first install and upgrade pip (if you have a lower version than pip 21.0with ''$ sudo apt install python3-pip'' and then ''$pip install --upgrade pip''. Then use ''$sudo pip install pyrpl'' (this takes a while). If installing PyNaCl takes too long, it's probably due to a bug in libsodium, which you can fix by installing PyNaCl manually with ''$SODIUM_INSTALL=system pip install pynacl'' before installing PyRpl with ''$pip install pyrpl''. If you now type in ''$python3'' you can check whether the installation worked via ''>>>import pyrpl''. If it didn't work it will return something like ''Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named pyrpl''
 Troubleshooting: if ''&sudo -H pip install pyrpl'' returned error: ''sudo: unable to execute /usr/local/bin/pip3: no such file in directory''use ''&sudo -H pip3.x install pyrpl'' with 3.x being your installed python version. You can also check whether you have pip in the given directory with ''$whereis pip''. Troubleshooting: if ''&sudo -H pip install pyrpl'' returned error: ''sudo: unable to execute /usr/local/bin/pip3: no such file in directory''use ''&sudo -H pip3.x install pyrpl'' with 3.x being your installed python version. You can also check whether you have pip in the given directory with ''$whereis pip''.
  
Line 83: Line 80:
 | rp-f096cb  | mg-rp6        | magnesium24!                     | | rp-f096cb  | mg-rp6        | magnesium24!                     |
  
-The first have Ubuntu 16.04.7, Python 3.5.2 and pip 20.3.4 installed.+The first 4 boards have Ubuntu 16.04.7, Python 3.5.2 and pip 20.3.4 installed. mg-rp5 and mg-rp6  are not registered in the institute's network and have python2 installed (default).
 ==== PID-Controller Board in the Atom Lab==== ==== PID-Controller Board in the Atom Lab====
   * PID-Controller: The scripts are on the MG Laptop under C:\Documents   * PID-Controller: The scripts are on the MG Laptop under C:\Documents