Page 1 of 1

About SR selection.

Posted: Mon May 09, 2022 1:39 pm
by Robert
Hello,
I'm looking to customize SR select commands on a Portsdown 2020 or 4. Let me explain, when I select SR 2000 or SR 4000 I would like to launch a bash script that sends a command to an external module. Writing the script is not a problem for me but where to place the command line to launch it is my question. I've already looked in the scripts directory but I admit I'm a little lost. Help would be welcome.

Robert F1TZU.

Re: About SR selection.

Posted: Tue May 10, 2022 2:48 pm
by G8GKQ
Hi Robert

There is no in-built mechanism to run a script when the SR is changed.

You would either need to modify the selectSR function in rpidatvtouch4.c https://github.com/davecrump/portsdown4 ... h4.c#L8163 and then recompile, or modify ctlSR.sh https://github.com/davecrump/portsdown4 ... s/ctlSR.sh to call a script.

Both of these changes would be over-written by future software updates.

Dave

Re: About SR selection.

Posted: Tue May 10, 2022 8:09 pm
by Robert
Hi Dave,

Thanks for info.

I had an intuition as to the obligation to modify a source file and to have to recompile, you confirm it to me.
I plan to run in IQ mode and seeing the ctlsr.sh file in which limeSDR is mentioned I thought to myself that this isn't the right file. Can you confirm it?

It is obvious that this kind of customization is overwritten by a software update and therefore it must be managed.

Robert

Re: About SR selection.

Posted: Wed May 11, 2022 9:33 am
by G8GKQ
Hi Robert

If you are running in IQ mode then you must be using a Portsdown 2020, so the correct link is https://github.com/davecrump/portsdown- ... s/ctlSR.sh

This script is called on SR Change, but I think is called at other times as well. You'll need tio do some tests to check.

Dave

Re: About SR selection.

Posted: Wed May 11, 2022 12:00 pm
by Robert
Hi Dave,

Thanks for the info about the IQ mode which only works with Portsdown 2020. A few days ago I analyzed the differences between the GPIO breakout boards of each versions. Unsure of being able to use Portsdown 4 in this mode, I ordered the board for 2020. I also have a Raspberry PI 3B+ in my stock so ready to experiment.

Thanks again for your help.

Robert.