SimpleUSB gpio?

I’m trying to manipulate a GPIO pin off of a URIx and I am not able to get it to work for whatever reason. If I send a cop,62 command to toggle it, it does not change the state.

I found this message from Jim that was posted in June 2011:

http://ohnosec.org/pipermail/app_rpt-users/2011-June/002725.html

Does anyone know if this was ever implemented? This was quite some time ago.

I might be able to use usbradio instead for my application, but prefer SimpleUSB as it’s easier to implement.

73

Stephen

K1LNX

An update on this, and I’ve learned something that was not so obvious to me, so I’ll put this out there in case someone runs into this in the future.

Consider my dilemma… I am using an RTCM to drive a pair of radios in full duplex mode. I needed to drive a relay (or MOSFET board in my case, more on that in a bit) to turn a fan on the transmit radio on and off as needed. Considering there are no GPIO’s on the RTCM, I had a URIx also connected that I planned on using for another application that I thought I could tap the GPIO off of. I found Kyle, K0KN’s excellent fan script, as well as this resource:

http://latinovoip.net/allstar-and-the-gpio-fan-script-for-dmk-engineering-uri/

I elected to use the version linked above, and got everything configured, but discovered my cop,62 commands were not working to toggle the GPIO line on the URI. I tried a variety of differing configs and troubleshooting methods, none of which worked, when I finally tried to issue the cop command from the node that is on the URI instead as a test, and what do you know, it worked.

It also appears that GPIO support was added into chan_simpleusb as of revision 1060:
http://svn.ohnosec.org/viewvc/projects/allstar/astsrc-1.4.23-pre/trunk/asterisk/channels/chan_simpleusb.c?revision=1060&root=svn&view=markup

On the hardware side, I had issues with the relay board I was using. I was seeing approximately 3.25 v when the GPIO was toggled to an on state on the URI. That was not enough to “trigger” the relay board to fire the relay, it needs right at a solid 5 volts. Rather than add another piece of hardware to ramp the voltage up, I ran across this on Ebay:

http://www.ebay.com/itm/301357646243?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

This is a 3 channel MOSFET board that will switch the output on above 2.5v, off at ground. Perfect for my application. I have yet to test it, but have high confidence it will work just fine for my intended purpose.

On the software side, I had to make a few small changes in the scripts that I got from the link above, most notably:

run_app_rpt_fan.sh
/etc/asterisk/local/app_rpt_fan.sh 1999 > /dev/null & ; change 1999 to the node number that is attached to the URI, a private node in my case

app_rpt_fan.sh
PTTSTATE=“/tmp/RPT_TXKEYED1999” ; change from the $1 variable to the node number that is attached to the RTCM instead

There are more likely easier solutions than what I’ve provided above, but this does work as intended now. After 10 seconds, GPIO1 goes high, goes back to ground after 10 minutes. An even easier solution would be to probably just use a snapdisc and have it fire on a certain temperature, but I wanted more granular control so that wasn’t really an option. I could have also elected to use a Raspberry Pi and tap one of the GPIO’s there instead, but my AllStar server is built on an x86 box running other applications so that wasn’t really an option either.

I’d like to explore the possibility of maybe having chan_voter talk to the GPIO’s in chan_usb or simpleusb. We could say add a config to the voter.conf file for the particulars for example. Not sure what this would take, but curious if it could be done?

Hope this helps someone in the future…

73

Stephen

K1LNX

···

On Thu, Aug 4, 2016 at 3:32 AM, Stephen - K1LNX k1lnx@k1lnx.net wrote:

I’m trying to manipulate a GPIO pin off of a URIx and I am not able to get it to work for whatever reason. If I send a cop,62 command to toggle it, it does not change the state.

I found this message from Jim that was posted in June 2011:

http://ohnosec.org/pipermail/app_rpt-users/2011-June/002725.html

Does anyone know if this was ever implemented? This was quite some time ago.

I might be able to use usbradio instead for my application, but prefer SimpleUSB as it’s easier to implement.

73

Stephen

K1LNX

Sorry,
I do have to ask the obvious,
Are you sure you are testing the output correctly ?
I believe these FLOAT and switch to ground when active.
Just like a parallel port.Don't use them so I don't know for sure.
So you need to check continuity between ground and the pin in question for activity.

...mike/kb8jnm

···

I'm trying to manipulate a GPIO pin off of a URIx and I am not able to get
it to work for whatever reason. If I send a cop,62 command to toggle it, it
does not change the state.

