Jump to: navigation, search

ScratchRadio:Installation

Back to the main Scratch Radio Wiki page: ScratchRadio

1 Obtaining the Source Code

The latest packaged release of the Scratch Radio source code can be downloaded directly from the GitHub release directory (see github.com/myriadrf/ScratchRadio/releases). Alternatively, the latest master branch version can be cloned from the GitHub repository as follows:

 > git clone https://github.com/myriadrf/ScratchRadio

After cloning the repository or extracting the contents of the release archive file to the local Raspberry Pi filesystem, change to the local Scratch Radio directory to build and install the software:

 > cd ScratchRadio

2 Installation and Setup

The following installation steps assume an up to date installation of Raspbian Stretch is being used. In order to ensure that all the latest updates have been applied, the following commands may be used:

 > sudo apt-get update
 > sudo apt-get upgrade

All the required package dependencies for building the various SDR components can be installed by running the 'install_deps.sh' script with superuser privileges. Note that it may be necessary to re-run this script if any of the package installation steps fail:

 > sudo  ./scripts/install_deps.sh

The Raspbian Stretch distribution already contains pre-built packages for SoapySDR and LimeUtils, but these are out of date relative to the current repositories and they need to be built and installed from source instead. The 'LimeSuite' makefile target automates this process:

 > make LimeSuite

The main GNU Radio package from the Raspbian Stretch distribution is installed as one of the required dependencies. However, an up to date version of the gr-limesdr GNU Radio module needs to be compiled from source – together with the out of tree GNU Radio module from this repository which contains the dedicated Scratch Radio components:

 > make GnuRadio

Finally, the latest files for Scratch2 integration can be installed as follows:

 > make ScratchRadio

The default makefile target is 'all' which will run the builds for LimeSuite, GnuRadio and ScratchRadio in the required order. After running the build process, all the intermediate files can be removed by using the 'clean' target:

 > make clean

3 Updating the Firmware

Lime Microsystems periodically release firmware updates for the LimeSDR-Mini hardware. In order to ensure that the latest firmware is being used, attach the LimeSDR-Mini to one of the Raspberry Pi USB ports and then perform the firmware version check and update from the command line:

 > LimeUtil --update

4 Checking the Installation

To check the Scratch Radio installation, start the Scratch 2 programme either by selecting the “Programming->Scratch2” option from the main Raspberry Pi application menu or by typing “scratch2” at the terminal command line. Once running, it should be possible to add the Scratch Radio extension by selecting “More Blocks” and then “Add an Extension” in the Scratch scripts panel as shown below:

ScratchRadio-AddExtension1.jpg

The Scratch Extension Library dialogue box should now include an extension called “Scratch Radio”. Selecting this and clicking “OK” will load the Scratch Radio extension blocks ready for use.

ScratchRadio-AddExtension2.jpg

On first loading the Scratch Radio extension, the associated GNU Radio application will be started in a separate terminal window. This window must not be closed while the Scratch Radio extension is in use, but may be minimised if required. On startup the GNU Radio application checks for an attached LimeSDR-Mini device and reports information about the selected device to the terminal window as shown below:

ScratchRadio-AddExtension3.jpg

Assuming that the LimeSDR-Mini device is correctly reported, the Scratch Radio extension should now be ready for use.

5 Removing Scratch Radio

The Scratch Radio extension can be removed by using the 'uninstall' makefile target as follows:

 > make uninstall

This will remove the extension files from the Scratch2 installation directory but leaves the GNU Radio and LimeSuite installations intact.

Back to the main Scratch Radio Wiki page: ScratchRadio