How to Add N4PY Radio Control Software to a Linux Computer

A “How To” For Linux User to Add N4PY Radio Control Software to the Operating Position.

Getting started, we need to choose a distribution. For purposes of this discussion I will describe the
setup in OpenSUSE 13.1. I won’t go through it for Ubuntu, but if you follow this with openSUSE, you
should be able to interpolate and succeed with the other Linux distributions.

Choosing a suitable computer platform.

At KA7U, I am currently using an IBM Intellistation Zpro with dual XEON processors and an NVIDIA
6800 video card, for the radio control computer. I have also used an ACER Aspire One ZG5 to
interface to the radio. The IBM is quicker and the display is much better, but both of these computers
get the job done.

To install openSUSE and configure it for a useful desktop, you might like to follow some of the
directions found at How To Forge.

While this is not specifically for openSUSE 13.1, it is for openSUSE 12.1, the available software
should be similar. Pick and choose what you want to install.

You must install WINE, , the current version being used here today is
WINE version#1.7.8 . Both 32 bit and 64 bit versions are in use here and both run N4PY without
special consideration or addition of native Windows DLL files.

You will need to enable serial ports in the directory ~/.wine/dosdevices . One of my computers has a
~/.wine/dosdevices directory that lists the following:

ron@linux-i6yo:~/.wine/dosdevices> ls -l
total 0
lrwxrwxrwx 1 ron users 10 Nov 22 14:49 c: -> ../drive_c
lrwxrwxrwx 1 ron users 10 Nov 6 09:31 com1 -> /dev/ttyS0
lrwxrwxrwx 1 ron users 12 Nov 18 23:42 com3 -> /dev/ttyUSB0
lrwxrwxrwx 1 ron users 8 Nov 23 09:47 d:: -> /dev/sdb
lrwxrwxrwx 1 ron users 17 Nov 22 14:48 e: -> /sys/kernel/debug
lrwxrwxrwx 1 ron users 13 Nov 22 14:48 f: -> /proc/bus/usb
lrwxrwxrwx 1 ron users 8 Nov 5 09:46 g:: -> /dev/sdd
lrwxrwxrwx 1 ron users 9 Nov 22 14:48 h: -> /home/ron
lrwxrwxrwx 1 ron users 8 Nov 5 09:46 i:: -> /dev/sdg
lrwxrwxrwx 1 ron users 8 Nov 5 09:46 j:: -> /dev/sdf
lrwxrwxrwx 1 ron users 8 Nov 5 09:46 k:: -> /dev/sr1
lrwxrwxrwx 1 ron users 8 Nov 21 11:25 l:: -> /dev/sdh
lrwxrwxrwx 1 ron users 9 Nov 21 11:25 m:: -> /dev/sdh2
lrwxrwxrwx 1 ron users 9 Nov 21 11:25 n:: -> /dev/sdh5
lrwxrwxrwx 1 ron users 9 Nov 21 11:25 o:: -> /dev/sdh1
lrwxrwxrwx 1 ron users 8 Nov 23 09:47 p:: -> /dev/sdc
lrwxrwxrwx 1 ron users 8 Nov 23 09:47 q:: -> /dev/sde
lrwxrwxrwx 1 ron users 8 Nov 23 09:47 r:: -> /dev/sr0
lrwxrwxrwx 1 ron users 9 Nov 24 23:44 s:: -> /dev/sdc1
lrwxrwxrwx 1 ron users 9 Nov 24 23:44 t:: -> /dev/sdc2
lrwxrwxrwx 1 ron users 9 Nov 24 23:44 u:: -> /dev/sdc5
lrwxrwxrwx 1 ron users 55 Nov 28 10:42 v: -> /var/run/media/ron/babd3add-c7bf-422a-83e7-5955e9581a33
lrwxrwxrwx 1 ron users 9 Nov 24 23:51 v:: -> /dev/sdb1
lrwxrwxrwx 1 ron users 9 Nov 24 23:51 w:: -> /dev/sdb2
lrwxrwxrwx 1 ron users 9 Nov 24 23:51 x:: -> /dev/sdb5
lrwxrwxrwx 1 ron users 8 Nov 25 11:14 y:: -> /dev/sdi
lrwxrwxrwx 1 ron users 1 Sep 26 22:07 z: -> /

Notice that com1 is linked with /dev/ttyS0 , which is an actual serial port on this computer.
Notice that com3 is linked with /dev/ttyUSB0 which is a USB to Serial converter device.
When you plug in your USB to Serial converter it will be assigned a device name in the /dev directory.
You can find out what it is called by searching for it like so:

