[arm-allstar] GPIO BCD Remote Channel Controll
Bobby Bruton
bobbybruton at yahoo.com
Wed Aug 2 06:22:03 EST 2017
Doug I have the Script working and tested.
I'm ready now to add it into the Supermon Controls
Maybe edit the GPIO drop down box?
Need your assistance please
Thanks
Bobby Bruton
AG5BB
Sent from Yahoo Mail for iPhone
On Tuesday, August 1, 2017, 11:00 AM, arm-allstar-request at hamvoip.org wrote:
Send arm-allstar mailing list submissions to
arm-allstar at hamvoip.org
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
or, via email, send a message with subject or body 'help' to
arm-allstar-request at hamvoip.org
You can reach the person managing the list at
arm-allstar-owner at hamvoip.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of arm-allstar digest..."
Today's Topics:
1. Re: Help Radio to GPIO Channel Select (Doug Crompton)
2. Persistent connection (Tom Hayward)
3. Re: Persistent connection (David McGough)
4. Re: Persistent connection (Doug Crompton)
5. Re: Persistent connection (Tom Hayward)
6. Re: Persistent connection (David McGough)
----------------------------------------------------------------------
Message: 1
Date: Mon, 31 Jul 2017 13:28:43 -0400
From: Doug Crompton <wa3dsp at gmail.com>
To: ARM Allstar <arm-allstar at hamvoip.org>
Subject: Re: [arm-allstar] Help Radio to GPIO Channel Select
Message-ID:
<CAMp6vsvMdpA_-+aDpJaNpkgMOY0E2fgp4F4Zae7Yh9WWKZZ8mA at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
?I am resending this as apparently the attachment did not make it through.?
Attached is a bash script I wrote some time ago to write the GPIO with BCD
data given decimal data input. The bits selected are 21, 22, 23, 24. Give
it a try. The format is:
bcd_control.sh <channel 1-16> .... Just the channel number No brackets.
Also remember to execute a script it must be executable - if it is not do -
chmod 750 bcd_control.sh and if executing it in the current directory do
- ./bcd_control.sh
After you execute it will tell you what it did. Then at the Linux prompt
type:
gpio readall
You will get a chart of the I/O bits. Bits 21, 22, 23, 24 will show the BCD
representation of the decimal channel you entered.
This also includes a strobe bit because the system I was writing it for
required that. You can ignore it if you don't need it. It is bit 25 for
100ms.
You can see how this could be implemented as DTMF functions or better yet
using the autopatch through extensions.conf. See the howto on that on the
hamvoip.org web page. Also the howto on GPIO.
Using the autopatch method a DTMF like *6201 through *6216 could change
the 16 channels.
Any yes this could be done in supermon but first you need to understand
this part of it and get it working. You need to interface those 4 bits to
the radio and manually execute this command.
Here is a link from this forum January 2016 about this -
http://lists.hamvoip.org/pipermail/arm-allstar/2016-January/002637.html
*73 Doug*
*WA3DSP*
*http://www.crompton.com/hamradio <http://www.crompton.com/hamradio>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hamvoip.org/pipermail/arm-allstar/attachments/20170731/66821ded/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bcd_control.sh
Type: application/x-sh
Size: 2375 bytes
Desc: not available
URL: <http://lists.hamvoip.org/pipermail/arm-allstar/attachments/20170731/66821ded/attachment-0001.sh>
------------------------------
Message: 2
Date: Mon, 31 Jul 2017 23:17:24 -0700
From: Tom Hayward <tom at tomh.us>
To: ARM Allstar <arm-allstar at hamvoip.org>
Subject: [arm-allstar] Persistent connection
Message-ID:
<CAFXO5Z14WiaJN+ZVyPE6oYC=b+OMkVJUDi=YGec2nZKmrt0CWg at mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"
I have a node that is configured to create a persistent connection to a hub
on startup. However, when it boots it doesn't connect. If I log into ssh
and restart asterisk, the startup macro works fine and it connects to the
hub. Something is different at boot time. This is a problem because the
link does not automatically reestablish after a power loss. How can I
correct this?
Tom KD7LXL
------------------------------
Message: 3
Date: Tue, 1 Aug 2017 10:31:55 -0400 (EDT)
From: David McGough <kb4fxc at inttek.net>
To: "\"Tom Hayward via arm-allstar\"" <arm-allstar at hamvoip.org>
Subject: Re: [arm-allstar] Persistent connection
Message-ID:
<Pine.LNX.4.44.1708010952390.2817-100000 at goliath.inttek.net>
Content-Type: TEXT/PLAIN; charset=US-ASCII
Hi Tom,
Do you have your destination node connection info in the
/etc/asterisk/rpt.conf file, [nodes] stanza? If not, that is probably the
problem.
Note that for all connections operations, normal or permanent, to proceed,
there must be directory entry for the destination node at initial
connection time...And, in the case of a freshly booted system, the macros
including the permanent connection command will run before rpt_extnodes
file is downloaded, causing the command to fail.
If you don't know what the destination node IP address or port info is at
boot time, meaning that adding an entry in the rpt.conf [nodes] stanza is
impractical, you can also drop a temporary file in /tmp/rpt_extnodes,
which contains "spoofed" entries as place-holders. This will allow the
connection command to correctly execute and then the connection would
proceed once a real rpt_extnodes file is downloaded.
73, David KB4FXC
On Mon, 31 Jul 2017, "Tom Hayward via arm-allstar" wrote:
> I have a node that is configured to create a persistent connection to a hub
> on startup. However, when it boots it doesn't connect. If I log into ssh
> and restart asterisk, the startup macro works fine and it connects to the
> hub. Something is different at boot time. This is a problem because the
> link does not automatically reestablish after a power loss. How can I
> correct this?
>
> Tom KD7LXL
> _______________________________________________
>
> 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
>
------------------------------
Message: 4
Date: Tue, 1 Aug 2017 10:46:15 -0400
From: Doug Crompton <wa3dsp at gmail.com>
To: ARM Allstar <arm-allstar at hamvoip.org>
Subject: Re: [arm-allstar] Persistent connection
Message-ID:
<CAMp6vsv6zRnxpzO+5K-2CuYq9d1aOsA3G98Vy49UPCQqZpUiXA at mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"
Tom,
When you say persistent you mean permanent, *73<node> ?? I do that here
for many nodes but I use a script. The code in rpt.conf looks like this -
startup_macro = *A900 ; Macro to run at startup (optional)
This is placed in my primary nodes stanza
Then this in functions -
A900=cmd,/etc/asterisk/local/reconnect_local
reconnect_local is a script that has the nodes to connect to at boot. This
has always worked fine for me. I like to keep things in scripts rather than
internal to Allstar. If it is a timing problem at boot you could always put
a sleep statement in the script to delay until things are more stable.
However I have never had to do that. I do put 1 second delays between
connects just to be safe but I doubt it is necessary. Here is a portion on
my script. Nodes changed but you get the point.
l
#! /bin/bash
# Echolink
/usr/bin/asterisk -rx "rpt fun 40000 *7340001"
sleep 1
,,,,, next command etc....
*73 Doug*
*WA3DSP*
*http://www.crompton.com/hamradio <http://www.crompton.com/hamradio>*
On Tue, Aug 1, 2017 at 2:17 AM, "Tom Hayward via arm-allstar" <
arm-allstar at hamvoip.org> wrote:
> I have a node that is configured to create a persistent connection to a hub
> on startup. However, when it boots it doesn't connect. If I log into ssh
> and restart asterisk, the startup macro works fine and it connects to the
> hub. Something is different at boot time. This is a problem because the
> link does not automatically reestablish after a power loss. How can I
> correct this?
>
> Tom KD7LXL
> _______________________________________________
>
> 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
>
>
------------------------------
Message: 5
Date: Tue, 1 Aug 2017 09:02:58 -0700
From: Tom Hayward <tom at tomh.us>
To: David McGough <kb4fxc at inttek.net>
Cc: Tom Hayward via arm-allstar <arm-allstar at hamvoip.org>
Subject: Re: [arm-allstar] Persistent connection
Message-ID:
<CAFXO5Z2JzY-zPhByDzscYNB8ogXCCMpsNPh+E4n5SHHR-YRHew at mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"
On Tue, Aug 1, 2017 at 7:31 AM, David McGough <kb4fxc at inttek.net> wrote:
>
> Hi Tom,
>
> Do you have your destination node connection info in the
> /etc/asterisk/rpt.conf file, [nodes] stanza? If not, that is probably the
> problem.
Okay, here goes...
# grep 41702 /tmp/rpt_extnodes
41702=radio at 44.24.241.110:4569/41702,44.24.241.110
Then I pasted that line in /etc/asterisk/rpt.conf under the [nodes] heading.
Going down for a reboot...
It connected at boot! Thank you!
Now one more question: Do I need to do the same thing on the hub side
so that it is allowed to connect after a long period of being down (so
it would have dropped out of Allstar registration)? The addresses
involved are all static.
Tom KD7LXL
------------------------------
Message: 6
Date: Tue, 1 Aug 2017 12:21:40 -0400 (EDT)
From: David McGough <kb4fxc at inttek.net>
To: Tom Hayward <tom at tomh.us>
Cc: Tom Hayward via arm-allstar <arm-allstar at hamvoip.org>
Subject: Re: [arm-allstar] Persistent connection
Message-ID:
<Pine.LNX.4.44.1708011215590.2817-100000 at goliath.inttek.net>
Content-Type: TEXT/PLAIN; charset=US-ASCII
In general, you only need the [nodes] entries on the node endpoints where
you're initiating a connection. If a out-bound connection might get
initiated from the hub, it would be worthwhile to add a [nodes] entry
there, too.
There really isn't a down-side to adding [nodes] entries, as long as the
IP addresses and ports are static...Except, perhaps, that there is more
config maintenance required if addresses do change in the future!
73, David KB4FXC
On Tue, 1 Aug 2017, Tom Hayward wrote:
> On Tue, Aug 1, 2017 at 7:31 AM, David McGough <kb4fxc at inttek.net> wrote:
> >
> > Hi Tom,
> >
> > Do you have your destination node connection info in the
> > /etc/asterisk/rpt.conf file, [nodes] stanza? If not, that is probably the
> > problem.
>
> Okay, here goes...
>
> # grep 41702 /tmp/rpt_extnodes
> 41702=radio at 44.24.241.110:4569/41702,44.24.241.110
>
> Then I pasted that line in /etc/asterisk/rpt.conf under the [nodes] heading.
>
> Going down for a reboot...
>
> It connected at boot! Thank you!
>
> Now one more question: Do I need to do the same thing on the hub side
> so that it is allowed to connect after a long period of being down (so
> it would have dropped out of Allstar registration)? The addresses
> involved are all static.
>
> Tom KD7LXL
>
------------------------------
Subject: Digest Footer
_______________________________________________
arm-allstar mailing list
arm-allstar at hamvoip.org
http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
------------------------------
End of arm-allstar Digest, Vol 39, Issue 1
******************************************
More information about the arm-allstar
mailing list