Closed KarlL2 closed 2 years ago
I think the path of least resistance is to use the tune args in the existing set frequency call to invoke bladerf_schedule_retune when a timestamp is passed.
Actually there are several ways to use bladerf_schedule_retune
:
bladerf_get_quick_tune
to directly reuse a previous configurationIn my tests I always called bladerf_schedule_retune
with a timestamp of 0 to do it at once. Doing a normal tune takes 12-15ms, while a retune takes 0.4ms.
We could indeed pass data in args
when calling setFrequency
. Here are the possible cases I'm thinking of:
args
neededsaveQuickTune=true
reuseQuickTune=true
timestamp=xxx
bladerf_get_quick_tune
timestamp=xxx,reuseQuickTune=true
Note that the tune configuration may need to be updated as time passes:
These parameters are sensitive to changes in the operating environment, and should be "refreshed" if planning to use the "quick retune" functionality over a long period of time.
We could pass an additional argument forceTuneAfterSeconds=xxx
to force a normal tune if the tune configuration is older than the specified number of seconds. After a forced normal tune, we would store the tune configuration for future reuse. This would again work only when scheduling at once.
We could also (instead?) use quickTune=true
to either reuse an existing quick retune if any, or do a normal tune and store the quick tune configuration.
What do you think?
Sounds good overall. I don't think the forceTuneAfterSeconds
hurts anything, its like a happy extra feature. Since the application could also manage the force tune if needed.
Thanks. I'll look into it once I have time.
Hi Josh,
I sent https://github.com/pothosware/SoapyBladeRF/pull/52 where you can pass the following arguments:
runtime_error
if no quick tune exists for that frequency)Note that I haven't done anything concerning forceTuneAfterSeconds
as:
For now if you reach the max number of quick tunes, you can SoapySDRDevice_unmake
then SoapySDRDevice_make
your device again, which will reset things.
@guruofquality I've fixed my PR (I had renamed but somehow missed to commit the updated definition). The PR now compiles fine and works well.
Hi Josh,
I'd like to access
bladerf_get_quick_tune
andbladerf_schedule_retune
. Do you think we could update the SoapySDR API to handle that? Or is there an easier way to access those methods?I'm currently modifying the SoapySDR and SoapyBladeRF dlls, but I would rather not have to maintain my own version. Also that would impact all types of device and I'd need to rebuild all other dlls.