HOW-TO Install ircDDB Gateway from latest source code

There isn’t a great deal of information available around the bazaars on compilation and installation of the ircDDB Gateway software from source code.  With some dumb luck trial and error, it took me a couple of days to fight my way through what little information I was able to pull together.

My first point of call was to follow the instructions available on the OpenDV GitHub site

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential libwxgtk3.0-dev portaudio19-dev libusb-1.0-0-dev chkconfig python-serial wiringPi
cd ~
git clone https://github.com/dl5di/OpenDV.git
cd ~/OpenDV/ircDDBGateway
./configure
make
sudo make install

Some tailoring of the apt-get install command may be required on some platforms to find the correct dependencies.

If you don’t need to use the GUI version, I strongly recommend compiling ircDDB Gateway without it on the slower Raspberry Pis – for me, it reduced compile time from 3 hours to just 1 on a RPi B!  To do so just substitute the configure command with …

./configure --without-gui

What you will have at this stage is a basic, but none-the-less working install; you can manually start ircddbgatewayconfig and configure the system with the GUI (provided you compiled it in!) then start either ircddbgateway (GUI) or ircddbgatewayd (CLI).

To start the command line version once the GUI is working run …

sudo ircddbgatewayd -daemon -nolog

I compiled on Ubuntu 16.04 with the GUI to get things working.  It should be fairly easy to replicate the process on the Raspberry Pi running the standard GUI version of Raspbian Jessie (but make sure you have plenty of coffee or something else to do whilst it goes through the long compile!)

I run Raspbian Jessie Lite – no GUI, so it requires a bit more trial and error …

Using poetic licence, I copied the files from the LinuxExtras directory onto the filesystem.

sudo adduser opendv
sudo cp -r ~/OpenDV/LinuxExtras/Raspbian/ircDDBGateway/* /
sudo chmod +x /usr/bin/ircddbgw_conf

This gave me the all important ircddbgw_conf command and all the auto start scripts.

When I started ircddbgw_conf, it was complaining it couldn’t open log files.  Pay attention to the output from ircddbgw_conf and create / grant permissions to the relevant directories/files it complains it is unable to read or write.

When I attempted to run the gateway manually, it wasn’t working (surprise, surprise!)  This turned out to be a problem with where ircddbgw_conf creates the config file, and where ircddbgatewayd is looking for it.  The remedy is to create a symlink from one directory to the other.

sudo ln -s /home/opendv/ircddbgateway/ircddbgateway /usr/local/etc/opendv/ircddbgateway

(You will probably have to create the /usr/local/etc/opendv directory first – whilst you’re at it create the /usr/local/var/log/opendv directory too!)

At this stage, the gateway should run …

sudo ircddbgatewayd -daemon -logdir /usr/local/var/log/opendv

It’s always handy to have another terminal window open tailing the logfile!

tail -f /var/log/opendv/ircddbgatewayd.log

OK, that should work.  If the gateway takes a while to start this is due to the loading and caching of reflector addresses.  Try disabling DExtra reflectors which seem to have the most un-resolvable addresses in the default host files – it reduced startup time from 6 minutes to 2 for me.  (Yes, I have slow internet where I am at the moment!)

To configure the autostart script which we copied from LinuxExtras do the following …

sudo chmod 755 /etc/init.d/ircddbgateway 
sudo systemctl daemon-reload
sudo systemctl enable ircddbgateway.service

This will fail to work as it stands because the startup script is looking in a different directory for the ircddbgatewayd executable and is also trying to run as an unprivileged user (you could hack about further and grant permissions to the opendv user, but I opted for the solve all solution and ran as root – naughty!)

sudo nano /etc/default/ircddbgateway

… and change a couple of the values to match as follows …

DAEMON_PATH=/usr/local/sbin/ircddbgatewayd
DAEMON_USER=root

Now, all should run as advertised …

sudo systemctl start ircddbgateway.service

(Unless you enabled logging with option 15 in ircddbgw_conf, there will be no log output in our terminal window tailing the logfile!)

To test everything is working as it should, reboot and cross your fingers!

3 thoughts on “HOW-TO Install ircDDB Gateway from latest source code

Leave a comment