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

UHD fails with multiple USRPs in GNU Radio flowgraph with sink and source #629

Open
jdemel opened this issue Sep 2, 2022 · 0 comments
Open
Labels

Comments

@jdemel
Copy link
Contributor

jdemel commented Sep 2, 2022

Issue Description

In GNU Radio, it is not possible to use two N310s with both sinks and source.
UHD fails and claims it cannot create either the sink or source, whatever comes last.

Setup Details

A GNU Radio flowgraph with a UHD sink and source. A device string that specifies addr0=...,addr1=... triggers this issue.

Expected Behavior

Initialize both USRPs and run a flowgraph. The same configuration works with e.g. benchmark_rate.

Actual Behaviour

UHD throws an error that the device is already claimed.

Steps to reproduce the problem

Additional Information

uhd/host/lib/device.cpp

Lines 49 to 53 in dfc7b31

if (std::find(hash_key_blacklist.begin(), hash_key_blacklist.end(), key)
== hash_key_blacklist.end()) {
boost::hash_combine(hash, key);
boost::hash_combine(hash, dev_addr[key]);
}

This would fix it:

            if (std::find_if(hash_key_blacklist.begin(),
                    hash_key_blacklist.end(),
                    [key](std::string i) { return key.find(i) != std::string::npos; })
                == hash_key_blacklist.end()) {
                boost::hash_combine(hash, key);
                boost::hash_combine(hash, dev_addr[key]);
            }
@mbr0wn mbr0wn added the bug label Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants