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

Airspy in Macos #1327

Closed
loewal opened this issue Jul 7, 2022 · 13 comments
Closed

Airspy in Macos #1327

loewal opened this issue Jul 7, 2022 · 13 comments

Comments

@loewal
Copy link

loewal commented Jul 7, 2022

Airspy HF+ and Discovery don't work in Macos, neither selfcompiled nor DMG.
Windows and Linux work fine.

@loewal
Copy link
Author

loewal commented Jul 18, 2022

May I express my disappointment for not having recieved any reaction on my problem?

The Airspy's are found, but do NOTHING

@lawendel
Copy link

I'm observing the same (lack of) behavior on a MacBook Air M1 under Monterey. I've downloaded the i64 DMG and installed flawlessly. The program opens with no error messages, it then recognizes the HF+ as an input device, it can even switch between HF and VHF, but nothing happens in the Spectrum window. Before reading your issue, I thought I made something wrong. Maybe it's that... Is there a mailing list or a group where we can ask directly to f4exb? SDRangel is indeed complex but highly attractive as a cross-platform app. I'm also using GQRX and SDR++ with no such issues.

@lawendel
Copy link

Sorry, it's the recent "macx64" DMG...

@justfalter
Copy link

I have an Airspy r2 on an M1, compiled for arm64.

A single breakpoint set in AirspyWorker::rx_callback would never hit after starting the input.

After some debugging, I found I could get the Airspy input working properly by:

  1. Setting a breakpoint right before the m_airspyWorkerThread is started here
  2. Starting the input
  3. Hit the breakpoint
  4. Wait a couple seconds
  5. Continue execution

My guess is that there is some kind of timing issue in the worker thread startup sequence.

The effective sequence is:

  • m_airspyWorker->startWork()
    • airspy_stop_rx(...)
    • (on success): airspy_is_streaming(...)
  • m_airspyWorkerThread.start()

I'm unfamiliar with the mechanics of a QThread, as that is how m_airspyWorkerThread is defined.

bool AirspyInput::startWorker()
{
if (m_airspyWorker->startWork())
{
m_airspyWorkerThread.start();
return true;
}
else
{
return false;
}
}

bool AirspyWorker::startWork()
{
airspy_error rc;
rc = (airspy_error) airspy_start_rx(m_dev, rx_callback, this);
if (rc == AIRSPY_SUCCESS)
{
m_running = (airspy_is_streaming(m_dev) == AIRSPY_TRUE);
}
else
{
qCritical("AirspyWorker::run: failed to start Airspy Rx: %s", airspy_error_name(rc));
m_running = false;
}
return m_running;
}

@justfalter
Copy link

Note

After some debugging, I found I could get the Airspy input working properly by:

  1. Setting a breakpoint right before the m_airspyWorkerThread is started here
  2. Starting the input
  3. Hit the breakpoint
  4. Wait a couple seconds
  5. Continue execution

Note: this seems to only work with a debugger breakpoint, so far. I've tried sleeping just before the m_airspyWorkerThread.start() call and it does not result in the airspy working. I tried with both QThread::msleep(2000); and std::this_thread::sleep_for(std::chrono::seconds(2)), and neither resulted in the airspy r2 working.

I'm thinking that the issue might exist in a separate thread, as pausing on a breakpoint results in all threads being paused.

@srcejon srcejon mentioned this issue Sep 19, 2022
@srcejon
Copy link
Collaborator

srcejon commented Sep 20, 2022

I just tried the airspyhf_rx example program that is included with airspyhf library, and that doesn't work for me on MacOS (Big Sur). Does it work for anyone else?

@loewal
Copy link
Author

loewal commented Sep 21, 2022 via email

@srcejon
Copy link
Collaborator

srcejon commented Sep 21, 2022

Do you have a USB 2 hub to plug it in to? I remember a previous issue where it wouldn't work with Linux with USB 3 ports, but would with USB 2.

@loewal
Copy link
Author

loewal commented Sep 21, 2022 via email

@srcejon
Copy link
Collaborator

srcejon commented Sep 21, 2022

Well, SDR++ doesn't work for me either. Haven't tried GQRX yet.

@srcejon
Copy link
Collaborator

srcejon commented Sep 21, 2022

Have opened an issue for airspyhf airspy/airspyhf#42

@loewal
Copy link
Author

loewal commented Sep 21, 2022 via email

@loewal
Copy link
Author

loewal commented Sep 21, 2022 via email

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

4 participants