[arm-allstar] Fan Control Using URI (or RIM) I/O

David McGough kb4fxc at inttek.net
Tue Aug 30 14:07:18 EST 2016


Hi Eric,

The "$1" parameter is the first argument passed to the shell script, for 
example:

PTTSTATE="/tmp/RPT_KEYED$1"

So, if call the script with your node number after the program name, like:

app_rpt_fan.sh 42285


Then, "$1" will equal "42285" in the script, which is equivalent to:

PTTSTATE="/tmp/RPT_KEYED42285"



73, David KB4FXC


On Tue, 30 Aug 2016, Eric Harrison via arm-allstar wrote:

> After following all the instructions I  find this script does not start on a keyup.
> In doing some hacking on the app_rpt_fan.sh I can make it work by replacing
> PTTSTATE="/tmp/RPT_TXKEYED$1"  with
> PTTSTATE="/tmpRPT_TXKEHED42285"   (42285 my node) and
> FANON="/usr/bin/asterisk -rx \"rpt fun $1 *880\""  with
> FANON="/usr/bin/asterisk -rx \"rpt fun 42285 *880\""   and
> 
> FANOFF="/usr/bin/asterisk -rx \"rpt fun $1 *881\""  with
> 
> FANOFF="/usr/bin/asterisk -rx \"rpt fun 42285 *881\""  
> 
> 
> The file that get's written and removed from the tmp directory is
>  [events 42285]
> touch /tmp/RPT_KEYED42285 = s|t|RPT_TXKEYED
> rm -f /tmp/RPT_KEYED42285 = s|f|RPT_TXKEYED
> work fine.  In a test script PTTSTATE="/tmp/RPT_TXKEYED$1" tells me
> file or directory does not exist even though I can see it on a keyup and  command
> ls /tmp. Why is it not liking $1? 
> 
> 
>  Eric (N7JYS) Marshall's Communications
> 
>       From: Roselito de los Reyes via arm-allstar <arm-allstar at hamvoip.org>
>  To: ARM Allstar <arm-allstar at hamvoip.org> 
> Cc: Roselito de los Reyes <tolitski at hotmail.com>
>  Sent: Friday, August 26, 2016 5:31 PM
>  Subject: Re: [arm-allstar] Fan Control Using URI (or RIM) I/O
>    
> #yiv8891561504 #yiv8891561504 --.yiv8891561504hmmessage P{margin:0px;padding:0px;}#yiv8891561504 body.yiv8891561504hmmessage{font-size:12pt;font-family:Calibri;}#yiv8891561504 Hi John,
> I did try to recreate the issue using the Hamvoip code and I was able to create the state file in the '/tmp' folder.  and from there you can reference that location in the script that K0KN has written.
> This is what I added in the rpt.conf file inside your node stanzaevents=events1968 ; change 1968 to your own node number or don't put one
> After the node stanzas in the rpt.conf file, add this :
> [events1968]touch /tmp/RPT_TXKEYED1968 = S|T|RPT_TXKEYEDrm -f /tmp/RPT_TXKEYED1968 = S|F|RPT_TXKEYED
> 
> Then on the txfan script change the followingPTTSTATE="/dev/shm/~pttstate" toPTTSTATE="/tmp/RPT_TXKEYED1968"
> This should work using the HamVOIP version.73,
> Lito KI9H
> Date: Fri, 26 Aug 2016 17:18:38 -0500
> To: arm-allstar at hamvoip.org
> Subject: Re: [arm-allstar] Fan Control Using URI (or RIM) I/O
> From: arm-allstar at hamvoip.org
> CC: wb5nfc at gmail.com
> 
> Thanks for the info, Roselito. One of the things I have not been able to resolve is a reference to a folder that does not exist. At first, I thought that it was just a difference in the distributions (I'm using RPi2-3 V1.02beta - with simpleusb - but attempting to follow the instructions on the latinovoip site). So I downloaded the latinovoip distro maintained by KP4TR, unzipped it, loaded it on a fresh micro SSD card, and booted it. I then went looking for the /etc/asterisk/local folder... but it does not exist in that version, either. The /etc/asterisk/local folder is mentioned a couple of times in the instructions on the latinovoip site...
> J. 
> 
> 
> On Fri, Aug 26, 2016 at 4:51 PM, Roselito de los Reyes via arm-allstar <arm-allstar at hamvoip.org> wrote:
> 
> John,
> Also, make sure the file that you're monitoring ie. PTTSTATE="/dev/shm/~pttstate" is in the right folder. the Latinovoip version is located in /tmp
> 73
> Lito KI9H
> 
> To: arm-allstar at hamvoip.org
> Date: Fri, 26 Aug 2016 14:44:05 -0700
> Subject: Re: [arm-allstar] Fan Control Using URI (or RIM) I/O
> From: arm-allstar at hamvoip.org
> CC: tolitski at hotmail.com
> 
> my mistake .. it looks like you DO have to make changes to your rpt.conf file to create the /dev/shm/~pttstate file.
> Lito
> 
> To: arm-allstar at hamvoip.org
> Date: Fri, 26 Aug 2016 14:42:40 -0700
> Subject: Re: [arm-allstar] Fan Control Using URI (or RIM) I/O
> From: arm-allstar at hamvoip.org
> CC: tolitski at hotmail.com
> 
> John,
> the k0kn version refers to an old code from the Acid release. it looks like a file is generated whenever the PTT is pressed and that is what K0KN's code is looking for. I don't think this is valid with the HamVOIP code. I could be wrong.
> 73,
> Lito KI9H
> 
> Date: Fri, 26 Aug 2016 16:01:08 -0500
> To: arm-allstar at hamvoip.org
> Subject: [arm-allstar] Fan Control Using URI (or RIM) I/O
> From: arm-allstar at hamvoip.org
> CC: wb5nfc at gmail.com
> 
> Can anyone point me in the direction of documentation on how to set up a node radio cooling fan using an I/O port on a URI or RIM? I don't want to use a temperature sensor.
> I've found the K0KN script (http://www.qsl.net/k0kn/txfan ), but I'm not having any luck making it work. I've looked through the How To's on the ARM Allstar site, but I'm only finding info for using USB with a FTDI chip. Thought I could figure it out with info from http://latinovoip.net/ allstar-and-the-gpio-fan- script-for-dmk-engineering- uri/  but I'm not having any luck with that information either. Suggestions appreciated....
> John 
> ______________________________ _________________arm-allstar mailing listarm-allstar at hamvoip.orghttp://lists.hamvoip.org/cgi- bin/mailman/listinfo/arm- allstarVisit the BBB and RPi2 web page - http://hamvoip.org 
> ______________________________ _________________arm-allstar mailing listarm-allstar at hamvoip.orghttp://lists.hamvoip.org/cgi- bin/mailman/listinfo/arm- allstarVisit the BBB and RPi2 web page - http://hamvoip.org 
> ______________________________ _________________arm-allstar mailing listarm-allstar at hamvoip.orghttp://lists.hamvoip.org/cgi- bin/mailman/listinfo/arm- allstarVisit the BBB and RPi2 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 web page - http://hamvoip.org
> 
> 
> 
> _______________________________________________arm-allstar mailing listarm-allstar at hamvoip.orghttp://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstarVisit the BBB and RPi2 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 web page - http://hamvoip.org
> 
>    



More information about the arm-allstar mailing list