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

two devices on same machine #12

Open
dupilax opened this issue Sep 21, 2019 · 4 comments
Open

two devices on same machine #12

dupilax opened this issue Sep 21, 2019 · 4 comments

Comments

@dupilax
Copy link

dupilax commented Sep 21, 2019

hello

Yesterday I try to connect two Airspy HF on the same machine.

With SoapySDRUtil --probe="driver=airspyhf" there is only one device detected by SoapyAirspyHF even if airspyhf_info is detecting two devices.

Is it possible to have more than one device with SoapyAirspyHF ?

Thanks

@guruofquality
Copy link
Collaborator

With nearly all of these drivers, you should be able to pass the serial as one of the keyword arguments to filter for a specific device. However for some reason this was copied from another device and commented out: https://github.com/pothosware/SoapyAirspyHF/blob/master/Registration.cpp#L68

It does use a "device_id" count which is not something that stays consistent from run to run, and I would argue that is wrong.

If you happen to have a setup to test this on, I would absolutely appreciate a pull request to support selection by serial.

@dupilax
Copy link
Author

dupilax commented Sep 22, 2019 via email

@ghost
Copy link

ghost commented Apr 9, 2020

looks like this was resolved with #13 which is awesome! I was wondering if there is any way to catch the "unable to open device" error that is thrown when the serial number is not found. I tried catching it in python but I get a seg fault before python has a chance to catch it. I assume this is because the CPP is throwing the error. Any solutions available?

@guruofquality
Copy link
Collaborator

Any solutions available?

It might be the case that python is not handling the error. I will have to look into that.

You should be able to avoid the error by making sure the device is found first with SoapySDR.Device.enumerate(args) before opening it. That way you can tell if the device is available or not without the exception.

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