I found this message from Jim that was posted in June 2011:

ohnosec.org - ohnosec Resources and Information.

Does anyone know if this was ever implemented? This was quite some time
ago.

I might be able to use usbradio instead for my application, but prefer
SimpleUSB as it's easier to implement.

73
Stephen
K1LNX
_______________________________________________
App_rpt-users mailing list
App_rpt-users@ohnosec.org
http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users

To unsubscribe from this list please visit
http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users and scroll down to the
bottom of the page. Enter your email address and press the "Unsubscribe or edit
options button"
You do not need a password to unsubscribe, you can do it via email confirmation. If
you have trouble unsubscribing, please send a message to the list detailing the
problem.

Hi Mike… yes, I was testing between ground and the GPIO pin question (GPIO1 in my case) for voltage.

See my later message I posted for details on what I found.

73

Stephen

K1LNX

···

On Thu, Aug 4, 2016 at 9:05 AM, mike@midnighteng.com wrote:

Sorry,

I do have to ask the obvious,

Are you sure you are testing the output correctly ?

I believe these FLOAT and switch to ground when active.

Just like a parallel port.Don’t use them so I don’t know for sure.

So you need to check continuity between ground and the pin in question for activity.

…mike/kb8jnm

I’m trying to manipulate a GPIO pin off of a URIx and I am not able to get

it to work for whatever reason. If I send a cop,62 command to toggle it, it

does not change the state.

I found this message from Jim that was posted in June 2011:

http://ohnosec.org/pipermail/app_rpt-users/2011-June/002725.html

Does anyone know if this was ever implemented? This was quite some time

ago.

I might be able to use usbradio instead for my application, but prefer

SimpleUSB as it’s easier to implement.

73

Stephen

K1LNX


App_rpt-users mailing list

App_rpt-users@ohnosec.org

http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users

To unsubscribe from this list please visit

http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users and scroll down to the

bottom of the page. Enter your email address and press the "Unsubscribe or edit

options button"

You do not need a password to unsubscribe, you can do it via email confirmation. If

you have trouble unsubscribing, please send a message to the list detailing the

problem.


App_rpt-users mailing list

App_rpt-users@ohnosec.org

http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users

To unsubscribe from this list please visit http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users and scroll down to the bottom of the page. Enter your email address and press the “Unsubscribe or edit options button”

You do not need a password to unsubscribe, you can do it via email confirmation. If you have trouble unsubscribing, please send a message to the list detailing the problem.

Hi Stephen,

While the CM108/CM119 audio chips found in URI's are powered from the +5V
USB source, they contain an internal +3.3V regulator and are internally
completely 3.3V logic....So, you'll never see more than +3.3V as a
logic "high" level coming from the GPIO pins.

73, David KB4FXC

···

On Thu, 4 Aug 2016, Stephen - K1LNX wrote:

An update on this, and I've learned something that was not so obvious to
me, so I'll put this out there in case someone runs into this in the future.

Consider my dilemma.. I am using an RTCM to drive a pair of radios in full
duplex mode. I needed to drive a relay (or MOSFET board in my case, more on
that in a bit) to turn a fan on the transmit radio on and off as needed.
Considering there are no GPIO's on the RTCM, I had a URIx also connected
that I planned on using for another application that I thought I could tap
the GPIO off of. I found Kyle, K0KN's excellent fan script, as well as this
resource:

http://latinovoip.net/allstar-and-the-gpio-fan-script-for-dmk-engineering-uri/

I elected to use the version linked above, and got everything configured,
but discovered my cop,62 commands were not working to toggle the GPIO line
on the URI. I tried a variety of differing configs and troubleshooting
methods, none of which worked, when I finally tried to issue the cop
command from the node that is on the URI instead as a test, and what do you
know, it worked.

It also appears that GPIO support was added into chan_simpleusb as of
revision 1060:
http://svn.ohnosec.org/viewvc/projects/allstar/astsrc-1.4.23-pre/trunk/asterisk/channels/chan_simpleusb.c?revision=1060&root=svn&view=markup

On the hardware side, I had issues with the relay board I was using. I was
seeing approximately 3.25 v when the GPIO was toggled to an on state on the
URI. That was not enough to "trigger" the relay board to fire the relay, it
needs right at a solid 5 volts. Rather than add another piece of hardware
to ramp the voltage up, I ran across this on Ebay:

http://www.ebay.com/itm/301357646243?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

