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

Multiple RX channels issue #46

Open
GVardakis opened this issue Jun 1, 2021 · 1 comment
Open

Multiple RX channels issue #46

GVardakis opened this issue Jun 1, 2021 · 1 comment

Comments

@GVardakis
Copy link

Issue Description

UHD module fails when using two RX channels on USRP B210 with message Invalid recv stream command - stream now on multiple channels in a single streamer will fail to time align.

Setup Details

USRP B210, openSUSE Tumbleweed, SoapySDR v0.8, SoapyUHD v0.4.1-9a738c3

Steps to reproduce

SoapySDRUtil --args="driver=uhd" --rate=1e6 --channels="0, 1" --direction=RX

The above command instead of performing the expected rate test fails with the message mentioned in the description

Comments

This problem seems to originate inside the activateStream function in SoapyUHDDevice.cpp. The stream_now variable should not be set to True when more than one channels have been requested, but this is not handled in the code. Instead, the stream_now should be set to False and the time_spec to a time offset with respect to the current time, so that reception begins in a later time. The fix below seems to solve the issue of the rate test but probably needs more testing,

cmd.stream_now = (flags & SOAPY_SDR_HAS_TIME) == 0 && (stream->rx.get()->get_num_channels() == 1);

cmd.time_spec = _dev->get_time_now() + uhd::time_spec_t(0.1);

@alphafox02
Copy link

Applying this change allowed the rate test to work using both channels on an X310 w/ one Twin Rx card inserted.

KoffeinFlummi added a commit to KoffeinFlummi/SoapyUHD that referenced this issue May 2, 2024
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

No branches or pull requests

2 participants