Nothern Utah WebSDR Logo - A skep with a Yagi Northern Utah WebSDR
Installing a WebSDR on Ubuntu 22.04
(notes)

What's this about?

What follows are (mostly raw) notes related to installing the PA3FWM WebSDR on Ubuntu 22.04.

Some of these details related to specific aspects of code running on the Northern Utah WebSDR and are NOT required for the WebSDR:  If there are questions, use the contact info at the bottom of this page.

---->  For information about removing SNAP from an Ubuntu 22.04 system, click HERE.

* * * * * *

Upgrading a WebSDR from Ubuntu 20.04 to 22.04
Version 202303120222 - Clint, KA7OEI


If you are going to install a WebSDR on a Raspberry Pi:

The "websdr-rpi" binary is compiled for a 32 bit operating system.  While it may be possible configure a Pi with a 64 bit operating system to run the 32 bit "armhf" binary it is strongly suggested that you just install a 32 bit version of the OS on the Raspberry Pi.  Even on a Raspberry Pi 4, it will take all of the available processing power to handle two RTL-SDRs running at 2048ksps simultaneously (you'd have to overclock it to 2 GHz for this to work reliably) which means that any added abstraction of running 32 bit applications on a 64 bit system may make it unusable.

The instructions that follow will assume that in the case of the Raspberry Pi that you are installing it on a 32 bit OS:  I don't have any advice if you insist on trying to make it work on a 64 bit system although if you do so, I'd be interested in knowing how well it works and what was required to do this.  I have only done this on a RPi4 running 32 bit Ubuntu 22.04.



The set of instructions below are appropriate for any installation of the PA3FWM WebSDR on Ubuntu 22.04
From:  https://github.com/steve-m/librtlsdr/issues/34
It seems that the library supports only 4 parallel transmitting dongles at the moment. If the fifth dongle is added and started to transfer data, e.g. rtl_test -d 4, the error message appears:

“Failed to submit transfer 3!”
“Library error -5, exiting…”

The issue is that the Kernel limits the maximum size of all buffers that libusb can allocate to 16MB by default.
To TEMPORARILY change this value:
$ sudo sh -c 'echo 64 > /sys/module/usbcore/parameters/usbfs_memory_mb'

To modify it permanently, do the following:   Go to /etc/default/
Edit the file "grub" and look for the line:
    GRUB_CMDLINE_LINUX_DEFAULT="<something><something>"

Add to the contents of this "usbcore.usbfs_memory_mb=64" as in
    GRUB_CMDLINE_LINUX_DEFAULT="usbcore.usbfs_memory_mb=64"
Now, one must update GRUB:   sudo update-grub

It will not take effect until after reboot.  To verify that it's correct, do:  cat /sys/module/usbcore/parameters/usbfs_memory_mb


IMPORTANT NOTE:

In the following steps the installation of the deprecated packages libssl1.0 and libpng12-0 are discussed.  These packages are getting increasingly difficult to find - and pretty much impossible to do this if you are installing on a Raspberry Pi.  If you cannot find the packages it is possible to build them using the information found on Reynico's Github page linked HERE.

These steps - and links to the critical files - will be discussed in a separate section at the end of this document.

For libcryto:
1)  sudo nano /etc/apt/sources.list
2)  add to "sources.list:   deb [trusted=yes] http://security.ubuntu.com/ubuntu bionic-security main
3)  sudo apt update && apt-cache policy libssl1.0-dev
4)  sudo apt-get install libssl1.0-dev

NOTE:  When doing the above you may get an error message saying that "libpng12" could not be found in the repository.  If this is the case, you may need to build it from the source as follows essentially using the method mentioned above:

Note:  If you are performing a "simple" install of the WebSDR software and do not need most of what follows, jump to the portion about "SNAPd", below - but read what follows very carefully as some of it may be relevant to your installation.

* * * * * * *
NOTE:  Final step requires "sudo make install"
Dependencies:  cmake, build-essential, libusb-1.0-0-dev (already done above)
# WebSDR Gainfile and similar - 1 Meg
tempfs /home/websdr/pub/t tmpfs size=1M,mode=0777 0 0
# WebSDR temp data - 100 Meg
tempfs /home/websdr/cfg/temp tmpfs size=100M,mode=0777 0 0
# Do chmod 777 on this file!
    [Unit]
    Description= WebSDR
    After=multi-user.target

    [Service]
    User=websdr
    Group=websdr
    Type=forking
    ExecStart=/home/websdr/bin/./startsdr
    Restart=on-abort

    [Install]
    WantedBy=multi-user.target


Removing SNAP - READ THE FOLLOWING

* * *

Building libpng12-0 and libssl1.0-dev

As noted above, the libpng12-0 and libssl1.0-dev dependencies are required for the WebSDR binary - but they have been deprecated since at least Ubuntu 16 and are becoming increasingly difficult to find - and if you are installing a WebSDR on a Rasperry Pi, it's nearly impossible to do so.  Fortunately, this problem has been addressed 
on Reynico's Github page linked HERE.  We acknowledge and thank Reynico for doing this.

Even if you are NOT targeting a Raspberry Pi, it is worth reading the Github page as it contains useful information for any target hardware - and also useful tips on how to get it working, specifically with and RTL-SDR.

For convenience - and in the event that this Github page disappears, here are the steps required to build these two packages.  You may need to install the approppriate compiler software to do this, but the (standard) distro that we used already included it.

Building libpng12:
Building libssl-1.0.0:

After each of the above completes you should no longer have the "libpng" or "libssl" dependency issues.




Additional information:

 Back to the Northern Utah WebSDR landing page