We're now using Compass Linux for the UDRC-II board.

Documentation for various software types can be found in our GitHub repository.

The instructions on how to setup G4KLX software remain about the same for compass linux. A new guide will be provided here shortly. In the mean time if you have questions, feel free to contact us using the form at the bottom of the page.

Setup the Maryland DSTAR Image on a RasPi

View the complete PDF guide here: KC3ESS Setup Guide

Setup Control Commands

In order to setup commands to control the Raspberry Pi from a radio, you need to setup the commands in the RepeaterOne Configuration program on tabs "Control 1" and "Control 2." First, in Control 1 tab, you want to select "enabled" from the drop down list next to the word "control." Then in the "RPT1 Callsign" box type in all caps without quotes "RPTRCTLX" where "X" is the module letter (typically B for 70cm and C for 2m). RPT1 Callsign can contain whatever you want, but the letter identifying your module should be in the eighth space. We suggest changing the RPT1 Callsign to something other than "RPTRCTLX" (where "X" is your module letter). If you use the original and the same commands as outlined in these instructions and the Maryland DSTAR Setup Guide, anyone with RF access can control and potentially shutdown your repeater. For example the "HALT" command would require you to physically unplug and plug back in the Raspberry Pi. In the box below it next to "RPT2" you need to type your callsign or your repeater callsign depending on what you're setting up, with the letter "G" in the EIGHTH space. It MUST be in the eighth space. If your callsign is 5 letters long you need 2 spaces after it then the letter "G".

In the "Control 2" tab, it lists the commands you can send from your radio in the left text boxes. In the text boxes on the right it lists the shell scripts being called for each command. These shell scripts on the Raspberry Pi are located in "/usr/local/bin". If you can write a script in python, you can make the Pi do just about anything based on a command sent to it over the DSTAR radio. You'll find in the "Control 2" tab that the basic commands are there, RESTART (restarts ONLY the repeater software & gateway software), HALT (Shuts down the pi - be careful, you must unplug and plug back in the Pi for it to boot again, REBOOT (completely reboots the operating system), SWITCH (if you have a DVLAP or DVMEGA, this can switch the frequency of the board). The documentation also mentions that you can setup a command to send the IP address of the Pi to a cellphone or email address, but it doesn't tell you how. I'm going to tell you how to do it.

In the "Control 2" tab, replace the "SWITCH" command in the left textbox, provided it isn't needed for your particular board, with "SENDIP" (no quotes). In the text box to the right, type in the name of the shell script you're going to create. We suggest keeping with the format of the other shell script names. So to the right of the textbox with "SENDIP" type in "klxsendip" without the quotes. This is what you're going to name the shell script you create.

Open a text editor such as LeafPad from your applications menu. Click File, then click Save As, then save it as the name you entered in the previous step (klxsendip) without an extension (so no ".txt" or ".sh"). You will need to save it in the Pi folder. You'll need to copy and paste the following code into your file.

sudo python ~/sendipaddress.py
Now save your file by clicking "File" and then click "Save".

Next you need to move that saved file from your "Pi" folder to your "/usr/local/bin" folder. Open LXterminal from the applications menu or start menu. Next you need to type in the following command without quotes, "cd ~/". This ensures you're in the Pi folder where you saved your shell script. Now type the following command without quotes, "sudo mv klxsendip /usr/local/bin". This will move your shell script into the "/usr/local/bin" folder. Next you need to change directories by typing, without quotes, "cd /usr/local/bin". Then you need to set the permissions on the file by typing the following without quotes, "sudo chmod ug=rwx klxsendip". This will set the user and group permissions on klxsendip to read, write, and execute. Next we need to set permissions on the same file for others to execute. Type the following in LXterminal without quotes, "sudo chmod o+x klxsendip".

Now that the permissions are set, you need to setup the "sendipaddress.py" file. This file is located in the "Pi" folder. Go back to LeafPad and click "File", then click "Open", find the file and open it. In this file you'll see a lot of seemingly random text, all formatted into sections. Under the section towards the top labeled "Start of Custom Items", you need to change the "username", "password", and "sendtoaddr" to fit your specific case.

