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

Version 20240424-0 #81

Merged
merged 8 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ The following Git repository is required:

## Platforms tested

* Mac mini 2023 Apple Silicon (M2 Pro), macOS 14.4, Xcode 15.3 Command Line Tools
* MacBook Air 13" Apple Silicon (M1) 2020, macOS 14.4, Xcode 15.3 Command Line Tools
* Ubuntu 22.04.4 LTS x86\_64, gcc 12.3.0
* Mac mini 2023 Apple Silicon (M2 Pro), macOS 14.4.1, Xcode 15.3 Command Line Tools
* MacBook Air 13" Apple Silicon (M1) 2020, macOS 14.4.1, Xcode 15.3 Command Line Tools
* Ubuntu 24.04 LTS x86\_64, gcc 13.2.0
* Raspberry Pi 4 with Raspberry Pi OS 64bit Lite (Debian Bookworm)

## Features under development
Expand All @@ -38,6 +38,12 @@ Intel Mac hardware is no longer supported by airspy-fmradion, although the autho

## Changes (including requirement changes)

* 20240424-0: Made the following changes:
* [Add libairspyhf latest version document.](https://github.com/jj1bdx/airspy-fmradion/pull/80)
* Airspy HF+ Firmware R3.0.7 and R4.0.8 both work OK on libairspyhf 1.6.8.
* For the Firmware R4.0.8, use libairspy 1.8 to have full compatibility.
* [Use shared libraries for airspy, airspyhf, and rtl-sdr.](https://github.com/jj1bdx/airspy-fmradion/pull/79)
* Tested `airspy_set_packing()` for Airspy R2, but this increased CPU usage on Apple Silicon M2 Pro, so the change was not incorporated.
* 20240316-0: Made the following changes:
* Raspberry Pi 4 with Raspberry Pi OS 64bit lite is now officially tested.
* *Note well: Raspberry Pi OS 32bit is not supported*.
Expand Down
30 changes: 18 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
HINTS /usr/local/include/libairspy /opt/homebrew/include/libairspy
${PKG_AIRSPY_INCLUDE_DIRS})
find_library(
AIRSPY_LIBRARY libairspy.a HINTS /usr/local/lib /opt/homebrew/lib
${PKG_AIRSPY_LIBRARY_DIRS})
AIRSPY_LIBRARY libairspy.dylib
HINTS /usr/local/lib /opt/homebrew/lib ${PKG_AIRSPY_LIBRARY_DIRS})
set(AIRSPY_INCLUDE_OPTION
"-I/usr/local/include -I/opt/homebrew/include")
else()
find_path(AIRSPY_INCLUDE_DIR airspy.h
HINTS ${PKG_AIRSPY_INCLUDE_DIRS})
find_library(AIRSPY_LIBRARY libairspy.a
find_library(AIRSPY_LIBRARY libairspy.so
HINTS ${PKG_AIRSPY_LIBRARY_DIRS})
set(AIRSPY_INCLUDE_OPTION "")
endif()
Expand All @@ -79,15 +79,15 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
/opt/homebrew/include/libairspyhf
${PKG_AIRSPYHF_INCLUDE_DIRS})
find_library(
AIRSPYHF_LIBRARY libairspyhf.a
AIRSPYHF_LIBRARY libairspyhf.dylib
HINTS /usr/local/lib /opt/homebrew/lib ${PKG_AIRSPYHF_LIBRARY_DIRS})
set(AIRSPYHF_INCLUDE_OPTION
"-I/usr/local/include -I/opt/homebrew/include")
else()
find_path(AIRSPYHF_INCLUDE_DIR airspyhf.h HINT
${PKG_AIRSPYHF_INCLUDE_DIRS})
find_library(AIRSPYHF_LIBRARY libairspyhf.a HINT
${PKG_AIRSPYHF_LIBRARY_DIRS})
find_path(AIRSPYHF_INCLUDE_DIR airspyhf.h
HINTS ${PKG_AIRSPYHF_INCLUDE_DIRS})
find_library(AIRSPYHF_LIBRARY libairspyhf.so
HINTS ${PKG_AIRSPYHF_LIBRARY_DIRS})
set(AIRSPYHF_INCLUDE_OPTION "")
endif()
message(
Expand All @@ -98,8 +98,13 @@ message(
# Find RTL-SDR library.
pkg_check_modules(PKG_RTLSDR librtlsdr)
find_path(RTLSDR_INCLUDE_DIR rtl-sdr.h HINTS ${PKG_RTLSDR_INCLUDE_DIRS})
find_library(RTLSDR_LIBRARY librtlsdr.a
HINTS ${PKG_RTLSDR_LIBRARY_DIRS})
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
find_library(RTLSDR_LIBRARY librtlsdr.dylib
HINTS ${PKG_RTLSDR_LIBRARY_DIRS})
else()
find_library(RTLSDR_LIBRARY librtlsdr.so
HINTS ${PKG_RTLSDR_LIBRARY_DIRS})
endif()
message(
STATUS
"librtlsdr ${PKG_RTLSDR_VERSION}: ${RTLSDR_INCLUDE_DIR}, ${RTLSDR_LIBRARY}"
Expand Down Expand Up @@ -312,8 +317,9 @@ target_link_libraries(
${EXTRA_LIBS}
cmake_git_version_tracking)

target_link_libraries(sfmbase ${SNDFILE_LIBRARY} ${AIRSPY_LIBRARIES}
${AIRSPYHF_LIBRARIES} ${RTLSDR_LIBRARIES})
target_link_libraries(
sfmbase ${SNDFILE_LIBRARY} ${AIRSPY_LIBRARY} ${AIRSPYHF_LIBRARY}
${RTLSDR_LIBRARY} ${LIBUSB_LIBRARY})

# Installation

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# airspy-fmradion

* Version 20240316-0
* Version 20240424-0
* For macOS (Apple Silicon) and Linux

## Contributing
Expand Down
41 changes: 41 additions & 0 deletions libairspyhf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# libairspyhf and Airspy HF+ firmware versions

## Airspy HF+ firmware version details

* See [Airspy HF+ Firmware changelog](https://airspy.com/downloads/hfplus_changelog.txt) for the details.

## libairspy version compatibility with Airspy HF+ firmware versions

* R3.0.7 and R4.0.8 both work OK on libairspyhf 1.6.8.
* For R4.0.8, use libairspy 1.8 to have full compatibility.

## For macOS Homebrew

To install the latest libairspyhf:

```sh
brew install airspyhf --HEAD

```

## pkgconfig precedence

You may need to add precedence of `/usr/local/lib/pkg-config` for `PKG_CONFIG_PATH` when building airspy-fmradion, as:

```
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:${PKG_CONFIG_PATH}"
```

## libairspyhf 1.8 udev rules for Linux

You have to modify `/etc/udev/rules.d/52-airspyhf.rules` as:

```
ATTR{idVendor}=="03eb", ATTR{idProduct}=="800c", SYMLINK+="airspyhf-%k", TAG+="uaccess", MODE="660", GROUP="plugdev"
```

Otherwise Airspy HF+ device will not be recognized when plugged in.

See [GitHub issue airspy/airspyhf#46](https://github.com/airspy/airspyhf/issues/46) for the details.

[End of memorandum]
43 changes: 21 additions & 22 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
// define this for enabling coefficient monitor functions
// #undef COEFF_MONITOR

#define AIRSPY_FMRADION_VERSION "20240316-0"
#define AIRSPY_FMRADION_VERSION "20240424-0"

// Flag to set graceful termination
// in process_signals()
Expand Down Expand Up @@ -342,29 +342,28 @@ int main(int argc, char **argv) {
#endif // LIBSNDFILE_MP3_ENABLED

const struct option longopts[] = {
{"modtype", optional_argument, nullptr, 'm'},
{"devtype", optional_argument, nullptr, 't'},
{"quiet", required_argument, nullptr, 'q'},
{"config", optional_argument, nullptr, 'c'},
{"dev", required_argument, nullptr, 'd'},
{"mono", no_argument, nullptr, 'M'},
{"raw", required_argument, nullptr, 'R'},
{"float", required_argument, nullptr, 'F'},
{"wav", required_argument, nullptr, 'W'},
{"wavfloat", required_argument, nullptr, 'G'},
{"play", optional_argument, nullptr, 'P'},
{"pps", required_argument, nullptr, 'T'},
{"pilotshift", no_argument, nullptr, 'X'},
{"usa", no_argument, nullptr, 'U'},
{"filtertype", optional_argument, nullptr, 'f'},
{"squelch", required_argument, nullptr, 'l'},
{"multipathfilter", required_argument, nullptr, 'E'},
{"ifrateppm", optional_argument, nullptr, 'r'},
{"modtype", optional_argument, nullptr, 'm'},
{"devtype", optional_argument, nullptr, 't'},
{"quiet", required_argument, nullptr, 'q'},
{"config", optional_argument, nullptr, 'c'},
{"dev", required_argument, nullptr, 'd'},
{"mono", no_argument, nullptr, 'M'},
{"raw", required_argument, nullptr, 'R'},
{"float", required_argument, nullptr, 'F'},
{"wav", required_argument, nullptr, 'W'},
{"wavfloat", required_argument, nullptr, 'G'},
{"play", optional_argument, nullptr, 'P'},
{"pps", required_argument, nullptr, 'T'},
{"pilotshift", no_argument, nullptr, 'X'},
{"usa", no_argument, nullptr, 'U'},
{"filtertype", optional_argument, nullptr, 'f'},
{"squelch", required_argument, nullptr, 'l'},
{"multipathfilter", required_argument, nullptr, 'E'},
{"ifrateppm", optional_argument, nullptr, 'r'},
#if defined(LIBSNDFILE_MP3_ENABLED)
{"mp3fmaudio", required_argument, nullptr, 'C'},
{"mp3fmaudio", required_argument, nullptr, 'C'},
#endif // LIBSNDFILE_MP3_ENABLED
{nullptr, no_argument, nullptr, 0}
};
{nullptr, no_argument, nullptr, 0}};

int c, longindex;

Expand Down