SDR Sharp Ubuntu

Build SDR-sharp

This procedure was tested using RTL-SDR with Ubuntu using Mono 4.2 or 4.6. Mono 3.x doesn’t work.

Install SDR# prereqs

apt install mono-complete libportaudio2 librtlsdr0 librtlsdr-dev

librtlsdr0 provides file /lib/udev/rules.d/60-librtlsdr0.rules that allows the RTL-SDR stick to be recognized upon USB plugin.

Build SDR#.

git clone https://github.com/cgommel/sdrsharp
cd sdrsharp
xbuild /p:TargetFrameworkVersion="v4.5" /p:Configuration=Release

Softlinks help your Mono executable find the audio libraries.

cd Release

ln -s /usr/lib/x86_64-linux-gnu/libportaudio.so.2 libportaudio.so

ln -s /usr/lib/x86_64-linux-gnu/librtlsdr.so.0 librtlsdr.dll

Run SDRSharp

In Linux,

mono SDRSharp.exe

Set audio buffer to 200ms, sample rate to 2.048Mbps

Notes

Find library paths

In general you can find the path(s) to a Linux library by:

dpkg -L libportaudio2

Linux RTL-SDR programs

Alternative SDR choices for the RTL-SDR receivers on Linux include

Successful compiler output

Build succeeded.

Warnings:

~/sdrsharp/SDRSharp.sln (default targets) ->
(Build target) ->
~/sdrsharp/HackRF/SDRSharp.HackRF.csproj (default targets) ->
/usr/lib/mono/xbuild/14.0/bin/Microsoft.CSharp.targets (CoreCompile target) ->

HackRFDevice.cs(30,38): warning CS0414: The private field `SDRSharp.HackRF.HackRFDevice._readLength' is assigned but its value is never used

1 Warning(s)
0 Error(s)

portaudio not found

Will yield errors including:

No portaudio softlink

[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'PortAudioSharp.PortAudioAPI' threw an exception. ---> System.DllNotFoundException: portaudio
 at (wrapper managed-to-native) PortAudioSharp.PortAudioAPI:Pa_Initialize ()
 at PortAudioSharp.PortAudioAPI..cctor () [0x00000] in <f5585b747542479b9265ce3e8b5dd161>:0

Device signatures not installed

Error loading 'SDRSharp.RTLSDR.RtlSdrIO.SDRSharp.RTLSDR' - Exception has been thrown by the target of an invocation.

Error loading 'SDRSharp.SDRIQ.SdrIqIO.SDRSHarp.SDRIQ' - """"

'SDRSharp.HackRF.HackRF.HackRFIO.SDSharp.HackRF'