[arm-allstar] K0HYT Remote base
Doug Crompton
wa3dsp at gmail.com
Sat Dec 29 23:33:30 EST 2018
Did you look at the autopatch for extended DTMF howto?
https://www.hamvoip.org/Allstar_extended_functions_using_autopatch.pdf
There are really two ways to do this. One would be to create functions for
everything you want to do that called a script or directly ran hamlib
commands.This would allow you to go up or down in frequency but not select
a specific frequency unless it was in memory because you would not have the
ability to send random digits.
A better way using the "Autopatch" as described in the howto you could do
something like:
*6200147030
The extensions file would then pass the 00147030 onto a script. The script
would then interpret the 00 as the command to set frequency. The script
would send out "rigctl F147030"
This is just an example. The first thing you need to do is determine the
command mapping to DTMF.
The best way to understand this is to play with it. Here is an example you
can run -
Add this next line to [functions] stanza in your /etc/asterisk/rpt.conf
file -
62=autopatchup,context=command_process,noct=1,farenddisconnect=1,dialtime=7000,quiet=1
; Dial Plan Processing
Add this to the end of /etc/asterisk/extensions.conf file before the last
line #includeifexists custom/extensions.conf
[command_process]
exten => _X.,1,Set(TIMEOUT(response)=30)
exten => _X.,n,System(/etc/asterisk/local/test_script ${EXTEN})
exten => _X.,n,Hangup()
Create this script in /etc/asterisk/local called test_script
Make it executable - chmod 755 test_script
#!/bin/bash
/usr/local/sbin/speaktext.sh $1 1998 # CHANGE THE 1998 to your node
Now when you key PTT and type *62 plus any digits (not # or *) within the
30 second time limit then unkey it will play back what you typed in.
So now you can see how you can pass DTMF to a script and then decode the
characters there to further call hamlib commands. That is If you know bash
scripting, if not you will need some help.
I suspect we should write a general script to do this and I have it on a
list of things to do. Maybe someone already has???
Here would be an very quick example that I have not fully tested -
We map the first two digits 00 to setting frequency and first two digits 01
to reading current frequency back. Any digits after this are data digits.
#!/bin/bash
if [ -z $2 ]
then
PlayNode=$NODE1
else
PlayNode=$2
fi
command=$(echo $1 | awk '{print substr($0,1,2)}') # Strip first two
command characters
data=$(echo $1 | awk '{print substr($0,3)}') # Strip remaining characters
case $command in00)
#Command to set frequency
rigctl F $data
;;01)
# Hamlib command to read frequency
freq=$(rigctl f)
/usr/local/sbin/speaktext.sh $freq $PlayNode
;;
# This would continue for all the commands you need to map
esac
So if you used this script and you did DTMF - *6200147030
it would set the frequency to 147030
If you did DTMF *6201
It would playback in voice the frequency the radio was set to.
Hopefully this gives you some concrete examples.
*73 Doug*
*WA3DSP*
*http://www.crompton.com/hamradio <http://www.crompton.com/hamradio>*
On Sat, Dec 29, 2018 at 7:06 PM "K0HYT via ARM-allstar" <
arm-allstar at hamvoip.org> wrote:
> Thank you Doug your help is always appreciated. I got migrated over and
> got hamlib working. Do you have a example of using the autopatch to send
> the commands. I do not quiet understand that part. EX like *5 520 would
> dial to 146520000 FM. (Sorry I'm a visual learner.)
>
> 73 and thanks again!
>
> On 2018-12-29 11:30, "Doug Crompton via ARM-allstar" wrote:
>
> > Remote base software internal to Allstar will be removed from hamvoip
> code
> > in the near future, This is buggy and at this point unsupported code. We
> > announced this last summer and again several times since then so anyone
> > using the internal remote base code to control a radio should be aware of
> > this.
> >
> > We suggest you use hamlib which is built-in to the hamvoip code. You can
> > use the "autopatch" interface for now to access it with scripts. See the
> > howto at hamvoip.org
> >
> > hamlib supports many rigs and ham devices via the USB port (and serial
> with
> > a USB to serial converter)
> >
> > At the Linux prompt type -
> >
> > rigctl -l
> >
> > for supported rigs and
> >
> > rigctl -h
> >
> > For the commands. These commands can be issued at the Linux prompt and of
> > course issues via a script and interfaced to Allstar via the "autopatch"
> > interface as described in the howto. In the near future we will have a
> > specific interface for this when the internal remote base code is
> removed.
> >
> > This is quite a bit of online help for hamlib but if you have more
> > questions please ask.
> >
> > *73 Doug*
> >
> > *WA3DSP*
> >
> > *http://www.crompton.com/hamradio <http://www.crompton.com/hamradio>*
> >
> > On Sat, Dec 29, 2018 at 12:33 PM "K0HYT via ARM-allstar" <
> > arm-allstar at hamvoip.org> wrote:
> >
> >> Hello everyone. Hopefully I got the correct group this time. After a
> >> couple years of playing with AllStar on RPI I have finally dove into my
> >> remote base setup. I am using a Pi3 with a IC706MKIIG, Prolific USB
> >> adapter (known working). When I add the radio=ic706 line and restart
> >> Asterisk I notice the heartbeat led locks solid and asterisk crashes
> >> when I connect to 1999. If I comment out that one line it works fine. I
> >> have set permissions to /dev/USB0. Any ideas? I have attached a PDF with
> >> my screenshots and node stanza.
> >>
> >> Thanks in advance for any help.
> >>
> >> Rpi 3 Arch
> >>
> >> IC706MkIIG
> >>
> >> Hamvoip V 1.4rc5-14
> >>
> >> Asterisk
> >>
> 1.3.23.pre.hamvoip-CV1.5.3-48-app_rpt-0.327-11_______________________________________________
> >>
> >> ARM-allstar mailing list
> >> ARM-allstar at hamvoip.org
> >> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
> >>
> >> Visit the BBB and RPi2/3 web page - http://hamvoip.org
> > _______________________________________________
> >
> > ARM-allstar mailing list
> > ARM-allstar at hamvoip.org
> > http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
> >
> > Visit the BBB and RPi2/3 web page - http://hamvoip.org
> _______________________________________________
>
> ARM-allstar mailing list
> ARM-allstar at hamvoip.org
> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>
> Visit the BBB and RPi2/3 web page - http://hamvoip.org
>
More information about the ARM-allstar
mailing list