How to enable COS LED on RX for SHARI devices?

An older post from ASL2 era suggests:

cop,62,GPIO4:1 = c|t|RPT_RXKEYED
cop,62,GPIO4:0 = c|f|RPT_RXKEYED
I tried this and it does not work (the COS LED does not come on).

In 2022 and for ASL2 states something needs to be compiled to make it work - also suggests that this functionally will be added later.
Was it added and what might I be missing to make this work?
This older post is at:

Thanks!

If I am reading this correctly, this was done in ASL2 but was not brought over to ASL3.
It is #22.

Steve, I think those are status markers, not a toggle of logic.
The logic is toggled with a electrical signal to the pin. And that is the only way to toggle COS logic. Not in software.

But I can’t speak to the led or shari.
Perhaps your electrical logic is inverted.

Under [events] in rpt.conf put:

cop,62,GPIO4:1 = c|t|RPT_RXKEYED
cop,62,GPIO4:0 = c|f|RPT_RXKEYED

and in simpleusb.conf within the node’s stanza put:

gpio4=out0

Restart Asterisk. This is quasi-custom per board.

1 Like

Thank you VERY much.
I will try this and report back.
Sounds like it will work! :slight_smile:

I tried this exactly as you have suggested.
I still see no COS LED activity on RX.
Should anything about the GPIO be getting logged?
I do not see anything on the asterisk console either in terms of GPIO.
And yes, I of course restarted asterisk and also tried rebooting.
Thanks!

Just checking …

In your rpt.conf file, do you have a line with ;[events] with the leading “;” (starting a comment)? If so, you need to remove the “;”.

… and the cop,62,... lines would go after the [events] line

1 Like

My total bad here!
I thought I had [events] uncommented. SMH.
Not sure if I can blame this on the default dark blue colored test in vim.
Fix and works!
Thank you!

Also in answer to my other question: they do log. :slight_smile:
Connected to Asterisk 20.11.0+asl3-3.2.0-2.deb12 currently running on 2W (pid = 2838)
– Event on node 64184 doing rpt command cop,62,GPIO4:1 for condition c|t|RPT_RXKEYED
– Event on node 64184 doing rpt command cop,62,GPIO4:0 for condition c|f|RPT_RXKEYED
– Hungup ‘DAHDI/pseudo-998408274’

set bg=dark is your VIM friend.

1 Like

my etc/asterisk/rpt.conf file did not have [events] in the file but under [functions]
; 962 = cop,62 ;send Messages to USB to control GPIO pins

Should I uncomment that line??

No, that’s something else entirely.

The Kits4Hams instructions for the SHARI PiHat include a section on enabling the COS light on page 21. Would assume this is the most current approach in ASL3 to enable the light?

I expect that is both a bit older and it also specifies it’s for HamVoip.
So it’s likely to be different.
Also if it were the same, maybe it would work out of the box.
What was answered above works perfectly for ASL3.

As I said above, the use of a COS light for GPIO is not standard which is why it doesn’t work out of the box. The basics of that are not different between ASL and HamVOIP.

True that.
What I don’t get is in the hardware design (SHARI/NiceRF why didn’t they just tie the RXaudio enable line (pin one on the module) to also drive the COS LED. =SMH=
This also kind of “wastes” one of the two normally free GPIO lines.

–Steve from the future–
While I was driving today I had a thought…
It might be done this way for usbradio applications (vs using simpleusb)-
Where you’d typically be running the receiver open squelch:
And you wouldn’t want the COS LED stuck on all the time.
Running this back through the GPIO via software would give you an option to have app_rpt
control the LED when it has valid carrier or carrier+PL.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.