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

Add missing arguments to control RX & TX bias #41

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

BatchDrake
Copy link

Hi,

This is a temptative PR that implements settings and device arguments to control Bias T during TX and RX. They are called bias_tx and bias_rx respectively. The rationale behind this is that a setting named bias_tx already existed, and it made sense to keep separate settings (and device arguments) to configure this option.

Looking forward for your feedback,

@guruofquality
Copy link
Contributor

Looks good in general. I know hackrf can be a little sensitive to settings being changed and switching between tx and rx modes.

Take a look at these sections in HackRF_Streaming.cpp and how they conditionally apply settings, you may need to so something similar to keep the switching happy.

// determine what (if any) settings need to be changed for RX; only applicable if there is both a source and sink block
// determine what (if any) settings need to be changed for TX; only applicable if there is both a source and sink block

@BatchDrake
Copy link
Author

Good catch, I had no idea. I was setting the antenna voltage unconditionally prior to starting streaming. I've just added some changes to keep certain _current_bias flag that is checked before starting streaming. Note this still needs to be done even if we do not switch between TX / RX: these setting may be defined as a device argument (which is the case for SigDigger) and activateStream could be the first opportunity we have to apply the bias config.

@mossmann mossmann self-requested a review March 23, 2023 15:59
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

Successfully merging this pull request may close these issues.

2 participants