added dvrptr

ki4klf
ac2ie 12 years ago
parent 7125791721
commit ee0a0e0429

@ -1,4 +1,4 @@
Creating a portable DVAP hotspot based on a Raspberry Pi or a BeagleBone Black that
Creating a DVAP or DVRPTR hotspot based on a Raspberry Pi or a BeagleBone Black that
can connect to both DStar reflectors as well as XREF reflectors based on Scott Lawson
KI4LKF software is easy.
@ -26,18 +26,19 @@ git clone git://github.com/ac2ie/g2_ircddb.git
This will create a g2_ircddb directory with everything you need to build a dvap gateway.
The first order of business is to build the necessary wxBase-2.8.12 library. There is a
script in the g2_ircddb directory to do all of this for you. Just cd to g2_rcddb and type:
script in the g2_ircddb directory to do all of this for you. Just cd to g2_ircddb and
type:
./build_wxBase
Come back to this directory and type "make" to build all the executables, g2_ircddb,
g2_link and dvap_rptr. If you need DTMFS then also execute "make g2link_test".
Next, edit all the *.cfg files, g2_ircddb.cfg, g2_link.cfg and dvap_rptr.cfg.
These files contain detailed comments about all of the values you need to set. Just
read through the configuration files and edit accordingly. Additional information about
the configuration as well as other important and useful features are also in the
CONFIGURING file.
Next, edit all the *.cfg files, g2_ircddb.cfg, g2_link.cfg and either dvap_rptr.cfg
or dvrptr.cfg. These files contain detailed comments about all of the values you need
to set. Just read through the configuration files and edit accordingly. Additional
information about the configuration as well as other important and useful features are
also in the CONFIGURING file.
The gwys.txt file is the internet address and port numbers for any gateway you would
like g2_link to be able to connect to. The one delivered with this package is special:
@ -55,23 +56,28 @@ the changes will be available.
If you plan on using DTMFS, you can also edit proc_g2_ircddb_dtmfs.sh to add new dtmfs
commands.
Then install everything by typing "sudo make install". If you want/need DTMFS, type
Then install your system, g2_ircddb, g2_link and either dvap_rptr or dvrptr. Start by
typing "sudo make installg2". This will install g2_ircddb and g2_link and all the
files they require. Then either dvap_rptr or dvrptr by typing "sudo make installdvap"
or "sudo make installdvrptr", respectively. Finally, if you want/need DTMFS, type
"sudo make installdtmfs".
This will install the service scripts and symbolic links in /etc/init.d and everything
else in /usr/local. The executables will be in /usr/local/bin and the *.cfg files and
other data will be in /usr/local/etc. If you need to modify a configuration file, do it
in /usr/local/etc. If you edit the files in the user-local g2_ircddb directory, you will
have to reinstall for the g2_ircddb, g2_link and dvap_rptr services to see them.
other data will be in /usr/local/etc. If you find that you need to modify a
configuration file, do it in /usr/local/etc. If you edit the files in the build
directory, you will either have to copy these modified configuration files you you will
have to reinstall the application.
At this point, you can either reboot to start the three or four services, or start them
manually with the "service" command. (See the man page for service.)
You can clean up the intermediate *.o files with "make clean" and remove the intermediate
*.o files and binary executables with "make realclean".
You can clean up the build directory of intermediate *.o files with "make clean" or, you
can remove the intermediate *.o files and binary executables with "make realclean".
If you want to uninstall everything return to the build directory and type
"sudo make uninstall" and possibly "sudo make uninstalldtmfs". This will shutdown the
and remove the service scripts and links and remove everything from /usr/local.
"sudo make uninstallg2" and either "sudo make unistalldvap" or "sudo make
uninstalldvrptr" and possibly "sudo make uninstalldtmfs". This will shutdown the and
remove the service scripts and links and remove most everything from /usr/local.
Tom Early, ac2ie@arrl.net

