开云体育

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

Re: GPIO & DMK URI


 

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

Join [email protected] to automatically receive all group messages.