Easiest way to inhibit PTT from command line?

General support for the Pi-Star System
Post Reply
N6PL
Posts: 32
Joined: Thu Jan 09, 2020 1:41 am

Easiest way to inhibit PTT from command line?

Post by N6PL »

I have an STM32/Pi3 and am running a shell script to monitor temperature of the transmitter PA heat sink and want to inhibit PTT if temp goes out of limit. What would be the most direct system command to accomplish this from the command line? Right now I am simply shutting down the Pi but would rather just stop whatever service is necessary to kill PTT so I do not have to cycle power to bring everything back up again.

Thanks -
N6PL
Posts: 32
Joined: Thu Jan 09, 2020 1:41 am

Re: Easiest way to inhibit PTT from command line?

Post by N6PL »

Thanks. Geez, didn't expect it to be such a struggle.

When you run the pistar-mmdvmcal utility it reports 'Stopping Pi-Star Services...' (and when you quit, 'Starting Pi-Star Services...') and this effectively prevents any activation of the transmitter. I've looked into the code but it isn't clear to me what exactly it is doing to shut down the associated services.

Alternately, I guess I could simply start the pistar-mmdvmcal utility when I wanted to disable the transmitter as the transmitter stays disabled as long as the utility is running, but... kinda gross...
N6PL
Posts: 32
Joined: Thu Jan 09, 2020 1:41 am

Re: Easiest way to inhibit PTT from command line?

Post by N6PL »

Ah, I for some reason assumed that pistar-mmdvmcal was entirely an executable, didn't realize that it was started from a script.

Looking at the contents of pistar-mmdvmcal I should be able to simply create manual stop and start scripts of my own by controlling the four associated services. Thanks for pointing me in the right direction.
N6PL
Posts: 32
Joined: Thu Jan 09, 2020 1:41 am

Re: Easiest way to inhibit PTT from command line?

Post by N6PL »

This works fine, and opposite to start again. Tx is disabled in the stopped condition.

Code: Select all

#!/bin/bash

echo "Stopping Pi-Star Services..."

systemctl stop pistar-watchdog.timer
systemctl stop pistar-watchdog.service
systemctl stop mmdvmhost.timer
systemctl stop mmdvmhost.service
sleep 3

echo "Finished..."
Thanks again.
Post Reply