Tuesday, January 06, 2015

Linux For Ham Radio - Ham Radio University Forum - HRU 2015

Welcome to all HRU attendees, and visitors to this website.  I would like to thank HRU for inviting me to be a presenter this year, and also to everyone who attended my forum.  Here are the notes I promised, as well as a link to the presentation.  This subject really requires more than the 45 minutes we had.  I had wanted to demonstrate my RTL-SDR dongle running in Linux, and to spend a little time explaining the best way to set it up.

If any metro-area Ham Radio clubs would like me to do this presentation for them, please contact me at: W2NDG(AT)ARRL(DOT)NET.

First of all, lets look at some of the main subjects from the presentation.

Here is a link to the small presentation

We were using Linux Mint, available here.  This was the newest version of Mint, 17.1, or Rebecca.

I spoke about some pre-configured Linux distributions like Andy's Ham Radio Linux and Shackbox, but didn't recommend them for everyday use.

If you want to look at some of the other mainstream distros, I mentioned DistroWatch.
The site I mentioned for a nice list of available Linux Ham Radio apps was Radio.linux.org.au.
Another great place to look is in the Software Manager app and Package Manager app in Linux Mint (or any of the distributions with package managers).  The first category in the list is Amateur Radio.
For digital modes, use the Linux version of Fldigi.  Either install from the software manager, or use Kamal's repositories for a more up to date version:
Open a terminal window

Enter the following set of commands.

     sudo add-apt-repository ppa:kamalmostafa/fldigi 
     sudo apt-get update
     sudo apt-get install fldigi
For rig control, I talked about Flrig, and Grig, both available in the software or package manager.
You're welcome to attempt to get Ham Radio Deluxe running in Linux using WINE, but it is very buggy!
For logging, take a look at the list at Radio.linux.org.au under logging
For SDR, I recommend Gqrx, but you can also check the list at Radio.linux.org.au
It is possible to get SDR# running in Linux either by:
Compiling it using Mono Libraries (supposedly this only works for older versions of SDR# now)
RTL-SDR: And SDR in general
To get your RTL-SDR USB dongle running in Linux, here is the step-by-step process using the command line (terminal):
(remember: Linux is case sensitive!)

sudo apt-get update

sudo apt-get install git (may already be installed)

sudo apt-get install cmake

sudo apt-get install libusb-1.0-0.dev

sudo apt-get install build-essential

git clone git://osmocom.org/rtl-sdr.git

cd rtl-sdr

mkdir build

cd build

cmake ../ -DINSTALL_UDEV_RULES=ON  (spaces between "cmake & .." and "../ & -DINSTALL")

make

sudo make install

sudo ldconfig

sudo cp ../rtl-sdr.rules /etc/udev/rules.d/

sudo reboot  (or just reboot normally)

This next section blacklists the existing drivers which load at boot time. If you do not do this, you have to manually kill the old drivers every time you reboot, or re-insert the dongle.  This is similar to what the app Zadig does in Windows.

sudo pluma /etc/modprobe.d/raspi-blacklist.conf
(replace pluma with whatever editor you have)

add the following lines in the blank file:
blacklist dvb_usb_rtl28xxu
blacklist rtl2832
blacklist rtl2830

Save and exit.

REBOOT AGAIN

To test after rebooting:
rtl_test -t
to start server:  rtl_tcp -a (IP OF COMPUTER)
You can now use your Linux computer as an RTL-SDR server and connect to it over the network from SDR# remotely.
GQRX
Or, just install GQRX, and run locally, in which case you do NOT need to start the RTL-SDR server.
GQRX will also work with sound-card based SDRs, as well as cutesdr, and you can also use the gnuradio tools to create SDR utilities.
gnuradio has its own package management system if you want to check it out called pybombs
CHIRP:

You may get an error running chirp the first time about not having permission to access your USB to SERIAL adapter (which almost always shows up as ttyUSB0)

To fix this:

sudo adduser yourusername dialout  (substitute your username)

sudo chmod a+rw /dev/ttyUSB0  (change ttyUSB0 to the port you are using if different)


Getting WINE Apps to see Linux serial ports:

Install app with PlayOnLinux
find virtual drives in your home directory
in dosdevices folder for the app in question, create symbolic link called com1 to /dev/ttyUSB0 (or the port you need if not tty USB0)

ln -s /dev/ttyUSB0 ~/.PlayOnLinux/wineprefix/ICT90A/dosdevices/com1
(there is a space between USB0 and ~)


Change permissions of ttyUSB0 (or the appropriate device) to allow access to all users if it still doesn't work as we did above in the CHIRP section.











No comments: