D-STAR G2 Scripts & Utilities
Table of Contents
- Joining the Network Instructions
- Update 1
- Update 2
- TCP/UDP Port Usage
- Gateway Scheduler
- Update Script
- DStarMonitor Gateway Usage Monitor / DPRS Service
- DStarMonitor Init Script
- Web Password Changer
- D-STAR User Information Utility
- dplus - Swiss Army Chainsaw Application
- dplus Init Script
- D-STAR Gateway Admin Links
- D-STAR Application Links
Joining the Network (Installing a new Gateway system)
Please follow the instructions found here: http://dsync.dstarusers.org/JoiningTheNetwork2.pdf
Update #1 (NJ6N)
The Update #1 script does the following:
- Updates the postgres database server configuration file.
- Installs the gateway scheduler script gw_schedule that enables the trust server team to remotely control the operation of each gateway.
- Installs the gateway script updater update_scripts_g2 that keeps the admin scripts up to date.
- Installs a new crontab configuration file for cron, the utility that allows tasks to be automatically run in the background at regular intervals. The new crontab alters the execution frequency of the ICOM gateway scripts and enables the execution of the gateway scheduler script every 15 minutes.
- Installs a new version of the ICOM ipchk.sh script that updates the trust server with the current IP address of your gateway.
- The script reboots the gateway computer to make sure that everything is installed correctly.
To Install:
cd /tmp
curl -O dsyncg2.dstarusers.org/update1
sh ./update1
Update #2 (NJ6N)
The Update #2 script does the following:
- Updates the ICOM gateway daemons and database cleanup utility to version 2.1
Release Notes - July 25, 2008
dsipsvd changes
- Revision 2.1
- Data synchronization was improved. Note: This is the primary reason for this update release.
- Possibility of time-out problem occurrence was drastically reduced.
- The software was modified to detect if the user did not change the
default repeater call sign "XXXXXXX" in the configuration text file,
and will not allow operation until the user enters a valid call sign
for the repeater.
- Rare instances of memory leaking were fixed.
dsgwd changes
- If a terminal moved into another repeater area of the same zone
the software overwrites the headers in incoming packets to redirect
the data tothe correct area repeater even though the updated user data
are not yet shared in the entire network. (Jim's comment: This helps
a LOT for those of us who move between UHF and VHF during a
commute!)
- When dsgwd software detects a terminal movement (changing zones),
it immediately updates the local database entry with the new terminal
position. This enables instant position data update and communication
link establishment regardless of the synchronization information sent
from the Trust Server.
Changes in default software settings
- The PostgreSQL "autovacuum" function has been turned on as the
default.
- Health checking (between TrustServer and each Local GW) interval
was adjusted to every 1 hour (it used to be every 5 minutes).
To Install:
cd /tmp
curl -O dsyncg2.dstarusers.org/update2
sh ./update2
Example run:
[root@nj6n brian]# cd /tmp
[root@nj6n tmp]# curl -O dsyncg2.dstarusers.org/update2
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2312 100 2312 0 0 4280 0 --:--:-- --:--:-- --:--:-- 105k
[root@nj6n tmp]# sh ./update2
Checking for: /opt/products/dstar/dstar_gw/dsipsvd/dsipsvd ... [ok]
Checking for: /opt/products/dstar/dstar_gw/dsgwd/dsgwd ... [ok]
Stopping dstar_gw: [ OK ]
postgres is stopped
tomcat is stopped
httpd is stopped
dsipsvd is stopped
dsgwd is stopped
Downloading patch file...
Verifying patch file ... [ok]
Unpacking patch file ...
./dsgwd/dsgwd
./dsipsvd/dsipsvd
./dsipsvd/dbdelrec
[done]
Restarting Gateway Applications...
Starting dstar_gw: [ OK ]
postgres is running...
tomcat is running...
httpd is running...
dsipsvd is running...
dsgwd is running...
All done.
TCP/UDP Ports
It is very important to configure your router and any firewall software to pass the following ports along to the gateway box.
| Description | Port No. | Protocol |
| Voice Receive | 40000 | UDP |
| Data Receive | 40001 | TCP |
Data Sync dplus | 20001-20005 | UDP TCP |
gw_schedule (NJ6N)
gw_schedule is a PERL script that runs every 15 minutes through the linux cron facility. It obtains information from the US Root trust server and executes any scheduled commands.
crontab entry: 0-59/15 * * * * /usr/bin/perl /dstar/scripts/gw_schedule
Current status from each gateway is reported to the dsync G2 web site each time the script runs.
To Install:
Installed by update1, see above.
update_scripts_g2 (NJ6N)
update_scripts_g2 is a script that runs once daily at 01:10 AM. This script is used to update the US Root provided scripts as well as other commonly installed third-party software as well.
Crontab entry: 10 1 * * * /usr/bin/perl /dstar/scripts/update_scripts_g2
To Install:
Installed by update1, see above.
Currently updated software:
- /dstar/scripts/gw_schedule
- /dstar/scripts/update_scripts_g2
- /etc/init.d/dsm
- /etc/init.d/dplus
Disabling updates: If you don't want something updated, create an empty file with same name as the application/file you don't want updated with ".noupdate" appended to it. Place this file in the same directory as the application/file you don't want updated and the updater will not update it.
For example: The command touch /dstar/scripts/gw_schedule.noupdate will cause the gw_schedule script to not be automatically updated.
THIS IS HIGHLY DISCOURAGED!
DStarMonitor Gateway Usage Monitor /DPRS Service (AE5PL)
DstarMonitor Reports gateway usage to DStarUsers.org and sends D-PRS position reports to JFindU web site.
To Install
cd /tmp
curl -O http://dsyncg2.dstarusers.org/dsm_installer_g2
sh ./dsm_installer_g2
DStarMonitor Start/Stop "init" Script (NJ6N)
dsm Starts and stop the DStarMonitor and JavAPRS Applications
Note: This script is normally installed as part of the DSM installation.
To Install or Upgrade:
cd /etc/init.d/
curl -O http://dsyncg2.dstarusers.org/dsm
/bin/chmod 755 dsm
/sbin/chkconfig --add dsm
D-STAR Web User/Admin Password Changer (AA4RC)
dstarpasswd changes the local (unsync_user_mng) password of a user or admin.
To Install
cd /tmp
curl -O opendstar.org/tools/G2/dstarpasswd-install.sh
sh ./dstarpasswd-install.sh
Usage: /dstar/tools/dstarpasswd CALLSIGN password
(e.g. /dstar/tools/dstarpasswd AA4RC IneedApass? )
D-STAR Gateway User Information Tool (AA4RC)
dstarusersls Shows the current status of your gateway users
To Install
cd /dstar/tools
curl -O opendstar.org/tools/G2/dstarusersls
chmod 755 dstarusersls
Usage: /dstar/tools/dstarusersls
Local users requesting registration:
[ CALL ] [ DATE TIME ] [ EMAIL ] [ NAME ]
Local users registered with no terminals added:
[ CALL ] [ DATE TIME ] [ EMAIL ] [ NAME ]
Local users registered with terminals added:
[ CALL ] [ DATE TIME ] [ EMAIL ] [ NAME ]
dplus D-STAR Gateway Swiss Army Knife Utility Program (AA4RC)
dplus Enables added gateway functionality including:
- Support for DV Dongle users
- Echo test
- Gateway/reflector linking
- Voice mail, store and playback
- Ability to play pre-recorded AMBE DV audio files on specified module
- User invoked system ID message.
- Simulcast to all modules
- Extensive logging (/var/log/dplus.log)
dplus revision history
To Install
- Make sure port range 20001-20005 TCP/UDP is forwarded to your gateway.
- Make sure iptables firewall is either turned off or configured to allow the ports below:
| Description | Port No. | Protocol |
| Voice Receive | 40000 | UDP |
| Data Receive | 40001 | TCP |
Data Sync dplus | 20001-20005 | UDP TCP |
cd /tmp
curl -O http://www.opendstar.org/tools/G2/dplus-install-g2.sh
sh ./dplus-install-g2.sh
To update from a previous version:
cd /tmp
curl -O http://www.opendstar.org/tools/G2/dplus-update-g2.sh
sh ./dplus-update-g2.sh
dplus Start/Stop "init" Script (NJ6N)
dplus Starts and stop the dplus service (see dplus description)
Note: This script is installed as part of the DPLUS installation and updated by the
script updater as necessary.
D-STAR G2 Gateway System Links
D-STAR Application Links
Brian Roode, NJ6N
revision 1.0d 8/11/2008