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
PTT in Portsdown Software
Re: PTT in Portsdown Software
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
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
Re: PTT in Portsdown Software
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
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
Re: PTT in Portsdown Software
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
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

Re: PTT in Portsdown Software
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
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