This is a 3 channel MOSFET board that will switch the output on above 2.5v,
off at ground. Perfect for my application. I have yet to test it, but have
high confidence it will work just fine for my intended purpose.

On the software side, I had to make a few small changes in the scripts that
I got from the link above, most notably:

run_app_rpt_fan.sh
/etc/asterisk/local/app_rpt_fan.sh 1999 > /dev/null & ; change 1999 to the
node number that is attached to the URI, a private node in my case

app_rpt_fan.sh
PTTSTATE="/tmp/RPT_TXKEYED1999" ; change from the $1 variable to the node
number that is attached to the RTCM instead

There are more likely easier solutions than what I've provided above, but
this does work as intended now. After 10 seconds, GPIO1 goes high, goes
back to ground after 10 minutes. An even easier solution would be to
probably just use a snapdisc and have it fire on a certain temperature, but
I wanted more granular control so that wasn't really an option. I could
have also elected to use a Raspberry Pi and tap one of the GPIO's there
instead, but my AllStar server is built on an x86 box running other
applications so that wasn't really an option either.

I'd like to explore the possibility of maybe having chan_voter talk to the
GPIO's in chan_usb or simpleusb. We could say add a config to the
voter.conf file for the particulars for example. Not sure what this would
take, but curious if it could be done?

Hope this helps someone in the future...

73
Stephen
K1LNX

On Thu, Aug 4, 2016 at 3:32 AM, Stephen - K1LNX <k1lnx@k1lnx.net> wrote:

> I'm trying to manipulate a GPIO pin off of a URIx and I am not able to get
> it to work for whatever reason. If I send a cop,62 command to toggle it, it
> does not change the state.
>
> I found this message from Jim that was posted in June 2011:
>
> ohnosec.org - ohnosec Resources and Information.
>
> Does anyone know if this was ever implemented? This was quite some time
> ago.
>
> I might be able to use usbradio instead for my application, but prefer
> SimpleUSB as it's easier to implement.
>
> 73
> Stephen
> K1LNX
>

Ahh ok… thanks David, and that makes sense so I appreciate the clarification :slight_smile:

···

On Thu, Aug 4, 2016 at 9:19 AM, David McGough kb4fxc@inttek.net wrote:

Hi Stephen,

While the CM108/CM119 audio chips found in URI’s are powered from the +5V

USB source, they contain an internal +3.3V regulator and are internally

completely 3.3V logic…So, you’ll never see more than +3.3V as a

logic “high” level coming from the GPIO pins.

73, David KB4FXC

On Thu, 4 Aug 2016, Stephen - K1LNX wrote:

An update on this, and I’ve learned something that was not so obvious to

me, so I’ll put this out there in case someone runs into this in the future.

Consider my dilemma… I am using an RTCM to drive a pair of radios in full

duplex mode. I needed to drive a relay (or MOSFET board in my case, more on

that in a bit) to turn a fan on the transmit radio on and off as needed.

Considering there are no GPIO’s on the RTCM, I had a URIx also connected

that I planned on using for another application that I thought I could tap

the GPIO off of. I found Kyle, K0KN’s excellent fan script, as well as this

resource:

http://latinovoip.net/allstar-and-the-gpio-fan-script-for-dmk-engineering-uri/

I elected to use the version linked above, and got everything configured,

but discovered my cop,62 commands were not working to toggle the GPIO line

on the URI. I tried a variety of differing configs and troubleshooting

methods, none of which worked, when I finally tried to issue the cop

command from the node that is on the URI instead as a test, and what do you

know, it worked.

It also appears that GPIO support was added into chan_simpleusb as of

revision 1060:

http://svn.ohnosec.org/viewvc/projects/allstar/astsrc-1.4.23-pre/trunk/asterisk/channels/chan_simpleusb.c?revision=1060&root=svn&view=markup

On the hardware side, I had issues with the relay board I was using. I was

seeing approximately 3.25 v when the GPIO was toggled to an on state on the

URI. That was not enough to “trigger” the relay board to fire the relay, it

needs right at a solid 5 volts. Rather than add another piece of hardware

to ramp the voltage up, I ran across this on Ebay:

http://www.ebay.com/itm/301357646243?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

This is a 3 channel MOSFET board that will switch the output on above 2.5v,

off at ground. Perfect for my application. I have yet to test it, but have

high confidence it will work just fine for my intended purpose.

On the software side, I had to make a few small changes in the scripts that

I got from the link above, most notably:

run_app_rpt_fan.sh

