Topics

GUI Development...

Marty Wittrock
 

Edouard,

Since SDRAngel can be controlled through Python, is it safe to say that a Python application that's based around Kivy can control SDRAngel, too? If one sets up SDRAngel for all the typical mod/demod and bands and running as a server on one PC and just has another GUI control from another machine that's 'steering' that setup is there any reason why a Python app that has a Kivy front-end can't be used for remoting into SDRAngel? Let me know your thoughts on this - thanks,

73 de Marty, KN0CK

Edouard Griffiths
 

Hello Marty,

out of curiosity what is Kivy? You can control SDRangel via its REST API with any application that can send HTTP requests.

Brgds, Edouard. 

Marty Wittrock
 

Edouard,

Kivy is a GUI front end for Python that allows things like this:

https://www.youtube.com/watch?v=Zz7c1OGv2U4

I want to develop a Kivy front end that has knob, slider, and button controls that have hooks into Python that would, by remote, control SDRAngel to the Lime. They also say that Kivy is extensible to any platform (Android) such that you could control and monitor SDRAngel over a remote link. I'm looking to use the Python scripts you wrote as examples for the Lime and then use Kivy to dress them up and make them extensible to the headless design of 'Angel. I think there's a way to press that into place, and I'm also trying to use the REST API as the means for that, but Kivy allows rich color controls that work well with Python to make a pretty nice user interface. Obviously I will continue to use the GUI that SDRAngel is based upon, but if running in the radio server mode I can use Python and Kivy as a user interface then this will only open up so many new doors to the SDRAngel because, Edouard, your app - -SDRAngel - - is the ONLY app that truly runs HF with the Lime properly. There is no other application in use today that has correct, accurate, and functional use with the Lime other than SDRAngel. So, why not open new doors for it using Kivy.

Let me know your thoughts on this, Edouard,

73 de Marty, KN0CK

Edouard Griffiths
 

Hello Marty,

it looks nice. I see no reason why this should not work. Besides the Python examples you have a full web based UI (but in Javascript/Angular) at: https://github.com/f4exb/sdrangelcli this is not too easy to make the relation with Python but of course the API calls would be the same. You also have an interactive documentation/interface accessible from port 8091 (default) on localhost (default) while SDRangel is running.

This kind of interface would be interesting for a specialized downsized GUI app that could run on a Raspberry.

Brgds,
Edouard. 

Marty Wittrock
 
Edited

Edouard,

Thanks for the encouragement on this - greatly appreciate it. At the same time, I think I see the machine in your mind ramping up on this, too..! :) 

LET'S DO THIS..! Onward to Kivy/Python for the SDRAngel..!!

73 de Marty, KN0CK

Marty Wittrock
 

Edouard,

I set up an environment for Kivy on Win10 and installed the knobs GUI in Kivy (along with everything else they offer for examples). Here is how I installed it for Win10, you CAN install it for Linux as well:

Windows 10 Install:
------------------------

Installing the kivy stable release

Warning

Kivy 1.11.1 is the last release that supports Python 2.

Now that python is installed, open the Command line and make sure python is available by typing python --version. Then, do the following to create a new virtual environment (optionally) and install the most recent stable kivy release (1.11.1) and its dependencies.

  1. Ensure you have the latest pip, wheel, and virtualenv:

    python -m pip install --upgrade pip wheel setuptools virtualenv
    

    Optionally create a new virtual environment for your Kivy project. Highly recommended:

    1. First create the environment named kivy_venv in your current directory:

      python -m virtualenv kivy_venv
      
    2. Activate the virtual environment. You’ll have to do this step from the current directory every time you start a new terminal. On windows CMD do:

      kivy_venv\Scripts\activate
      

      If you’re in a bash terminal, instead do:

      source kivy_venv/Scripts/activate
      

    Your terminal should now preface the path with something like (kivy_venv), indicating that the kivy_venv environment is active. If it doesn’t say that, the virtual environment is not active.

  2. Install the dependencies (skip gstreamer (~120MB) if not needed, see Kivy’s dependencies). If you are upgrading Kivy, see Updating Kivy from a previous release:

    python -m pip install docutils pygments pypiwin32 kivy_deps.sdl2==0.1.22 kivy_deps.glew==0.1.12
    python -m pip install kivy_deps.gstreamer==0.1.17

    1. Install kivy:

      python -m pip install kivy==1.11.1
      
    2. (Optionally) Install the kivy examples:

      python -m pip install kivy_examples==1.11.1
      

      The examples are installed in the share directory under the root directory where python is installed.

    That’s it. You should now be able to import kivy in python or run a basic example if you installed the kivy examples:

    python kivy_venv\share\kivy-examples\demo\showcase\main.py
    
    
    Now...to install the garden.knob Kivy app, you do this (I cut/pasted it from the link I sent this morning - I just posted how to do the knob install for Kivy):

    For those trying to install the knobs for Kivy under Windows 10, all you have to do once you have Kivy installed is to do the following on the Command Prompt:    garden install garden.knob      ...this will install the garden.knob app using the Kivy installer for apps from Github and located in the 'kivy-garden' subdirectory on Github. Once you have that installed, you can download the entire folder from https://github.com/kivy-garden/garden.knob and then locate it (copy paste using Windows File Explorer) under the Users\<your username>\kivy_venv\share\kivy-examples\      subdirectory. Go to that subdirectory in the Command Prompt and then on the command line type the following: python example.py and VIOLA - you'll see the knobs appear on a panel and you can play with them..! HAVE FUN WITH IT..!!

    And so there it is...You'll have a Kivy environment and all you need it Python 2.7 to make it happen (it's necessary since Kivy is based on Python). Check out the other apps and demos they have...There is one demo you can try with this command on the Command Prompt: 

    python kivy_venv\share\kivy-examples\demo\showcase\main.py

    That will show you A LOT of other examples to use with Kivy, too.

    Have fun with it, I know I will be with SDRAngel and the Lime..!!

    73 de Marty, KN0CK

