[arm-allstar] HamVoIP I/O support - What is Best Current Practice for implementing I/O?
Phil Visalli
phil at philv.net
Tue Jan 16 21:40:06 EST 2018
Im sorry i actually misspoke, we used the RB-USB also (Not the DMK URI).
COP 61 = Send Message to USB to control GPIO pins
this line:
/bin/asterisk -rvx "rpt cmd XXXXX cop 61 GPIO5=1,GPIO6=0,GPIO7=0"
sets the state of those three pins.
I think Dougs example used the Pi's GPIO pins. So i think your toggling
the Pi GPIO pins when you want to be toggling the RB-USB's GPIO pins.
On Tue, Jan 16, 2018 at 5:26 PM, Lloyd Duck <lduck at me.com> wrote:
> This is the same thing I'm trying to do with the RB-USB without any luck.
> I've added the initial state to the /etc/asterisk/simpleusb.conf and by
> changing the initial state and restarting the program the channels do
> change
> on the radio. That works!
>
> I've add the steps Doug stated with bcd_control.sh and even was able to
> execute ./bcd_control.sh 02 without error and it did change when I executed
> gpio readall.
> But the radio does not change channels.
>
> What am I missing? The script that changes the simpleusb.conf for the
> radio?
> Bcd_control.sh doesn't control the RB-USB.
>
> Phil,
> Will you expand on the script you gave the example? What is the cop 61?
>
> Lloyd Duck
> W5LND
>
>
> -----Original Message-----
> From: arm-allstar [mailto:arm-allstar-bounces at hamvoip.org] On Behalf Of
> "Phil Visalli via arm-allstar"
> Sent: Friday, January 12, 2018 9:44 AM
> To: ARM Allstar <arm-allstar at hamvoip.org>
> Cc: Phil Visalli <phil at philv.net>
> Subject: Re: [arm-allstar] HamVoIP I/O support - What is Best Current
> Practice for implementing I/O?
>
> We did something similar using the GPIO pins on the DMK URI to steer thru 8
> channels.
>
> We first set the initial state of the GPIO pins in
> /etc/asterisk/simpleusb.conf
>
> gpio5=out0
> gpio6=out0
> gpio7=out0
>
> Then just as Doug mentioned used DTMF tones to call a set of scripts, one
> for each channel. For example *801 might call a script called 'ch1.sh'
> which would look something like this:
>
> ##########################################################
> #!/bin/bash
>
> /bin/asterisk -rvx "rpt cmd XXXXX cop 61 GPIO5=1,GPIO6=0,GPIO7=0"
>
> /bin/asterisk -rvx "rpt localplay XXXXX /root/sounds/ch1"
>
> exit 0
> ##########################################################
>
> Where XXXXX is your node number. I made sound files (using amazon
> polly....good quality text to speech engine) that play and announce what
> channel you just selected just so the user has confirmation of changing
> channels. Doug may have a more elegant or fancier version, but im pretty
> sure that would work for you.
>
> On Fri, Jan 12, 2018 at 3:10 AM, "Doug Crompton via arm-allstar" <
> arm-allstar at hamvoip.org> wrote:
>
> > Randy,
> >
> > I have written a script to do exactly what you want to do using the
> > Pi I/O. I will dig it up tomorrow and pass it on.
> >
> > Caveats - the pi is strictly 3V logic. If the lines are TTL 5V logic
> > then the best thing to do would be to use Schottky diodes on each line
> > similar to how COS is done on the FOB. The Pi would pull the
> > appropriate lines low but would not see the 5V from the radio. Really
> > a rather simple hardware interface.
> >
> > The channel is passed to the script via calls from rpt.conf functions
> > so DTMF would change the channel like -
> >
> > 1 - *801, 2 - *802, 3 - *803, etc.
> >
> >
> > *73 Doug*
> >
> > *WA3DSP*
> >
> > *http://www.crompton.com/hamradio <http://www.crompton.com/hamradio>*
> >
> >
> >
> > On Fri, Jan 12, 2018 at 2:53 AM, "Randy Neals via arm-allstar" <
> > arm-allstar at hamvoip.org> wrote:
> >
> > > Hi,
> > >
> > > What is the best current practice for implementing I/O on a
> > > Raspberry Pi
> > to
> > > control external things.
> > > In this case, remote channel selection on a VHF remote base, a radio
> > with 8
> > > channels and having external control lines.
> > >
> > > From looking through the list archives, I see references to using an
> > > Arduino Nano, and at an earlier time, using a USB I/O board from
> > SparkFun,
> > > and of course using the lines on the RPi itself.
> > >
> > > Anticipated questions...
> > >
> > > Q. What Am I trying To Do?
> > > A. Control channel select lines on a VHF remote base station.
> > >
> > > Q. What format/How many lines?
> > > A. 3 logic control lines. The lines are normally pulled up to +5V by
> > > the radio.
> > > BCD format with the lines having binary weighting of 4, 2, and
> > > 1 respectively.
> > > High = weighted value / Low = zero value.
> > >
> > > Q. What audio interface will I use?
> > > A. Simple USB, likely DMK URI. (But I could use a USB FOB, or other
> > > interface if there is one with I/O)
> > >
> > > Thanks,
> > > Randy
> > > W3RWN
> > > _______________________________________________
> > >
> > > 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