ron@linux-i6yo:~> dmesg |grep ttyUSB
[21825.616981] usb 3-1: FTDI USB Serial Device converter now attached to ttyUSB0
You can further search for it in the /dev directory.
ron@linux-i6yo:~> cd /dev/
ron@linux-i6yo:/dev> ls -l ttyUSB*
crw-rw---- 1 root dialout 188, 0 Dec 12 16:14 ttyUSB0 # notice ownership is root:dialout

If you unplug a USB to Serial converter and plug it back in, the name assignment may increment up a
number. So generally don’t do that and if you do, think about needing to reboot the computer or relink
the com port.

So what do you do in the ~/.wine/dosdevices directory to link the Serial Ports?

ron@linux-i6yo:~/.wine/dosdevices> ln -s /dev/ttyS0 com1
ron@linux-i6yo:~/.wine/dosdevices> ln -s /dev/ttyUSB0 com3

It is important that you create these symbolic links while logged into the terminal as the normal user.
Otherwise, you will get an error message when trying to connect to the ports that they are busy or in
use. Which brings us to the need of our normal user belonging to the required groups in order to have
permission to access certain hardware items. So add your user to the user group “dialout”. The image
below should help you to get this done.

Once these things are accomplished, you should be able to install N4PY in the usual way as if you were
using Windows. I do use the WINE utility “Uninstall Software “ to add and remove programs
however. So I would download N4PY, and then run “Uninstall Software” from the WINE program
group in the start menu.

There are some minor anomalies in N4PY when it is running under WINE, but if you are willing to
overlook some minor font display issues, and possibly some other little details, you should find that
N4PY functions as expected working with Linux and WINE.
I find that other applications work well with N4PY using Linux, such as MixW, N4PY remote, IPSound,
and several other windows programs. Your experience may vary.

If you would like to watch an example of N4PY remote running on openSUSE 13.1, please watch video:

Ron Morell


Raspberry Pi2 RTL_TCP Server

The Raspberry Pi2 makes a nice RTL_TCP server. You can place it anywhere on the network close to a good antenna. The sample rate requires good throughput on the Network and generally Ethernet has more throughput than WiFi and Ethernet is preferred for connectivity on the LAN. Fast WiFi will work however. So to setup the RPi2 for this service, you will first install Raspbian Jessie on the SanDisk card and boot the Pi with it. Once you have logged in to the Pi, open a terminal and do the following:

  1. Passwd
  2. sudo raspi-config
  3. sudo apt-get update
  4. sudo apt-get upgrade
  5. sudo rpi-update
  6. reboot
    log back into the Raspberry Pi
  7. cd /etc/modprobe.d
  8. sudo nano rasp-blacklist.conf #and add the following, then save the file:
    blacklist dvb_usb_rtl28xxu
    blacklist rtl2832
    blacklist rtl2830
  9. sudo update-initramfs -u
  10. cd
  11. sudo apt-get install git
  12. sudo apt-get install cmake
  13. sudo apt-get install
  14. sudo apt-get install build-essential
  15. sudo apt-get autoremove
  16. git clone git://
  17. cd rtl-sdr
  18. mkdir build
  19. cd build
  20. cmake ../
  21. make
  22. sudo make install
  23. sudo ldconfig
  24. cd /etc/udev
  25. sudo cp ~/rtl-sdr/rtl-sdr.rules ./
  26. sudo reboot
Log back into the Pi and start the RTL_TCP Service with:
 rtl_tcp -a <the Pi's IP address>

Then using SDR# or HDSDR or whatever receiver you use on your local computer, configure the TCP interface for the server’s IP address and set the sample rate and other parameters as appropriate to start receiving from the RTL-DVB USB receiver served by the Raspberry Pi.

Ron – KA7U
March 4, 2016

Asterisk and AllStar “How To Do Stuff”

This post will list links to useful documents and web-sites.


Configuration Files for Asterisk v.13 and AllStar Link

Having the AllStarLink Radio controller installed and having the Asterisk ver. 13 installed, I needed to configure the two units to make a radio telephone system. I wanted the system to work over a HSMM-MESH network and the configuration files reflect this in as much as the addresses are using Host Names instead of static IP addresses. Changing from Host Name to static IP should be about the only thing needed to use these files over a standard LAN network. These configurations result in a radio telephone system with the following provisions:

  • AllStar Node 28174 controls a Yaesu FT-7800R simplex transceiver
  • The AllStar Node accepts incoming IAX calls from the WAN or LAN
  • The AllStar Node registers SIP Telephones on the LAN
  • The AllStar Node is linked with a SIP bridge to the Asterisk v.13 PBX
  • The AllStar Node has Auto-Patch and Reverse Auto-Patch to the simplex radio
  • The Asterisk v.13 PBX is linked with a SIP bridge to the AllStar Node
  • The Asterisk v.13 PBX is registered with for inbound and outbound calls to the PSTN
  • The Dial Plan provides all telephones and radio Auto-Patch outbound calls to the PSTN
  • The Dial Plan only provides inbound telephone calls from the PSTN to 1 extension which is a DECT phone cluster
  • The Asterisk v.13 PBX is providing Voice Mail to the radio telephone system