@ -23,7 +23,7 @@ LOGDIR=/var/log
CPPFLAGS=-W -Wall -I/usr/include `wx-config --cppflags base`
LDFLAGS=-L/usr/lib `wx-config --libs base`
PROGRAMS=g2_ircddb g2_link dvap_rptr
PROGRAMS=g2_ircddb g2_link dvap_rptr dvrptr g2link_test g2link_test_audio
IRCDDBOBJS = IRCDDB.o IRCClient.o IRCReceiver.o IRCMessageQueue.o IRCProtocol.o IRCMessage.o IRCDDBApp.o IRCutils.o golay23.o dstar_dv.o
@ -36,7 +36,10 @@ g2_link : g2_link.cpp
g++ -W -Wall -o g2_link g2_link.cpp -lrt -pthread
dvap_rptr : dvap_rptr.cpp dstar_dv.o golay23.o
g++ -W -Wall -g -o dvap_rptr dvap_rptr.cpp golay23.o dstar_dv.o -I/usr/include -L/usr/lib -lrt
g++ -W -Wall -o dvap_rptr dvap_rptr.cpp golay23.o dstar_dv.o -I/usr/include -L/usr/lib -lrt
dvrptr : dvrptr.cpp dstar_dv.o golay23.o
g++ -W -Wall -o dvrptr dvrptr.cpp golay23.o dstar_dv.o -I/usr/include -L/usr/lib -lrt
IRCDDB.o : IRCDDB.cpp IRCDDB.h
g++ $(CPPFLAGS) -c $(CPPFLAGS) IRCDDB.cpp
@ -82,9 +85,9 @@ clean :
/bin/rm -f *.o
realclean :
/bin/rm -f *.o $(PROGRAMS) g2link_test g2link_text_audio
/bin/rm -f *.o $(PROGRAMS) g2link_test
install:
installg2 : g2_ircddb g2_link
######### g2_ircddb #########
/bin/cp -f g2_ircddb $(BINDIR)
/bin/cp -f g2_ircddb.cfg $(CFGDIR)
@ -100,13 +103,23 @@ install:
/bin/cp -f service.g2_link /etc/init.d/g2_link
/usr/sbin/update-rc.d g2_link defaults
/usr/sbin/update-rc.d g2_link enable
######### dvap_rptr #########
installdvap : dvap_rptr
/bin/cp -f dvap_rptr $(BINDIR)
/bin/cp -f dvap_rptr.sh $(BINDIR)
/bin/cp -f dvap_rptr.cfg $(CFGDIR)
/bin/cp -f service.dvap_rptr /etc/init.d/dvap_rptr
/usr/sbin/update-rc.d dvap_rptr defaults
/usr/sbin/update-rc.d dvap_rptr enable
installdvrptr : dvrptr
/bin/cp -f dvrptr $(BINDIR)
/bin/cp -f dvrptr.sh $(BINDIR)
/bin/cp -f dvrptr.cfg $(CFGDIR)
/bin/cp -f service.dvrptr /etc/init.d/dvrptr
/usr/sbin/update-rc.d dvrptr defaults
/usr/sbin/update-rc.d dvrptr enable
installdtmfs : g2link_test
/bin/cp -f g2link_test $(BINDIR)
/bin/cp -f proc_g2_ircddb_dtmfs.sh $(BINDIR)
@ -121,7 +134,7 @@ uninstalldtmfs:
/bin/rm -f $(BINDIR)/proc_g2_ircddb_dtmfs.sh
/bin/rm -f $(BINDIR)/g2link_test
uninstall:
uninstallg2 :
######### g2_ircddb #########
/usr/sbin/service g2_ircddb stop
/bin/rm -f /etc/init.d/g2_ircddb
@ -144,10 +157,19 @@ uninstall:
/bin/rm -f $(CFGDIR)/gwys.txt
/bin/rm -f $(CFGDIR)/exec_?.sh
/bin/rm -f /var/log/g2_link.log
######### dvap_rptr #########
uninstalldvap :
/usr/sbin/service dvap_rptr stop
/bin/rm -f /etc/init.d/dvap_rptr
/usr/sbin/update-rc.d dvap_rptr remove
/bin/rm -f $(BINDIR)/dvap_rptr
/bin/rm -f $(BINDIR)/dvap_rptr.sh
/bin/rm -r $(CFGDIR)/dvap_rptr.cfg
uninstalldvrptr:
/usr/sbin/service dvrptr stop
/bin/rm -f /etc/init.d/dvrptr
/usr/sbin/update-rc.d dvrtpr remove
/bin/rm -f $(BINDIR)/dvrptr
/bin/rm -f $(BINDIR)/dvrptr.sh
/bin/rm -f $(CFGDIR)/dvrptr.cfg

