Wiki

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
resources:tools-software:linux-software:iio_oscilloscope [21 Apr 2015 14:04] – [Capture Window] Paul Cercueilresources:tools-software:linux-software:iio_oscilloscope [18 Oct 2023 12:01] (current) – note to use libiio-v0 when building libiio from source for osc Cristina Suteu
Line 5: Line 5:
 ===== About ===== ===== About =====
  
-The ADI IIO Oscilloscope is a example application, which demonstrates how to interface different evaluation boards from within a Linux system. The application supports plotting of the captured data in four different modes (time domain, frequency domain, constellation and cross-correlation). The application also allows to view and modify several settings of the evaluation board's devices.+The ADI IIO Oscilloscope is a cross platform GUI application, which demonstrates how to interface different evaluation boards from within a Linux system. The application supports plotting of the captured data in four different modes (time domain, frequency domain, constellation and cross-correlation). The application also allows to view and modify several settings of the evaluation board's devices.
  
 ===== Installation ===== ===== Installation =====
Line 11: Line 11:
 ==== Windows ==== ==== Windows ====
  
-<WRAP round download> +{{page>:resources:eval:user-guides:ad-fmcomms2-ebz:downloads#download_iio-oscilloscope}}
-  * **IIO Oscilloscope (OSC) for Win32 & Win64 (2014_R2 Alpha Pre-Release) ** +
-  * Download[[http://swdownloads.analog.com/cse/osc/adi-osc-setup.exe|adi-osc-setup.exe]] +
-</WRAP>+
  
-==== Linux/OS X ====+==== Linux ====
  
-For building on the target, we recommend using the [[/resources/tools-software/linux-software/zynq_images#staying_up_to_date|update scripts]]. This is a tried/proven method that does everything in a quick script.+To build on an embedded target (e.g. aarch64), we recommend using the [[:resources:tools-software:linux-software:kuiper-linux:update Kuiper Linux update scripts]]. This is a tried/proven method that does everything in a quick script.
  
-To build on a host, not not use the script, you **must**+To build on a development host (e.g. x86 laptop or desktop) do the following
-  - make sure the following libraries are installedThis list is maintained in the ''adi_update_tools.sh'' shell script, and can be copied/pasted to most Debian based distributions. For others make sure they are installed, or the below steps will not work. If you are not sure how to do this - consult your distribution documentation. <source master/adi_update_tools.sh:/apt/-/if/ bash linux_image_ADI-scripts+  - On Ubuntu or Debian install the following dependencies (see [[https://github.com/analogdevicesinc/linux_image_ADI-scripts/blob/master/adi_update_tools.sh#L331|adi_update_tools.sh]] for a maintained list)<code bash> 
-  - build **and install** the libiio library, by following these [[libiio#how_to_build_it|instructions]]. Make sure you do the final "''make install''"+apt-get -y install libglib2.0-dev libgtk-3-dev libgtkdatabox-dev libmatio-dev libfftw3-dev libxml2 libxml2-dev bison flex libavahi-common-dev libavahi-client-dev libcurl4-openssl-dev libjansson-dev cmake libaio-dev libserialport-dev 
-  - download the source <xterm+</code
-> **git clone https://github.com/analogdevicesinc/iio-oscilloscope.git** +  - Install the ''libiio-dev'' package in Debian or Ubuntu or build and install the libiio library from source, by following [[libiio#how_to_build_it|these instructions]]. Make sure you do the final ''make install''. 
-> **cd iio-oscilloscope** +<note important>Users building libiio from source, please use the following branch : [[repo>libiio/tree/libiio-v0]]</note> 
-> **git checkout origin/master** +  - Optionally build and install the libad9166-iio and libad9361-iio libraries, by following [[:resources:eval:user-guides:ad-fmcomms5-ebz:multi-chip-sync#linux|these instructions]]. 
-</xterm>Or, [[https://github.com/analogdevicesinc/iio-oscilloscope/archive/master.zip|download a zip]], and uncompress it:<xterm+  - Download the source using git: <code bash
-rgetz@pinky:~**wget https://github.com/analogdevicesinc/iio-oscilloscope/archive/master.zip** +git clone https://github.com/analogdevicesinc/iio-oscilloscope.git 
-rgetz@pinky:~**unzip master.zip** +cd iio-oscilloscope 
-rgetz@pinky:~/iio-oscilloscope**cd iio-oscilloscope** +git checkout origin/master 
-</xterm+</code> 
-   - and run `make` and `make install`. If you did not do a ''make install'' of the libiio, the libiio install location needs to be set in your path ie: (PATH=/usr/lib:$PATH"or else an error "Package libiio not found.." will occur.<xterm> +  - Or, [[https://github.com/analogdevicesinc/iio-oscilloscope/archive/master.zip|download a zip]], and uncompress it: <code bash
-rgetz@pinky:~/iio-oscilloscope$ **make** +$ wget https://github.com/analogdevicesinc/iio-oscilloscope/archive/master.zip 
-rgetz@pinky:~/iio-oscilloscope$ **sudo make install** +$ unzip master.zip 
-</xterm> +$ cd iio-oscilloscope 
-   - if you don't want to do a ''make install'' (sometimes I don't), you will need to make sure that the shared libraries can be found, by setting the [[http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN77|LD_LIBRARY_PATH]] environmental variable.<xterm>rgetz@pinky:~/iio-oscilloscope$ **export LD_LIBRARY_PATH=./**</xterm>otherwise you may get an error like this:<xterm>rgetz@pinky:~/iio-oscilloscope**./osc** +</code
 +   Build and install: <code bash> 
 +$ mkdir build && cd build 
 +$ cmake ../ && make -j $(nproc) 
 +$ sudo make install 
 +</code> 
 +     If you did not do a ''make install'' of the libiio, the libiio install location needs to be set in your path (i.e. ''PATH=/usr/lib:$PATH"'' or else an error ''"Package libiio not found.."'' will occur.  
 +     If you don't want to do a ''make install'', you will need to make sure that the most recently built shared libraries can be found, by setting the [[http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN77|LD_LIBRARY_PATH]] environmental variable. ''export LD_LIBRARY_PATH=./'' otherwise you may get an error like: <code> 
 +$ ./osc
 ./osc: error while loading shared libraries: libosc.so: cannot open shared object file:  ./osc: error while loading shared libraries: libosc.so: cannot open shared object file: 
 No such file or directory No such file or directory
 +</code> Or, worst case, when you are debugging things, you will see your modified source code, but it will be running/executing the older shared shared object which was loaded (since it didn't find things in the library path). 
 +
 +=== Ubuntu 20 and Older ===
 +
 +While compiling the IIO Scope for Ubuntu 20 and other older Linux distributions, you can face issues with the library gtkdatabox. To overcome this problem DON'T install the library using apt install/ other package managers. 
 +Instead download the sources from https://sourceforge.net/projects/gtkdatabox/files/gtkdatabox-1/ file gtkdatabox-1.0.0.tar.gz and compile and install it using commands below. This will ensure that gtkdatabox is compatible with GTK3
 +<xterm>
 +./configure
 +make
 +make install
 </xterm> </xterm>
 +
 +
 +Please not that in case some other gtkdatabox version is present in the system remove it using sudo apt remove. This action can solve error message 
 +GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported Trace/breakpoint trap (core dumped)
 +
 +=== GTK2 Based IIO-Oscilloscope ===
 +
 +If you'd like to build the previous version of IIO-Oscilloscope, which is based on GTK2 you will need to install the following packages: <xterm>
 +> **apt-get -y install libglib2.0-dev libgtk2.0-dev libgtkdatabox-dev libmatio-dev libfftw3-dev libxml2 libxml2-dev bison flex libavahi-common-dev libavahi-client-dev libcurl4-openssl-dev libjansson-dev cmake libaio-dev libserialport-dev**
 +</xterm>
 +Make sure that you have libgtkdatabox v0.9 installed, which was compiled with GTK2.
 +In addition, you will need to clone a specific branch of the IIO-Oscilloscope repository, which still uses GTK2 widgets: 
 +<code>
 +git clone https://github.com/analogdevicesinc/iio-oscilloscope.git --branch 2021_R2 </code>
 +
 +The other prerequisites and build steps are identical.  
 +
 +==== macOS ====
 +
 +The recommended method is to use brew with tfcollin's tap:
 +<code>
 +git clone -b fix-gtk-upgrade https://github.com/tfcollins/homebrew-formulae.git
 +cd homebrew-formulae
 +brew install --build-from-source ./gtkdatabox-prev1.rb
 +# if necessary: brew link --overwrite gtkdatabox-prev1
 +brew install --build-from-source ./iio-oscilloscope.rb
 +</code>
  
 ====== User guide ====== ====== User guide ======
Line 65: Line 107:
   - Settings -> Connect and enter the IP address in the popup window, and click "OK" or "Refresh". {{ :resources:tools-software:linux-software:connect.png?300 |}}   - Settings -> Connect and enter the IP address in the popup window, and click "OK" or "Refresh". {{ :resources:tools-software:linux-software:connect.png?300 |}}
   - Settings -> Connect and click "Refresh" with a blank IP number. If your network supports [[http://avahi.org/|zeroconf]]((also referred to as multicast DNS/DNS-SD service discovery)), you will be connected to the device on the network.   - Settings -> Connect and click "Refresh" with a blank IP number. If your network supports [[http://avahi.org/|zeroconf]]((also referred to as multicast DNS/DNS-SD service discovery)), you will be connected to the device on the network.
 +The application can be used to connect to another platform that runs no-OS software:
 +https://wiki.analog.com/resources/tools-software/no-os-software/iio
    
  
Line 72: Line 116:
  
 {{ :resources:tools-software:linux-software:plugin_disconnect_button.png?direct&400|IIO Oscilloscope disconnect plugins}} {{ :resources:tools-software:linux-software:plugin_disconnect_button.png?direct&400|IIO Oscilloscope disconnect plugins}}
-Each plugin (or tab) can be detached from the main window simply by clicking on the button placed on the right side of the name of the plugin. Use the same button to attach the plugin back to the main window.+Each plugin (or tab) can be detached from the main window simply by clicking on the button placed on the right side of the name of the plugin. Close the detached window to attach the plugin back to the main window.
  
 The Main Window is designed to display a configuration panel (plugin) for each device recognized by the system. Additional plugins will be loaded for device debugging and monitoring purposes such as: The Main Window is designed to display a configuration panel (plugin) for each device recognized by the system. Additional plugins will be loaded for device debugging and monitoring purposes such as:
Line 93: Line 137:
 **Debug** Plugin: Is a tool for device debugging. Since "normal" users should not be doing this, features on this tab may not work unless you have started the ''osc'' application as root (try ''sudo osc'' in a terminal). **Debug** Plugin: Is a tool for device debugging. Since "normal" users should not be doing this, features on this tab may not work unless you have started the ''osc'' application as root (try ''sudo osc'' in a terminal).
  
-  * **Device Selection:** Sets the active device. Once a device is selected any other information displayed in the plugin related to this particular device.+  * **Device Selection:** Sets the active device. Once a device is selected any other information displayed in the plugin is related to this particular device.
   * **IIO Device Attributes:** Allows Read/Write operation for the attributes of a device.   * **IIO Device Attributes:** Allows Read/Write operation for the attributes of a device.
   * **Register:** Provides low level access to the registers of the device.   * **Register:** Provides low level access to the registers of the device.
Line 132: Line 176:
       * **Frequency domain:** Plots the signal in the frequency domain. Performs a FFT on the signal and displays it.       * **Frequency domain:** Plots the signal in the frequency domain. Performs a FFT on the signal and displays it.
         * **FFT size:** Selects the size of the FFT for frequency domain plotting         * **FFT size:** Selects the size of the FFT for frequency domain plotting
 +        * **Window:** Selects the FFT Window. Selecting a window function is not a simple task. Each window function has its own characteristics and suitability for different applications (some are more frequency accurate, others are more amplitude accurate). To choose a window function, you (the user) must select the most appropriate one. Check the [[./iio_oscilloscope/window_functions|details]].
         * **FFT Average:** Selects the average weight to be applied to the FFT samples.         * **FFT Average:** Selects the average weight to be applied to the FFT samples.
         * **PWR Offset:** Selects the offset of the FFT graph.         * **PWR Offset:** Selects the offset of the FFT graph.
Line 208: Line 253:
 To do so, right-click on the name of the device used for capture, and select **Trigger settings**. To do so, right-click on the name of the device used for capture, and select **Trigger settings**.
 The pop-up window that will open will allow you to configure the channel used for the trigger, as well as the trigger level and edge. The pop-up window that will open will allow you to configure the channel used for the trigger, as well as the trigger level and edge.
 +
 +====== Provided Waveforms ======
 +
 +Several waveforms are provided with the application for demonstration purposes, which can be loaded into different devices.  However, these are generally not meant for transceiver characterization or demodulation.  If you want to do such tasks, we would recommend creation of your own waveforms from tools such as [[resources:eval:user-guides:ad-fmcomms2-ebz:software:basic_iq_datafiles|MATLAB]].
 +
 ====== Source code ====== ====== Source code ======
  
Line 213: Line 263:
  
 The source code for the entire application is at [[https://github.com/analogdevicesinc/iio-oscilloscope|github]]. You can ask questions about it on the [[ez>community/linux-device-drivers|EngineerZone]]. The source code for the entire application is at [[https://github.com/analogdevicesinc/iio-oscilloscope|github]]. You can ask questions about it on the [[ez>community/linux-device-drivers|EngineerZone]].
 +
 +
 +==== Internals ====
 +
 +If you want to make your own plugin, please refer to the [[./iio_scope/internals|Internals]] page.
  
 ===== More information ===== ===== More information =====
resources/tools-software/linux-software/iio_oscilloscope.txt · Last modified: 18 Oct 2023 12:01 by Cristina Suteu