The relevant AllStar files are:

The relevant Asterisk ver.13 files are:

Ron – KA7U
March 4, 2016

Asterisk ver.13 on the Raspberry Pi2

When I needed to install Asterisk on the RPi2 I searched google and found this “how to”:
Never wanting to reinvent the wheel and noting that this install provides many useful options, I followed the recipe there. For my archive I have copied the instruction set below.

The configurations that bridge this PBX with my AllStar Link system will follow in the next post.
Ron – KA7U
March 3, 2016

To install Asterisk on a Rapsberry Pi with a Debian based system.


apt-get -y install libv4l-dev ffmpeg libx264-130
cd /usr/src
tar xvf SDL2-2.0.4.tar.gz
rm -f SDL2-2.0.4.tar.gz
cd SDL2-2.0.4
make install
cd /usr/src
tar xvf pjproject-2.4.5.tar.bz2
rm -f pjproject-2.4.5.tar.bz2
cd pjproject-2.4.5
./configure --enable-shared
make dep
make install
cd /usr/src/
tar xvf jansson-2.7.tar.gz
rm -f jansson-2.7.tar.gz
cd jansson-2.7
make install
make check
apt-get -y install libtiff5-dev
echo /usr/local/lib/ >> /etc/
cd /usr/src
tar xvf spandsp-0.0.6.tar.gz
rm -f spandsp-0.0.6.tar.gz
cd spandsp-0.0.6
make install

Asterisk Prerequisite

apt-get -y install subversion libspeexdsp-dev libmyodbc unixodbc-dev libmysqlclient-dev libnewt-dev libncurses5-dev uuid-dev libxml2-dev libsqlite3-dev libssl-dev portaudio19-dev

Install Asterisk

cd /usr/src
tar xvf asterisk-13-current.tar.gz
rm -f asterisk-13-current.tar.gz
cd asterisk-13.7.0
make menuselect
make install
make config
make samples

Debian Cleanup

apt-get -y autoclean
apt-get -y autoremove

AllStar Link on the RPI2

After a few attempts to configure a Raspberry PI 2 to be an AllStar Link node, I finally settled on using the ARCH version that is discussed here:

There is a group reflector that supports the users of this version of the AllStar Link system and it is found here:

KB4FXC and WA3DSP seem to be the active developers of this ARCH Linux AllStar Link system for the Raspberry PI 2. They have modified the module to correct certain issues that seem common to other Raspberry PI and ARM processor implimentations of the software.

If you decided to install the AllStar Link software on a Raspberry PI 2 or BBB, and having successfully installed it, then if you are interested in some of my configurations read on.

The ARCH image is minimal as it is delivered. Everything you need for the service is there and then some, but if you want something else, well then it might be a problem because if you update the repositories you will bring in dependencies that are not compatible and will break the software. For example I wanted the terminal shell called “Screen”. If you use Screen you know why, if you don’t well then it might not matter, but the example of how I installed it will be useful to you for other things you might want to add. There are archived repositories available for ARCH and you can find the appropriate versions of software to match with the ARCH image you are using.  This link should take you to the program archives that contain useful programs for the image, if that is the one you have installed. If not, you will need to ask on the reflector for the correct archive… Next you need to try to determine which program version will work with the dependencies already installed on your system.  I guessed by checking version and date info on gcc.
[root@AllStar-KA7U ~]# gcc –version
gcc (GCC) 4.9.2 20141224 (prerelease)
Then a scan of the gcc versions available in the archive led me to believe the install package dated around Nov-Dec of 2014. Then scanning the Screen versions I found one that was created in that time frame and took a chance that it was good in the system. I found this one: screen-4.2.1-3-armv7h.pkg.tar.xz 12-Nov-2014 03:37 , and so it would be installed using:
pacman -U 
and that worked just fine.

Once the AllStar Link system is installed and configured with the first boot and login, I wanted to configure a telephone system to work with it. The AllStar Link system is an Asterisk PBX and functions for that purpose, but newer versions of Asterisk (ver.13 at this time) offer better security and NAT traversal without port forwarding, as well as voice mail and all the other modern features of telephone systems, so I decided to setup another Raspberry Pi2 running Asterisk ver.13 and use a SIP bridge to connect them. This configuration is involved and will be covered in another post.

Ron – KA7U
March 3, 2016