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

Building on a Mac using Qt Creator #4

Closed
markjfine opened this issue Mar 6, 2021 · 3 comments · Fixed by #14
Closed

Building on a Mac using Qt Creator #4

markjfine opened this issue Mar 6, 2021 · 3 comments · Fixed by #14

Comments

@markjfine
Copy link

markjfine commented Mar 6, 2021

Was able to build this in Qt Creator on a Mac in Catalina and the required packages from Homebrew.

  1. Modify swradio-8.pro's unix section (at the bottom) as follows:
    # LIBS += -L/usr/lib64
    # LIBS += -L/lib64
    INCLUDEPATH += /usr/local/include /usr/local/lib/qwt.framework/Headers
    QMAKE_LFLAGS += -F/usr/local/opt/qwt/lib -L/usr/local/lib
    LIBS += -framework qwt -lsndfile -lsamplerate -lportaudio -lusb-1.0 -lfftw3f -ldl

  2. Modify the radio handler to use 'dylib' instead of 'so', otherwise it won't recognise the radio, e.g. in rtlsdr-handler.cpp
    // Handle = dlopen ("librtlsdr.so", RTLD_NOW);
    Handle = dlopen ("librtlsdr.dylib", RTLD_NOW);

Should be a more elegant way of doing this using defines, but this works for now.

That said, am using an RTL-SDR v3 and it seems like it's not going into direct sampling for HF. Works in VHF, even though there's no WFM demodulator. I will look at setting direct sampling next.

@markjfine
Copy link
Author

markjfine commented Mar 6, 2021

Changing line 314-316 of rtlsdr-handler.cpp seems to fix the direct sampling issue for HF:
vfoFrequency = f;
if (f <= 28800000) {
rtlsdr_set_direct_sampling (device, 2);
} else {
rtlsdr_set_direct_sampling (device, 0);
}
(void)rtlsdr_set_center_freq (device, f);

@JvanKatwijk
Copy link
Owner

JvanKatwijk commented Mar 8, 2021 via email

@markjfine
Copy link
Author

Cheers. Let me know if you need some help with anything. You're doing a lot of good stuff here.

Some other ideas:

Might also be advantageous to save the direct sampling setting as a parameter somewhere in the rtlsdr interface, initialised at -1. This way rtlsdr_set_direct_sampling() only needs to actually call the radio function from the dll/dylib if it is different from what it was. I'm not really sure what repeated calls does to radio performance (or if that's actually an issue with the rtl-sdr).

Was also thinking of trying my hand at writing an AirSpy HF+ interface for you.

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

Successfully merging a pull request may close this issue.

2 participants