RX and TX leds from the Pi4 gpio pins help

Hi Guys, need some help here, I’m a complet noob to linux so please be gentle . step by step would help I’ve tried to get some scripts working but after 3 days yes three days of going around in circles , I,m here.
[ “$1” = “on” ]; then
gpioset --mode=exit gpiochip0 17=1
else
gpioset --mode=exit gpiochip0 17=0
fi
No mater what I do I get 2025-02-25 13:53:00.557] ERROR[17397]: app_rpt.c:748 rpt_event_process: event exec item malformed: /bin/sh /usr/local/bin/rx_led.sh 1
[2025-02-25 13:53:00.557] ERROR[17397]: app_rpt.c:748 rpt_event_process: event exec item malformed: /bin/sh /usr/local/bin/rx_led.sh 0

I give up, any one got a step by step idiots guide .
Thanks in advance
Kev

Can you paste in the configuration snippet from rpt.conf you’re using?

Also, enclosing your posted code and configuration in three backticks → ``` before and after helps with readability.

<<<;;;;;;;;;;;;;;;;;;; Your node settings here ;;;;;;;;;;;;;;;;;;;
;startup_macro = *8132000
wait_times = wait-times_hd
hangtime = 100
;event_handler=/usr/local/bin/gpio_event_handler.sh
events=event_handler
;1998
;;;;;;;;;;;;;;;;;;; Another node settings here ;;;;;;;;;;;;;;;;;;;
;startup_macro = *8132000
;morse = morse_1998 ; Sample morse stanza for node 1998

[functions]
SMUPDATE=cmd,/usr/local/sbin/supermonASL_latest_update

A1 = cmd,/etc/asterisk/local/sayip.sh 64211
A3 = cmd,/etc/asterisk/local/saypublicip.sh 64211
B1 = cmd,/etc/asterisk/local/halt.sh 64211
B3 = cmd,/etc/asterisk/local/reboot.sh 64211

;91 = cmd,/usr/local/bin/tx_led.sh
;92 = cmd,/usr/local/bin/rx_led.sh
; Define DTMF commands for testing TX and RX LED control
91 = cop,61,/usr/local/bin/tx_led.sh 1
92 = cop,62,/usr/local/bin/rx_led.sh 1
93 = cop,61,/usr/local/bin/tx_led.sh 0>>>
<<<[event_handler]

;cop,62,GPIO17:1 = c|t|RPT_RXKEYED
;cop,62,GPIO17:0 = c|f|RPT_RXKEYED
;txcommand=/bin/sh /usr/local/bin/tx_led.sh 1

;txcommandoff=/bin/sh /usr/local/bin/tx_led.sh 0

;rxcommand=/bin/sh /usr/local/bin/rx_led.sh 1

;rxcommandoff=/bin/sh /usr/local/bin/rx_led.sh 0 >>

You’re mixing direct GPIO control wth scripts. You can do cop to call an internal command or cmd to call an external command. But you can’t mix-and-match. Try this:

91 = cop,61,GPIO17=1
92 = cop,62,GPIO17=1
93 = cop,61,GPIO17=0

alternatively:

91 = cmd,/usr/local/bin/tx_led.sh 1
92 = cmd,/usr/local/bin/rx_led.sh 1
93 = cmd,/usr/local/bin/tx_led.sh 0

I’ll have to put the LEDS on hold for a while, either rx is smoked or the cm108 chip. I chase you up when its back up and running.
Kev