« Yaesu "System Fusion" digital/analog voice repeater | Main | D-Star HotSpot built by Martin OK1ZOO »

G4KLX Repeater software remote control feature

In the past few weeks I have been setting up and experimenting with the built in remote control feature of the G4KLX Repeater applications.

Without an easy way to safely shutdown a headless Raspberry Pi computer, I thought being able to both reboot and shutdown the Pi from a D-Star radio would be a handy feature.

Jim N1JMM was able to decipher the registry entries in the Windows version of the software and made a comprehensive list of both ircDDB Gateway and Repeater config file parameters and values.



The Linux versions of the G4KLX software uses config files rather than registry entries. Documentation on what parameters and values are available in the config files and how they are used is not yet available. Jim's work helped immensely! 

These are the entries I added in my gmskrepeater_1 config file

controlCommand1Line=sudo shutdown -r now
controlCommand2Line=sudo shutdown -h now

controlEnabled=1 does exactly what it says... it enables the remote control feature.

controlRPT1 and controlRPT2 give you some security with the Remote Control feature.  The values in these parameters can be up to 8 characters long (I have capitalised them) and these are what need to be programmed in your D-Star radios RPT1 and RPT2 callsign fields in order for the Repeater software to interpret the remote command.

The actual Remote Control command is sent to the Repeater software in the URCall field of your D-Star radio.  In the above example config file entries I have two;
controlCommand1=REBOOT and controlCommand2=SHUTDOWN.
You can define up to four Remote Control commands.

The commands to be executed when a valid command is received are in the controlCommand1Line and controlCommand2Line config parameters.  

Now this is where things get a little tricky and will vary depending on what distribution of the G4KLX software you are using. I use Hans' DL5DI repository to install the G4KLX software on my Raspberry Pi and Odroid-X computers. Hans' install script creates the Linux user "opendv". The Repeater and ircDDB Gateway software run under this user and commands executed by the Repeater software remote control feature are executed as this user.

To enable the Remote Control feature to work properly, the Linux user that runs the Repeater software needs to be entered into the sudoers file AND given permission to execute commands without needing to enter a password.  

This can be VERY dangerous if you do the wrong thing!  Initially I added the bold text shown below into my sudoers file using the command "sudo visudo".


A much safer way to do things is to limit what opendv can execute when using the sudo prefix. In this example the opendv user can only execute the /sbin/shutdown command.

opendv ALL=(ALL) NOPASSWD: /sbin/shutdown

A final word on using the Remote Control feature.  You may or may not be aware of this, when an Icom D-Star radio is in simplex mode (eg. no DUP+ or DUP- selected) both RPT1 and RPT2 are not transmitted, even if RPT1 and RPT2 have been set.  My ID-31A radio will not allow me to edit RPT1 and RPT2 on a channel/VFO that does have DUP-/DUP+ enabled. My IC-91AD radio will allow me to set RPT1/RPT2 but they will not be transmitted until duplex mode is selected.

If you are using the G4KLX Repeater software in a simplex HotSpot implementation and have the Repeater software config entry rpt1Validation=0 and thus do not need to set DUP+/- with a zero offset, you will need to set up a channel with Duplex enabled, set the repeater offset value to zero and then set up your RPT1, RPT2 and URCalls appropriately.  If you don't have duplex mode enabled, your radio will NOT send the programmed RPT1 and RPT2 callsigns and the G4KLX Repeater software will not see them and then look for a valid command in the URCall.


PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>