In the "username" value make sure it says WITH the single quotes, 'XXXX@gmail.com" where XXXX is your username for gmail." It MUST be a GMAIL account. You may want to create a new email address with GMAIL, just for this purpose due to your password being saved in plain text in the next line.

In the "password" value make sure it says WITH single quotes, 'xxxx' where xxxx is your gmail password.

In the "sendtoaddr" value you can enter your email address WITH single quotes such as 'xxxx@gmail.com' again where xxxx is your gmail username. This address does NOT have to be gmail. Feel free to use Yahoo or any other email address you monitor.

To send to a cell phone, simply enter your 10 digit phone number with the gateway domain for your carrier. If you have Verizon Wireless you might enter '5555555555@vtext.com' WITH single quotes. If you have AT&T you might enter '5555555555@txt.att.net' WITH single quotes. Here is a list of gateways for various carriers.

Alltel: phonenumber@message.alltel.com
AT&T: phonenumber@txt.att.net
T-Mobile: phonenumber@tmomail.net
Virgin Mobile: phonenumber@vmobl.com
Sprint: phonenumber@messaging.sprintpcs.com
Verizon: phonenumber@vtext.com
Nextel: phonenumber@messaging.nextel.com
US Cellular: phonenumber@mms.uscc.net

The ability to send IP addresses is now setup, however it will only send the IP addresses that the Pi has on either its ethernet or WiFi port.

Changes Necessary to Send Public IP Address

You will also find the already edited files in our GitHub Repository

Code files on GitHub

To send the public IP address (Assuming your Pi is behind a NAT firewalled router and NOT in the DMZ. - !Most Setups!) you need to make some edits to the "sendipaddress.py" file.

Using LeafPad change this part of the "sendipaddress.py" file FROM the following:
fromaddr = username toaddr = sendtoaddr rpiname = (socket.gethostname()) message = rpiname +' RPi\'s address: ' #message that is sent time.sleep(10) #extract the ip address (or addresses) from ifconfig found_ips = [] ips = re.findall( r'[0-9]+(?:\.[0-9]+){3}', commands.getoutput("/sbin/ifconfig")) for ip in ips: if ip.startswith("255") or ip.startswith("127") or ip.endswith("255"): continue found_ips.append(ip) message += ", ".join(found_ips)
Change TO the following:
fromaddr = username toaddr = sendtoaddr rpiname = (socket.gethostname()) message = rpiname +' RPi\'s address: ' #message that is sent time.sleep(5) #Time Delay before executing the rest of the script. This can be changed. #extract the ip address from http://ipinfo.io/ip/ ip = re.findall( r'[0-9]+(?:\.[0-9]+){3}', commands.getoutput("curl http://www.ipinfo.io/ip/")) message += str(ip)

Now that this is setup, you need to program your radio.

  1. In the "YourCall" field of your radio type the name of the command in all caps that you put in the textbox to the left of "klxsendip" in the "Control 2" tab.
  2. Next in the "RPT1" field of your radio type the "RPT1 Callsign" you entered in the "Control 1" tab. It's probably "RPTRCTLX" where "X" is the letter of your module.
  3. Finally, in the "RPT2" callsign field on your radio type the callsign you entered in the "RPT2 Callsign" field in the "Control 1" tab. In our case, it's "KC3ESS G". Don't forget the "G" MUST be in the eighth space.
  4. If you want to add the other commands to your radio's memories. Follow the steps above for each command in the list (HALT, REBOOT, RESTART, SENDIP, UPDATE).

Some notes:

  1. Setting up the "sendipaddress.py" file will allow it to work (obviously). The important note is that the Pi will send you the IP address EVERY time it reboots the operating system (OS) and EVERY time you restart the Repeater/ircDDB Gateway software.
  2. The "sendipaddress.py" file is located in the "Pi" or "home" folder. Get to it in LXterminal by typing without quotes, "cd ~/".
  3. The "klxsendip" and other shell script files are located in the "/usr/local/bin" folder. Get to it in LXterminal by typing without quotes, "cd /usr/local/bin".
  4. This page can NOT be printed using your browser's print option. Use the complete PDF at the top of this page or see below.
  5. Adobe Reader may be required to view PDF files

Feel free to share this web page. Use the green button to PRINT via PrintFriendly.

To the Top of This Page    |    Get Adobe Reader