PTT in Portsdown Software

Discussion about this major DATV Project. See https://wiki.batc.org.uk/The_Portsdown_Transmitter
Post Reply
gi7ugv
Posts: 50
Joined: Tue Oct 31, 2017 2:47 pm

PTT in Portsdown Software

Post by gi7ugv » Thu Apr 25, 2019 11:36 am

Hi,

I’m looking to switch an amplifier and monitor PTT status using a network message (MQTT) and am wondering if there’s a reliable single place to insert a bit of code in the Portsdown build to do this that works with all output devices including delayed PTT for the Lime?

I’ve seen a couple of places it will work and have it working for what I’m needing just now but want to check if there’s one location that works in all scenarios.

Thanks,

John

G8GKQ
Site Admin
Posts: 2928
Joined: Sun Mar 22, 2009 1:21 pm

Re: PTT in Portsdown Software

Post by G8GKQ » Fri Apr 26, 2019 5:12 pm

Hi John

Your best bet would be to monitor the status of the PTT GPIO pin. That's the only place it all comes together for all circumstances.

Alternatively, if you are only concerned with the Lime, you could put something in ~/rpidatv/scripts/lime_ptt.sh

Dave

gi7ugv
Posts: 50
Joined: Tue Oct 31, 2017 2:47 pm

Re: PTT in Portsdown Software

Post by gi7ugv » Fri Apr 26, 2019 10:06 pm

Hi Dave,

Yes that's where I've got it switching for the Lime at the moment and the PTT message from the Portsdown switches the amplifiers on/off as expected. Likely wont be using the FM board with the amplifier anyway so will just stick with it as is for now.

Also have the amplifier info displayed and PTT controlled via other bits shown here for a bit of fun.

Thanks!
John

gi7ugv
Posts: 50
Joined: Tue Oct 31, 2017 2:47 pm

Re: PTT in Portsdown Software

Post by gi7ugv » Sun Apr 28, 2019 10:37 pm

On hooking everything up realised I hadn't actually put the command in for PTT OFF but the following is working here now.

To send a message when the Lime is safe to transmit I added code to "rpidatv/scripts/lime_ptt.sh" which works fine as mentioned already, could add a check above this to call custom PTT ON code immediately if Limesdr isn't set to cover other TX methods.

To send a PTT OFF message I've added code in two places :

1) rpidatv/scripts/menu.sh in do_stop_transmit() for when using the console.
2) rpidatv/src/gui/rpidatvtouch.c in TransmitStop() for when using the touchscreen GUI and compiled and copied the binary to rpidatv/bin/

Not sure if the above covers all TX OFF conditions but it's working here fine now.

A call to an empty external script/program from the above locations, and others if there are any, might allow people to add code easier should they have external network/serial based PTT requirements but I doubt there's going to be more than a couple of people that would need that :)

G8GKQ
Site Admin
Posts: 2928
Joined: Sun Mar 22, 2009 1:21 pm

Re: PTT in Portsdown Software

Post by G8GKQ » Mon Apr 29, 2019 9:28 am

Hi John

The only other place that you might consider hooking PTT OFF from is the script rpidatv/scripts/b.sh. This is my go-to script to shut the TX down and reset everything to a standby state, although I don't think that it is used in normal operation (but is very useful during development).

I like your suggestion of calling an external script for PTT ON and OFF. However, that would mean messing with rpidatv.c which is one of Evariste's bits of code that turns the PTT on for non-Lime modes, and I have so far managed to keep with his source on this one.

73

Dave

Post Reply

Return to “The Portsdown Digital ATV System”