Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monitor PTT/DCD status #548

Open
craigerl opened this issue Oct 7, 2024 · 2 comments
Open

Monitor PTT/DCD status #548

craigerl opened this issue Oct 7, 2024 · 2 comments

Comments

@craigerl
Copy link

craigerl commented Oct 7, 2024

It's impossible to monitor a gpio output pin status with the new/robust libgpiod and gpiozero API's, and they have no intention of implementing this feature (which existed for years in the /sys/class/gpio filesystem that is now gone).

Direwatch (github.com/craigerl/direwatch) used to watch the DCD and PTT pins (via the missing /sys/class/gpio interface) to let the operator know when the device is receiving and transmitting, drawing the corresponding red and green circles on a little display.

Is there another way to get a near-real-time ptt/dcd status from direwolf? named pipe? port? other? via python?

curiously,
-craig

@dranch
Copy link
Collaborator

dranch commented Oct 7, 2024

There is the "-d o" option to see the status of PTT and DCD via STDOUT. I suppose you could also wire your PTT GPIO pin to a 10k resistor and over to a different GPIO pin in read-mode and poll that.

@craigerl
Copy link
Author

craigerl commented Oct 7, 2024

Thanks David, that may be the trick then, for those playing along at home, send PTT and DCD status to direwolf.ptt.log and send the unaltered log to direwolf.log . It might be a bit laggy, but it's better than the new GPIO.

direwolf -d t -d o -p -q d -t 0 -c /run/direwolf.tnc.conf |& tee >(grep --line-buffered -E '(DCD |PTT )' > direwolf.ptt.log) | (grep --line-buffered -E -v '(PTT|DCD)' > direwolf.log )

PTT 0 = 1
PTT 0 = 0
DCD 0 = 1
DCD 0 = 0
PTT 0 = 1
PTT 0 = 0
DCD 0 = 1
DCD 0 = 0
DCD 0 = 1
DCD 0 = 0

thanks,
-craig

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants