开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

GPIO & DMK URI


 

I'm looking for some help with getting a GPIO command setup for a repeater disable function. We have had a little bit of interference from so people and want to be able to turn the repeater off for a few to try and get them to stop. I'm running a Pi 3B+ with a DMK URI with ASL3, has anyone here done this before?
Thanks,
KC0AMP


 

Can I make a suggestion?? Of course, I don't know your specific situation but our experience is that jerkoffs who do that crave negative attention and would actually jam just to get us to turn the repeater off; If you can sort it out, a much better solution is to switch to an alternate input so they have to listen to you but can't do anything. Trust me, drives them crazy...


 

Anthony;
? ? I have done it with Hamvoip.? We are in the process of converting to ASL3, but I have not gotten this to work with that distro yet. ? ? ?I suspect I may have some syntax wrong somewhere yet.? I have configured a memory card with ASL2 beta 6 which is suppose to work and going to test that next trip to the site.? I want to make sure I have all the statements correct in the config files and then will try again on ASL3.
?
? ?I did build a relay driver board that plugs into the Pi that we use for power control of other devices on the repeater site and the Pi GPIO commands do work for that.? Here is a short script to set and clear Pi GPIO commands.? I took the example from Hamvoip and rewrote the commands for ASL3.
?
#!/bin/bash
# script name - write_gpio
# ASL3 Commands
raspi-gpio set $1 op
if [ $2 == 1 ]; then
? ?raspi-gpio set $1 dh
else
? ?raspi-gpio set $1 dl
fi
echo $date " ALLSTAR GPIO pin " $1 " was set to " $2 >> /tmp/GPIO_log
?
Here is the function to call that script from ASL3.? Add this to the /etc/asterisk/rpt.conf file.
I like to add those functions to Supermon and just select them from the menu or send DTMF via Allstar.
?
;Tower_Cam_On=XXX0 ? ? ?; Where XXX0 is a function number for Relay #1 on.
XXX0 = cmd,sudo -u root /home/repeater/scripts/write_gpio.sh 12 1
?
;Tower_Cam_Off=XXX1? ? ?; Where XXX1 is a function number for Relay #1 off.
XXX1 = cmd,sudo -u root /home/repeater/scripts/write_gpio.sh 12 0
?
If all you need is one output, you can buffer your Pi GPIO pin with a FET.
?
73 Steve, KM5HT