GPIO delayed response

I have successfully set up events in rpt.conf to turn on and off GPIO4 during COS activity, in an attempt to control the CTCSS encoder of a transmittter. If I watch the Asterisk CLI, I see the RPT_RXKEYED events, and they track the repeater receiver's COS activity within a few milliseconds. Hower, the LED I have connected to GPIO4 to indicate this activity has a 1000-1500ms delay from when I see the events logged in the CLI. Is there a timer setting somewhere that I can adjust to make the GPIO4 output more accurately track the RPT_RXKEYED status? Having the CTCSS encoder delayed from actual rx activity won't work too well for this sort of application.

Eric
K2CB

Seems ASL version are slow to react for the COS indicator. This is why I stayed with HAMVOIP only a few milliseconds using it

Can you share some info from your system.

  1. Raspberry Pi, PC, ...?
  2. What version of ASL (e.g. asterisk -V)?
  3. What type of URI are you using?
  4. What channel driver are you using (e.g. SimpleUSB, USBRadio, ...)?
  5. What events did you add to your rpt.conf file to turn GPIO4 on/off? Are you using :
cop,62,GPIO4:1 = c|t|RPT_RXKEYED
cop,62,GPIO4:0 = c|f|RPT_RXKEYED

or are you doing something else?

Hi Allen,

Please excuse me if I am not using the correct terminology, as I am fairly new to playing with ASL.

I originally added the events as described in the documentation for the Masters Communications RL20M that I am using:

FOR ASL:
In the functions stanza [functions]
add these two lines at the end of setion "Mandatory Command Codes"

600 = cop,62,GPIO4=1 ; Send Message to GPIO pin 4 - Turn on COS LED
601 = cop,62,GPIO4=0 ; Send Message to GPIO pin 4 - Turn off COS LED

[event]
Add the following after the above line. If the lines are already there but commented,
remove the ';' semicolon from the beginning of the line.

EXAMPLE:
[events]
44067,*600 = f|t|RPT_RXKEYED
44067,*601 = f|f|RPT_RXKEYED

Using this method was resulting in the delayed response. I did some reading and saw other documents suggesting to have the event entries execute the GPIO command directly, rather than execute the command codes which then indirectly control the GPIO's state. So I changed the [events] entries to:

EXAMPLE:
[events44067]
cop,62,GPIO4:1 = c|t|RPT_RXKEYED
cop,62,GPIO4:0 = c|f|RPT_RXKEYED

Now, by calling the GPIO state directly, there is almost no discernable delay in the GPIO output versus receiver activity, as desired.

I can only guess the first method simulated the manual commands, and the time to process the commands was contributing to the delay. I can duplicate the delayed response by executing the Mandatory Command codes via the Asterisk CLI.

Interestingly, I also now see that the RL20M documentation refers to using the latter method for HamVoip installations, but not ASL installations. I never looked at that section until now. I wound up finding the latter method in another product's document while searching the web. Anyway, no way better to learn than figuring out the hard way!

Thanks for the response.

Eric
K2CB

Glad to hear that all is working.

The RL-20M AllStarLink documentation appears to need an update. Early in the text you will see:

"This code has only been tested in Allstarlink 2.00 beta 6."