@ -21,7 +21,7 @@ apt-get upgrade
apt-get install make g++ unzip git
and maybe a few more of your favorite packages. Here is one of my favorites: "apt-get install avahi-daemon". Then you can "ssh <user>@<hostname>.local" instead of "ssh <user>$<ip address>.
and maybe a few more of your favorite packages. Here is one of my favorites: "apt-get install avahi-daemon". Then you can "ssh <user>@<hostname>.local" instead of "ssh <user>@<ip address>.
After you install all the required packages, the g2_ircddb gateway installation can begin. Go to your login home directory and (without root privileges) type:

@ -0,0 +1,106 @@
# This is the repeater callsign
# This must be equal to the OWNER value in the gateway software(g2_ircddb.cfg)
DVCALL=
# If you operate in "restriction mode", set RPTR equal to your personal callsign
# otherwise set RPTR equal to the value of DVCALL
RPTR=
# If you want to enable/disable the repeater, set these options.
# Each of these options can NOT be more than 8 characters.
# Each of these options can NOT be another user's callsign.
# Each of these options can NOT be another repeater or reflector.
# Each of these options can NOT be a YRCALL command.
# If these options are set, then they can NOT be equal to each other.
# Lets take an example:
# ENABLE_RF=RFISON
# DISABLE_RF=RFISOFF
# Using the above options, if you use YRCALL=RFISOFF in your radio
# then the repeater will be OFF
# and no audio will be copied over local RF
# and no audio will be accepted from any remote system.
ENABLE_RF=RFISON
DISABLE_RF=RFISOFF
# This must be equal to: FROM_REMOTE_G2_TIMEOUT + 1
# Note: FROM_REMOTE_G2_TIMEOUT is in the gateway configuration
REMOTE_TIMEOUT=3
# This is the module of the Dstar repeater
DVRPTR_MOD=B
# To protect the repeater owners from bad STN programs out there
# and to also protect the repeater owners from RF users that abuse the STN stuff
# Reject values in YRCALL that start with STN
# If you want to allow the local RF users to subscribe to remote STN groups,
# then set it to XXX or something that is invalid like 123
INVALID_YRCALL_KEY=XXX
# Your serial number
DVRPTR_SERIAL=12.19.D3.42
# For repeater module A: DVRPTR_INTERNAL_PORT=19998
# For repeater module B: DVRPTR_INTERNAL_PORT=19999
# For repeater module C: DVRPTR_INTERNAL_PORT=20000
# Repeater IP and port, the repeater runs here
DVRPTR_INTERNAL_IP=0.0.0.0
# for module B, port is 19999
DVRPTR_INTERNAL_PORT=19999
# The Internal G2 IP and port
GATEWAY_IP=127.0.0.1
GATEWAY_PORT=19000
# Some settings for your DV-RPTR modem
RF_AUDIO_Level=60
# Do you want an ACK back ?
RPTR_ACK=Y
# ACK delay in milliseconds(ms)
# Minimum is 1, maximum is 999
# If you do not get a repeater ACK, then make it a higher number
# Some radios get the ACK in 250ms, other radios require 750ms
ACK_DELAY=300
# For each packet inside the ACK, delay so many milliseconds,
# so the ICOM Dstar radio can process the ACK
DELAY_BETWEEN=19
# This is the TX-delay in milliseconds and it is used to delay the PTT.
# Seme radios have "SLOW" switching time,
# If your radio switches slow from RX to TX, then give your radio more time to switch, maybe 250 ms
# If your radio switches fast from RX to TX, then you could set it to 100 ms or maybe less
# But the best value should be the one to match your radio, so read the manual for your radio.
# In tests that were done for SLOW and FAST radios, we set it to 100 for FAST radios and 250 for SLOW radios.
TX_DELAY=250
# Dead firmware ?
# Lets say that you set RQST_COUNT=10
# When there is NO local RF activity, (we do NOT receive anything from the DV-RPTR modem),
# then every 2 seconds we request the status from the DV-RPTR modem.
# If the DV-RPTR modem does NOT reply to our command, then after sending the command 10 times(RQST_COUNT)
# we have to assume the firmware in the DV-RPTR modem is DEAD.
# So, we send the command every 2 sedonds, and after sending the command 10 times,
# that is about (2 * 10) = 20 seconds,
# the repeater software will stop if the DV-RPTR modem does not respond after 20 seconds( 2 seconds * 10 times )
# and then the service script will restart the repeater software.
# This is used to protect the repeater owner from BAD firmware.
# Minimum value is 6.
# If you see in the log this: "Modem is not responding... shuttting down"
# Then that means that the firmware died and the DV-RPTR modem stopped responding.
# You can increase the value of RQST_COUNT if you have a slow computer,
# (or maybe your computer is running too many programs and can not service the USB/serial fast enough)
# but we were informed that this is a bug in the firmware and they are trying to fix it.
# So, increasing the value for RQST_COUNT to higher than 10, does not make much sense.
RQST_COUNT=10
# If you want duplex, set it to Y
DUPLEX=N
# These values depend on what type of tranceiver is connected to your DV-RPTR modem
# Use either 0 or 1
RX_Inverse=1
TX_Inverse=0

