Skip to content

Multiple RX channels issue #46

@GVardakis

Description

@GVardakis

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions