User Tools

Site Tools


softwarelinux

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

softwarelinux [2014/07/08 04:22]
roklobsta
softwarelinux [2016/07/16 02:15] (current)
roklobsta
Line 10: Line 10:
 ==== Getting SDR# Running in Linux ==== ==== Getting SDR# Running in Linux ====
  
-=== !! LINUX UPDATE !! === +As of 14 September 2015 SDR# (along with AstroSpy ​and SpectrumSpy) and works again in Linux on x86/x64 and ARM using Mono ​This ​has been tested on Linux Mint 18 x64 and an Odroid XU4.
-Alas as of May 2014 SDR# development has gone closed source ​and new changes stop it working ​in Mono and Linux. ​ ​This ​may change in the future ​and I will update this page accordingly. ​ The below HOWTO for Linux is valid for older versions prior to the changes.+
  
-The fact that SDR# worked in Mono at all was a happy accident. ​ The author did not intend this and is not obligated to keep the code backwards-compatible with Mono. +The fact that SDR# worked in Mono at all was a happy accident. ​ The author did not intend this and is not obligated to keep the code backwards-compatible with Mono.  Any performance issues with SDR# in Mono are a problem with Mono **NOT** SDR# - //do not complain about SDR# on Linux until Mono gets much better at executing .net code//.
-=== !!!!!!!!!!!! === +
  
-This has only been tested on a x64 Debian system using the combined current stable/​testing repositories but the process should be similar ​in Ubuntu ​and Fedora/Centos.+There are 2 ways to do this, you can use the PlayOnLinux way shown in [[http://​f4bpp.raidghost.com/​articles.php?​lng=fr&​pg=75&​tconfig=0|Français ici]] and [[http://​f4bpp.raidghost.com/​articles.php?​lng=en&​pg=75&​tconfig=0|English here]] or the Mono way detailed below.
  
-  ​* Install ''​mono'' ​and ''​monodevelop''​.  This is the Linux version of Microsoft'​s .NET <​code>​sudo apt-get install mono-complete monodevelop</​code>​+== Instructions (updated 16 Jul 2016) == 
 + 
 +  ​* Install ''​mono'' ​4.4 (or later) for your distro from [[http://​www.mono-project.com/​download/#​download-lin|here]].  This is the Linux version of Microsoft'​s .net.
   * Install ''​libportaudio2''​ to make sure sound works. ​ <​code>​sudo apt-get install libportaudio2</​code>​   * Install ''​libportaudio2''​ to make sure sound works. ​ <​code>​sudo apt-get install libportaudio2</​code>​
-  * Compile and install the latest ​RTLSDR I used the cmake version as detailed [[http://​sdr.osmocom.org/​trac/​wiki/​rtl-sdr#​Buildingthesoftware|here]]. ​ Don't forget to run ''​ldconfig''​ as root at the end to sort the newly installed libraries out. +  * RTLSDR ​users: ​ I used the cmake version as detailed [[http://​sdr.osmocom.org/​trac/​wiki/​rtl-sdr#​Buildingthesoftware|here]]. ​ Don't forget to run ''​ldconfig''​ as root at the end to sort the newly installed libraries out. 
-  * Download the latest SVN copy of SDR#. <​code>​svn co https://subversion.assembla.com/svn/sdrsharp/trunk sdrsharp</​code>​ +  * Airspy users: ​Download ​and install ​the host drivers from [[https://github.com/airspy/host/|here]].  ​Don'​t ​forget ​to blacklist ​the kernel driver as mentioned [[https://​github.com/​airspy/​host/​wiki/​Troubleshooting]here]
-  * ''​cd''​ into the new ''​sdrsharp''​ directory and then load ''​monodevelop''​ and open the ''​sdrsharp.sln'' ​ project. ​ If the ''​.sln''​ doesn'​t ​open use a text editor ​to open the .sln file and at the end of the first line change the ''​12.00''​ to ''​11.00''​. ​ Older versions of ''​monodevelop''​ don't understand the VS2012 header+  * Download ​the latest zipfile copy of SDR# from [[http://​airspy.com/​download|here]]
-  * Set the Active Configuration ​from ''​Debug|x86''​ to ''​Release|x86''​+  * Unzip to a new directory
-  * Click on the menu item ''​Build->​Build All''​+  * ''​cd''​ into the new SDR# directory and type the following: <​code>​ln -s /​usr/​local/​lib/​librtlsdr.so librtlsdr.dll
-  * ''​cd''​ into the new ''​Release'' ​directory and type the following: <​code>​ln -s /​usr/​local/​lib/​librtlsdr.so librtlsdr.dll+
 ln -s /​usr/​lib/​x86_64-linux-gnu/​libportaudio.so.2 libportaudio.so</​code>​ ln -s /​usr/​lib/​x86_64-linux-gnu/​libportaudio.so.2 libportaudio.so</​code>​
-  * If you wish to use Debug mode you will need to put the same links in the Debug directory. 
   * If the last command doesn'​t work type ''​locate libportaudio.so.2''​ and try again with the new path.  On 32 bit systems it will be in a different directory to what's shown here.   * If the last command doesn'​t work type ''​locate libportaudio.so.2''​ and try again with the new path.  On 32 bit systems it will be in a different directory to what's shown here.
-  * With your favourite text editor open ''​SDRSharp.exe.config''​ and find the line <​code> ​  <​!-- <add key="​RTL-SDR ​USB" value="​SDRSharp.RTLSDR.RtlSdrIO,​SDRSharp.RTLSDR"​ /> --></​code>​ and remove .net comments of so that it looks like <​code><​add key="​RTL-SDR ​USB" value="​SDRSharp.RTLSDR.RtlSdrIO,​SDRSharp.RTLSDR"​ /></​code>​ This will enable use of the RTLSDR dongle. +  * With your favourite text editor open ''​FrontEnds.xml''​ and find the line <​code> ​  <​!-- <add key="​RTL-SDR ​(USB)" value="​SDRSharp.RTLSDR.RtlSdrIO,​SDRSharp.RTLSDR"​ /> --></​code>​ and remove .net comments of so that it looks like<​code><​add key="​RTL-SDR ​(USB)" value="​SDRSharp.RTLSDR.RtlSdrIO,​SDRSharp.RTLSDR"​ /></​code> ​ This will enable use of the RTLSDR dongle. Comment out any radios you don't have so you don't get any startup errors and exceptions for non-existent radios. 
-  * Type ''​mono SDRSharp.exe''​ and you should see something like the screenshot below! ​ ​Ignore any exceptions that might pop up at the start that involve SDRIQ as it's complaining about hardware you don't have.  Maybe the author is thumbing his nose at you.  You can stop the exceptions by commenting out or deleting the lines in ''​SDRSharp.exe.config''​ for hardware you don't have. +  * Before running SDRSharp you can compile it so that it may run a bit faster. ​ To compile do: <​code>​mono --aot --optimize=all --optimize=float32 SDRSharp.exe</​code>​ 
-  * If you get audio stutter (I do on my i7 CPU!) change the audio latency from 100ms to 200ms or more.  It seems Mono doesn'​t run SDR# anywhere as efficiently as the native Windows CLR.  I have tried --optimize=all and also the --llvm options and it doesn'​t seem to help.  Any advice appreciated! +  * Type ''​mono ​--optimize=float32 ​SDRSharp.exe''​ and you should see something like the screenshot below! 
-  * Be sure to select **[ALSA] ​sysdefault** as audio output, otherwise you may experience audio stutter. +  * If you get audio stutter (I do on my old i7-720QM ​CPU!) change the audio latency from 100ms to 200ms or more.  It seems Mono doesn'​t run SDR# anywhere as efficiently as the native Windows CLR.  I have tried --optimize=all and also the --llvm options and it doesn'​t seem to help.  Any advice appreciated! 
-{{:sdrsharp-mono.png?​nolink|}} +  * Be sure to select **[ALSA] ​Default** as audio output, otherwise you may experience audio stutter. 
-  * If you download source code from the the [[https://​www.assembla.com/code/​sdrsharp/​subversion/​nodes|SVN]] tree the project/​solution opens and builds just fine in Linux with MonoDevelop.  ​Just make sure the above soft links exist in the Debug directory+{{:sdrs1368.png?​nolink|}} 
-  * Alternatively,​ you can build it directly from commandline with <​code>​xbuild /t:Rebuild /​p:​Configuration=Release SDRSharp.sln</​code>​+  * If you still get audio stutter on the Airspy at 10MS/s then try 2.5MS/s.  ​This won't change until Mono improves (drastically)
 ====RTLTCP==== ====RTLTCP====
 Have a look [[http://​www.rtlsdr.org/​softwarewindows#​rtlsdr_tcp_and_sdr|here]] for some words on using ''​rtl_tcp''​ and SDR#. Have a look [[http://​www.rtlsdr.org/​softwarewindows#​rtlsdr_tcp_and_sdr|here]] for some words on using ''​rtl_tcp''​ and SDR#.
softwarelinux.txt · Last modified: 2016/07/16 02:15 by roklobsta