File diff suppressed because it is too large Load Diff

@ -0,0 +1,10 @@
#!/bin/bash
while [ 1 ];
do
/usr/local/bin/dvrptr /usr/local/etc/dvrptr.cfg > /var/log/dvrptr.log 2>&1
sleep 3
done
exit 0

@ -0,0 +1,66 @@
#!/bin/sh
# Start/stop the dstar dvrptr
#
### BEGIN INIT INFO
# Provides: dvrptr
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: dvrptr
# Description: dvrptr
### END INIT INFO
. /lib/lsb/init-functions
DVRPTR_SH=/usr/local/bin/dvrptr.sh
DVRPTR_BIN=/usr/local/bin/dvrptr
DVRPTR_PIDFILE=/usr/local/dvrptr.sh_pidfile
start()
{
status_of_proc $DVRPTR_SH >/dev/null
RETVAL=$?
if [ "$RETVAL" = "0" ] ; then
echo "$DVRPTR_SH already running"
else
/bin/rm -rf $DVRPTR_PIDFILE
echo -n "Starting $DVRPTR_SH:"
start-stop-daemon --make-pidfile --pidfile $DVRPTR_PIDFILE --exec $DVRPTR_SH -S &
log_end_msg $?
fi
}
stop() {
start-stop-daemon --pidfile $DVRPTR_PIDFILE --retry 5 -K
start-stop-daemon --exec $DVRPTR_BIN --retry 5 -K
/bin/rm -rf $DVRPTR_PIDFILE
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
status)
echo -n "$DVRPTR_SH "
status_of_proc $DVRPTR_SH
echo -n "$DVRPTR_BIN "
status_of_proc $DVRPTR_BIN
;;
*) log_action_msg "Usage: /etc/init.d/dvrptr {start|stop|restart|status}"
exit 2
;;
esac
exit 0
Loading…
Cancel
Save

Powered by TurnKey Linux.