f4exb / sdrangel

SDR Rx/Tx software for Airspy, Airspy HF+, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay and FunCube
GNU General Public License v3.0
2.84k stars 430 forks source link

Airspy in Macos #1327

Closed loewal closed 1 year ago

loewal commented 2 years ago

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

loewal commented 2 years ago

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

The Airspy's are found, but do NOTHING

lawendel commented 2 years ago

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 commented 2 years ago

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

justfalter commented 2 years ago

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:

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

https://github.com/f4exb/sdrangel/blob/d1a4fca49bcabf847f36b595f6b47202895d8080/plugins/samplesource/airspy/airspyinput.cpp#L236-L247

https://github.com/f4exb/sdrangel/blob/d1a4fca49bcabf847f36b595f6b47202895d8080/plugins/samplesource/airspy/airspyworker.cpp#L45-L62

justfalter commented 2 years ago

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 commented 1 year ago

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 commented 1 year ago

Gave it a try as well.

Indeed, no recording all. On 20 Sep 2022, 18:02 +0200, f4exb/sdrangel @.***>, wrote:

airspyhf_rx

srcejon commented 1 year ago

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 commented 1 year ago

I have.

Tried:

• First session with BWFM: nothing • Second session: cannot start sample source

Why does it work with GQRX and SDR++……? On 21 Sep 2022, 17:50 +0200, srcejon @.***>, wrote:

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. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

srcejon commented 1 year ago

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

srcejon commented 1 year ago

Have opened an issue for airspyhf https://github.com/airspy/airspyhf/issues/42

loewal commented 1 year ago

Airspy HF+ doesn’t work with the usb-2 hub, but works when plugged in directly in one of the Mac-ports. On 21 Sep 2022, 18:02 +0200, srcejon @.***>, wrote:

Well, SDR++ doesn't work for me either. Haven't tried GQRX yet. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

loewal commented 1 year ago

Sorry, it works on SDR++ with usb-2, when I give it some power ….duh…. Not on SDRangel. On 21 Sep 2022, 18:06 +0200, Loe Walter @.***>, wrote:

Airspy HF+ doesn’t work with the usb-2 hub, but works when plugged in directly in one of the Mac-ports. On 21 Sep 2022, 18:02 +0200, srcejon @.***>, wrote:

Well, SDR++ doesn't work for me either. Haven't tried GQRX yet. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>