diff --git a/DTMF+REMOTE.README b/DTMF+REMOTE.README new file mode 100644 index 0000000..24c9a7a --- /dev/null +++ b/DTMF+REMOTE.README @@ -0,0 +1,54 @@ + ####### DTMF ######## + +DTMF is available with the QnetGateway Software. You can do things like linking +and unlinking from you radio's keyboard, if present. For example, typing +"#75703" would link you to XRF757 C. + +DTMF is not enabled by default. To enable it, first create a DTMF script called +"qndtmf" in the build directory. A complete, functional script is included +and is called "qndtmf.sh", so you can start by just copying it to the target: + +cp qndtmf.sh qndtmf + +Then you can install DTMF: sudo make installdtmf + +To uninstall DTMF: sudo make uninstalldtmf + +Be sure to look at the script. It contains examples of all the DTMF commands it +supports. You can add more if you are good at shell programming and understand +how qnremote works. + + ######## QnetRemote ######### + +QnetRemote is a program used to send any arbitrary YourCall to your QnetGateway +system. It is install automatically when you install any of the supported modems: +MMDVMHost, QnetDVAP or QnetDVRPTR. It's a very simple, yet powerful program. +Open a shell to you system and type "qnremote" and it will remind you of the +format it expects: + +pi@raspberrypi:~ $ qnremote +Usage: qnremote +Example: qnremote c n7tae xrf757cl +Where... + c is the local repeater module + n7tae is the value of mycall + xrf757cl is the value of yourcall, in this case this is a Link command + +You simple specify the module the command will be sent to, and the MyCall and +YourCall parameters. Here are some more examples: + +qnremote b w4wwm u # W4WWM is unlinking module B. +qnremote c w1bwb i # W1BSB is requesting the status of module C + +Modules, callsigns and YourCall can all be in lowercase, qnremote will convert +them to uppercase. QnetLink will validate that the specific MyCall is allowed +to link or unlink, according to the configuration. (By default, any user can +link or unlink a module, unless link_unlink is specified in the configuration +file, see qn.everything.cfg.) + +qnremote can be used by the linux cron facility to automatically execute jobs +at a certain time. If you want to link to XRF002 A on Saturday at 6:00 PM +Mountain Time for the D-Star Users Net, don't forget to include an unlink +command in your cron-executed script before you link! For instructions on how +to do this search the web with "linux cron job". + diff --git a/Makefile b/Makefile index 7148aaa..f4d6c29 100644 --- a/Makefile +++ b/Makefile @@ -146,8 +146,8 @@ installdvrptr : qngateway qnlink qndvrptr systemctl daemon-reload systemctl start qndvrptr.service -installdtmf : QnetDTMF - /bin/cp -f QnetDTMF $(BINDIR) +installdtmf : qndtmf + /bin/cp -f qndtmf $(BINDIR) /bin/cp -f system/qndtmf.service $(SYSDIR) systemctl enable qndtmf.service systemctl daemon-reload @@ -258,7 +258,7 @@ uninstalldvrptr : /bin/rm -f $(BINDIR)/qndvrptr systemctl daemon-reload -uninstalldtmfs: +uninstalldtmfs : systemctl stop qndtmf.service systemctl disable qndtmf.service /bin/rm -f $(SYSDIR)/qndtmf.service diff --git a/README.md b/README.md index 3226118..c479291 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,9 @@ git clone git://github.com/n7tae/QnetGateway.git Then look to the MMDVM.README or the BUILDING file for more information. -For details of interesting things QnetGatway can do, see the CONFIGURING file. For example, with QnetGateway, you can execute up to 36 different Linux scripts from you radio. Two scripts are include: +QnetGateway includes a "remote control" program, called `qnremote`. After you build and install the system, type `qnremote` for a prompt on how to use it. Using this and cron, it's possible to setup schedules where you system will automatically link up to a reflector, or subscribe to a Routing Group. For More information, see DTMF+REMOTE.README. + +For other details of interesting things QnetGatway can do, see the CONFIGURING file. For example, with QnetGateway, you can execute up to 36 different Linux scripts from you radio. Two scripts are include: ``` YourCall = " HX" will halt your system. diff --git a/qndtmf.sh b/qndtmf.sh index 9cd31c7..64932b9 100755 --- a/qndtmf.sh +++ b/qndtmf.sh @@ -1,28 +1,24 @@ #!/bin/bash +# Copyright (C) 2011 by Scott Lawson KI4LKF +# Copyright (C) 2018 by Thomas A. Early N7TAE +# # This script finds files in the /tmp directory # The files have a name like x_mod_DTMF_NOTIFY, where x is one of 0 1 2 -# 0=A module, -# 1=B module, +# 0=A module, +# 1=B module, # 2=C module # The contents of these files can be as follows: # Example: 73 will unlink local module -# Example: #02102 will link local module to XRF021 B -# Example: D00126 will link local module to DCS001 Z -# Example: *01601 will link local module to REF016 A +# Example: #75703 will link local module to XRF757 C +# Example: D00617 will link local module to DCS006 Q +# Example: *00101 will link local module to REF001 C # Example: 99 will report status of the link # We set this to spaces, it will be set later LUSER=" " -# The G2 INTERNAL IP/Port -G2_INT_IP=127.0.0.1 -G2_INT_PORT=19000 - -# This is the callsign of your Gateway, set it correctly -G2= - cd /tmp echo started at `date` @@ -51,11 +47,11 @@ do echo "... with these contents: " $CMD " " $LUSER if [ "$CMD" = "73" ] ; then echo Unlinking local band $LOCAL_BAND requested by $LUSER - /usr/local/bin/qnlinktest ${G2_INT_IP} ${G2_INT_PORT} "" $G2 ${LOCAL_BAND} 20 1 "$LUSER" " U" >/dev/null 2>&1 + qnremote ${LOCAL_BAND} "$LUSER" U >/dev/null 2>&1 echo elif [ "$CMD" = "99" ] ; then echo Link Status on local band $LOCAL_BAND requested by $LUSER - /usr/local/bin/qnlinktest ${G2_INT_IP} ${G2_INT_PORT} "" $G2 ${LOCAL_BAND} 20 1 "$LUSER" " I" >/dev/null 2>&1 + qnremote ${LOCAL_BAND} "$LUSER" I >/dev/null 2>&1 echo else LEN=${#CMD} @@ -135,7 +131,7 @@ do echo garbage value in prefix else echo linking local band $LOCAL_BAND to remote node ${RMT}${REMOTE_NODE} $REMOTE_BAND requested by $LUSER - /usr/local/bin/qnlinktest ${G2_INT_IP} ${G2_INT_PORT} "" $G2 ${LOCAL_BAND} 20 1 "$LUSER" ${RMT}${REMOTE_NODE}${REMOTE_BAND}L >/dev/null 2>&1 + qnremote ${LOCAL_BAND} "$LUSER" ${RMT}${REMOTE_NODE}${REMOTE_BAND}L >/dev/null 2>&1 echo fi fi diff --git a/system/qndtmf.service b/system/qndtmf.service index 9998d55..3d5dbbb 100644 --- a/system/qndtmf.service +++ b/system/qndtmf.service @@ -5,6 +5,7 @@ After=systemd-user-session.service [Service] Type=simple ExecStart=/usr/local/bin/qndtmf +Restart=always [Install] WantedBy=multi-user.target