<div dir="ltr">Hi Andy,<div><br></div><div>Try this:</div><div><br></div><div>[functions]</div><div>881=<span style="font-size:11.2px">cop,62,GPIO4=1</span></div><div><span style="font-size:11.2px">882=</span><span style="font-size:11.2px">cop,62,GPIO4=0</span></div><div style="font-size:11.2px"><br></div><div><span style="font-size:11.2px">TEMPVAR1 = v|e|\"${RPT_RXKEYED}\"</span><br></div><div><div><span style="font-size:11.2px">*881 = f|t|TEMPVAR1</span></div><div><span style="font-size:11.2px">*882 = f|f|TEMPVAR1</span></div></div><div><span style="font-size:11.2px"><br></span></div><div><span style="font-size:11.2px">Paul / KN2R</span></div><div><span style="font-size:11.2px"><br></span></div><div><span style="font-size:11.2px"><br></span></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 1, 2017 at 2:01 AM, K1RA - Andy Z <span dir="ltr"><<a href="mailto:k1ra@k1ra.us" target="_blank">k1ra@k1ra.us</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div> I'm running a RadioUSB channel driver setup with an RA-35 USB peripheral with a CM119A that has several GPIO pins available. I'm attempting to write a test event to set a GPIO pin on that USB peripheral based on a system variable state, but I believe the app_rpt event parser is not correctly working and I'm wondering if this is a bug or there is a work around.</div><div><br></div><div>Here's my GPIO setup in usbradio.conf</div><div><br></div><div><div>[general]</div><div>gpio1 = in</div><div>gpio2 = out0</div><div>gpio4 = out1</div><div>gpio5 = in</div></div><div><br></div><div>Here's my event in rpt.conf</div><div><br></div><div><div>[events1999]</div><div>cop,62,GPIO4=1 = c|t|RPT_RXKEYED<br></div><div>cop,62,GPIO4=0 = c|f|RPT_RXKEYED</div></div><div><br></div><div>I receive the following error within the CLI when monitoring activity</div><div><br></div><div><div>ERROR[4499]: app_rpt.c:3483 rpt_event_process: Unrecognized event action (0) in exec item malformed: 0 = c|t|RPT_RXKEYED</div><div>ERROR[4499]: app_rpt.c:3483 rpt_event_process: Unrecognized event action (1) in exec item malformed: 1 = c|f|RPT_RXKEYED</div></div><div><br></div><div>It appears the first '=' in the GPIOn=x setting is causing the parser to break the <action-spec> too early per the docs here </div><div><br></div><div><a href="http://ohnosec.org/drupal/node/176" target="_blank">http://ohnosec.org/drupal/<wbr>node/176</a> </div><div><br></div><div>Apparently the parser is NOT really looking for ' = ' as the delimiting string, but catching '=' instead. I see cop 61 event is looking for "GPIO%d=%d" per line 12827 in app_rpt.c as far as I can tell, but its never getting to that code<br></div><div><br></div><div><a href="https://github.com/AllStarLink/Asterisk/blob/master/asterisk/apps/app_rpt.c" target="_blank">https://github.com/<wbr>AllStarLink/Asterisk/blob/<wbr>master/asterisk/apps/app_rpt.c</a><wbr> <br></div><div><br></div><div>Note I can use the CLI and cop,62 command to properly toggle the GPIO so I know that part of the parser seems to be working OK. I've also set a DTMF function command to toggle GPIO and that works too. I've also placed other <action-specs> that don't have an '=' in place of my above cop,62 and that works fine as well.</div><div><br></div><div>Any suggestions, fixes or workarounds?</div><div><br></div><div>Thanks & 73</div><div><br></div><div>andyz - K1RA</div><div><a href="http://k1ra.us/" target="_blank">http://k1ra.us/</a> </div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div>
<br>______________________________<wbr>_________________<br>
App_rpt-users mailing list<br>
<a href="mailto:App_rpt-users@lists.allstarlink.org">App_rpt-users@lists.<wbr>allstarlink.org</a><br>
<a href="http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_rpt-users" rel="noreferrer" target="_blank">http://lists.allstarlink.org/<wbr>cgi-bin/mailman/listinfo/app_<wbr>rpt-users</a><br>
<br>
To unsubscribe from this list please visit <a href="http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_rpt-users" rel="noreferrer" target="_blank">http://lists.allstarlink.org/<wbr>cgi-bin/mailman/listinfo/app_<wbr>rpt-users</a> and scroll down to the bottom of the page. Enter your email address and press the "Unsubscribe or edit options button"<br>
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. <br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><br><div>Paul / KN2R</div><div><br></div></div></div>
</div></div>