[App_rpt-users] Event Management + COP 62 + GPIO = error?
K1RA - Andy Z
k1ra at k1ra.us
Tue Aug 1 06:01:05 UTC 2017
Hi,
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.
Here's my GPIO setup in usbradio.conf
[general]
gpio1 = in
gpio2 = out0
gpio4 = out1
gpio5 = in
Here's my event in rpt.conf
[events1999]
cop,62,GPIO4=1 = c|t|RPT_RXKEYED
cop,62,GPIO4=0 = c|f|RPT_RXKEYED
I receive the following error within the CLI when monitoring activity
ERROR[4499]: app_rpt.c:3483 rpt_event_process: Unrecognized event action
(0) in exec item malformed: 0 = c|t|RPT_RXKEYED
ERROR[4499]: app_rpt.c:3483 rpt_event_process: Unrecognized event action
(1) in exec item malformed: 1 = c|f|RPT_RXKEYED
It appears the first '=' in the GPIOn=x setting is causing the parser to
break the <action-spec> too early per the docs here
http://ohnosec.org/drupal/node/176
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
https://github.com/AllStarLink/Asterisk/blob/master/asterisk/apps/app_rpt.c
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.
Any suggestions, fixes or workarounds?
Thanks & 73
andyz - K1RA
http://k1ra.us/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.keekles.org/pipermail/app_rpt-users/attachments/20170801/4f91cc72/attachment.html>
More information about the App_rpt-users
mailing list