/etc/asterisk/local/app_rpt_fan.sh 1999 > /dev/null & ; change 1999 to the

node number that is attached to the URI, a private node in my case

app_rpt_fan.sh

PTTSTATE=“/tmp/RPT_TXKEYED1999” ; change from the $1 variable to the node

number that is attached to the RTCM instead

There are more likely easier solutions than what I’ve provided above, but

this does work as intended now. After 10 seconds, GPIO1 goes high, goes

back to ground after 10 minutes. An even easier solution would be to

probably just use a snapdisc and have it fire on a certain temperature, but

I wanted more granular control so that wasn’t really an option. I could

have also elected to use a Raspberry Pi and tap one of the GPIO’s there

instead, but my AllStar server is built on an x86 box running other

applications so that wasn’t really an option either.

I’d like to explore the possibility of maybe having chan_voter talk to the

GPIO’s in chan_usb or simpleusb. We could say add a config to the

voter.conf file for the particulars for example. Not sure what this would

take, but curious if it could be done?

Hope this helps someone in the future…

73

Stephen

K1LNX

On Thu, Aug 4, 2016 at 3:32 AM, Stephen - K1LNX k1lnx@k1lnx.net wrote:

I’m trying to manipulate a GPIO pin off of a URIx and I am not able to get

it to work for whatever reason. If I send a cop,62 command to toggle it, it

does not change the state.

I found this message from Jim that was posted in June 2011:

http://ohnosec.org/pipermail/app_rpt-users/2011-June/002725.html

Does anyone know if this was ever implemented? This was quite some time

ago.

I might be able to use usbradio instead for my application, but prefer

SimpleUSB as it’s easier to implement.

73

Stephen

K1LNX


App_rpt-users mailing list

App_rpt-users@ohnosec.org

http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users

To unsubscribe from this list please visit http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users and scroll down to the bottom of the page. Enter your email address and press the “Unsubscribe or edit options button”

You do not need a password to unsubscribe, you can do it via email confirmation. If you have trouble unsubscribing, please send a message to the list detailing the problem.

Hello All,

  In my usual fashion, I exited the firsttime script for setting up a DIAL system.

I have found the scripts in

/usr/local/sbin

  I see that their are several files listed :

firstime (( Seems to be 0 KB File )
firsttime
netsetup
nodesetup

I have tried to execute the script file firsttime by

. firsttime

but seems to do nothing. Could it have something to do
with the line in that script:

if [ -e /etc/asterisk/firsttime ]

Any help would be appreciated.

73 de Angelo

do the following:
touch /etc/asterisk/firsttime
/usr/local/sbin/firsttime

73, Steve N4IRS

···

On 8/5/2016 11:43 AM, Angelo wrote:

Hello All,

In my usual fashion, I exited the firsttime script for setting up a DIAL system.

I have found the scripts in

/usr/local/sbin

I see that their are several files listed :

firstime (( Seems to be 0 KB File )
firsttime
netsetup
nodesetup

I have tried to execute the script file firsttime by

. firsttime

but seems to do nothing. Could it have something to do
with the line in that script:

if [ -e /etc/asterisk/firsttime ]

Any help would be appreciated.

73 de Angelo

_______________________________________________
App_rpt-users mailing list
App_rpt-users@ohnosec.org
http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users

To unsubscribe from this list please visit http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users and scroll down to the bottom of the page. Enter your email address and press the "Unsubscribe or edit options button"
You do not need a password to unsubscribe, you can do it via email confirmation. If you have trouble unsubscribing, please send a message to the list detailing the problem.

--
"Anything is possible if you don't know what you are talking about."
1st Law of Logic

This is now covered in the FAQ. Please refresh:
http://docs.allstarlink.org/drupal/node/170

Thanks,
Kevin - W3KKC
Volunteer documentation support staff.

···

On 8/5/2016 11:51 AM, Steve Zingman wrote:

do the following:
touch /etc/asterisk/firsttime
/usr/local/sbin/firsttime

73, Steve N4IRS

On 8/5/2016 11:43 AM, Angelo wrote:

Hello All,

In my usual fashion, I exited the firsttime script for setting up a DIAL system.

I have found the scripts in

/usr/local/sbin

I see that their are several files listed :

firstime (( Seems to be 0 KB File )
firsttime
netsetup
nodesetup

I have tried to execute the script file firsttime by

. firsttime

but seems to do nothing. Could it have something to do
with the line in that script:

if [ -e /etc/asterisk/firsttime ]

Any help would be appreciated.

73 de Angelo