Michael Durkin
 

Not sure if i retrieved every thing needed .. but on openSUSE

sudo zypper in python-Kivy

KC7NOA


On Wed, Oct 2, 2019 at 9:21 PM Marty Wittrock <martywittrock@...> wrote:
Edouard,

I set up an environment for Kivy on Win10 and installed the knobs GUI in Kivy (along with everything else they offer for examples). Here is how I installed it for Win10, you CAN install it for Linux as well:

Windows 10 Install:
------------------------

Installing the kivy stable release

Warning

Kivy 1.11.1 is the last release that supports Python 2.

Now that python is installed, open the Command line and make sure python is available by typing python --version. Then, do the following to create a new virtual environment (optionally) and install the most recent stable kivy release (1.11.1) and its dependencies.

  1. Ensure you have the latest pip, wheel, and virtualenv:

    python -m pip install --upgrade pip wheel setuptools virtualenv
    

    Optionally create a new virtual environment for your Kivy project. Highly recommended:

    1. First create the environment named kivy_venv in your current directory:

      python -m virtualenv kivy_venv
      
    2. Activate the virtual environment. You’ll have to do this step from the current directory every time you start a new terminal. On windows CMD do:

      kivy_venv\Scripts\activate
      

      If you’re in a bash terminal, instead do:

      source kivy_venv/Scripts/activate
      

    Your terminal should now preface the path with something like (kivy_venv), indicating that the kivy_venv environment is active. If it doesn’t say that, the virtual environment is not active.

  2. Install the dependencies (skip gstreamer (~120MB) if not needed, see Kivy’s dependencies). If you are upgrading Kivy, see Updating Kivy from a previous release:

    python -m pip install docutils pygments pypiwin32 kivy_deps.sdl2==0.1.22 kivy_deps.glew==0.1.12
    python -m pip install kivy_deps.gstreamer==0.1.17

    1. Install kivy:

      python -m pip install kivy==1.11.1
      
    2. (Optionally) Install the kivy examples:

      python -m pip install kivy_examples==1.11.1
      

      The examples are installed in the share directory under the root directory where python is installed.

    That’s it. You should now be able to import kivy in python or run a basic example if you installed the kivy examples:

    python kivy_venv\share\kivy-examples\demo\showcase\main.py
    
    
    Now...to install the garden.knob Kivy app, you do this (I cut/pasted it from the link I sent this morning - I just posted how to do the knob install for Kivy):

    For those trying to install the knobs for Kivy under Windows 10, all you have to do once you have Kivy installed is to do the following on the Command Prompt:    garden install garden.knob      ...this will install the garden.knob app using the Kivy installer for apps from Github and located in the 'kivy-garden' subdirectory on Github. Once you have that installed, you can download the entire folder from https://github.com/kivy-garden/garden.knob and then locate it (copy paste using Windows File Explorer) under the Users\<your username>\kivy_venv\share\kivy-examples\      subdirectory. Go to that subdirectory in the Command Prompt and then on the command line type the following: python example.py and VIOLA - you'll see the knobs appear on a panel and you can play with them..! HAVE FUN WITH IT..!!

    And so there it is...You'll have a Kivy environment and all you need it Python 2.7 to make it happen (it's necessary since Kivy is based on Python). Check out the other apps and demos they have...There is one demo you can try with this command on the Command Prompt: 

    python kivy_venv\share\kivy-examples\demo\showcase\main.py

    That will show you A LOT of other examples to use with Kivy, too.

    Have fun with it, I know I will be with SDRAngel and the Lime..!!

    73 de Marty, KN0CK