airspy / airspyhf Goto Github PK
View Code? Open in Web Editor NEWCode repository for AirspyHF+
License: BSD 3-Clause "New" or "Revised" License
Code repository for AirspyHF+
License: BSD 3-Clause "New" or "Revised" License
Not really an issue, just a help request.
What is the on subject function's "w" parameter allowed range?
Asking just to know how to implement into the Extio dll.
-ffast-math
is not included i -O3
, and SDR doesn't really need strict IEEE754 complience.
Something to think about, perhaps.
When building with clang-cl and for 32-bit (x86
), there is this important warning:
libairspyHF/src/airspyhf.c(514,81): warning: cast between incompatible calling conventions 'cdecl' and 'stdcall'; calls through this pointer
may abort at runtime [-Wcast-calling-convention]
...= prepare_transfers(device, LIBUSB_ENDPOINT_IN | AIRSPYHF_ENDPOINT_IN, (libusb_transfer_cb_fn)airspyhf_libusb_transfer_callback);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libairspyHF/src/airspyhf.c(407,13): note: consider defining 'airspyhf_libusb_transfer_callback' with the 'stdcall' calling convention
static void airspyhf_libusb_transfer_callback(struct libusb_transfer* usb_transfer)
^
__RPC_CALLEE
No warning in 64-bit mode since stdcall == cdecl
AFAIK. Ref: https://en.wikipedia.org/wiki/X86_calling_conventions#Microsoft_x64_calling_convention
But with this patch, there's no warning in 32-bit mode:
--- a/libairspyhf/src/airspyhf.c 2022-08-30 08:29:38
+++ b/libairspyhf/src/airspyhf.c 2022-08-30 09:39:44
@@ -404,7 +404,7 @@
return NULL;
}
-static void airspyhf_libusb_transfer_callback(struct libusb_transfer* usb_transfer)
+static void LIBUSB_CALL airspyhf_libusb_transfer_callback(struct libusb_transfer* usb_transfer)
{
airspyhf_complex_int16_t *temp;
airspyhf_device_t* device = (airspyhf_device_t*) usb_transfer->user_data;
hi,
what do you think to release a new version since the last is from 2018?
thank you
I am using a airspy mini, conneted to a raspberry pi 3b+, running Spy Server v2.0.1629.
The raspberry pi 3b+ connected to my router with a 1000Mbps wired network.
My computer running Windows 10 64bit connected to my router with 5Ghz wifi.
I am running sdr#, connted to my spy server.
The available bandwidth is very limited, even not satisfied for listening to FM radio.
Below are my screenshots, notice the bandwidth in red circle, they are the max value i can toggle.
But when i connet my airspy mini directly to my computer usb port, they are not so limited.
I dont know why my airspy mini is acting like this when using spy server, i just wanna it to act as that it were connected directly to my usb port.
Please can anyone help me.
Below is my spyserver.config file:
bind_host = 0.0.0.0
bind_port = 5555
maximum_clients = 10
allow_control = 1
maximum_bandwidth = 500000
fft_fps = 30
fft_bin_bits = 16
device_type = AirspyOne
device_serial = 0
initial_frequency = 99800000
frequency_correction_ppb = 0
initial_gain = 12
enable_bias_tee = 0
buffer_size_ms = 100
buffer_count = 20
Fixed by copying getopt directory from airspy-tools directory to airspyhf tools directory
Skipping update step for 'airspyhf'
No patch step for 'airspyhf'
Performing configure step for 'airspyhf'
-- Udev rules not being installed, install them with -DINSTALL_UDEV_RULES=ON
-- Configuring done
CMake Error at tools/src/CMakeLists.txt:28 (add_library):
Cannot find source file:
../getopt/getopt.c
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
CMake Error at tools/src/CMakeLists.txt:28 (add_library):
No SOURCES given to target: libgetopt_static
In order to remove the need to run everything accessing the AirspyHF+ via sudo
; I'm wondering if the following is acceptable as a change to the s/w? (If so, I'll PR it). It does work.
The distributed 52-airspyhf.rules
file does not specify the group id or mode for the created device file /dev/airspyhf-*
. I've added GROUP="dialout", MODE="0660",
to the file and now I can use the AirspyHF+ without sudo
. My file is as follows:
$ cat /etc/udev/rules.d/52-airspyhf.rules
ATTR{idVendor}=="03eb", ATTR{idProduct}=="800c", SYMLINK+="airspyhf-%k", GROUP="dialout", MODE="0660", TAG+="uaccess"
$
I picked dialout
as the group as I was already a member. I don't know if there's a better choice (maybe gpio
or netdev
? - neither is great!)
Thoughts. As I said, I'm happy to PR this.
I can't update the firmware because I don't have a Windows computer.
I'm trying to use the airspyhf fork to get airspyhf_rx to work, but I get complaints that the sample rate is unsupported
root@airspy:~/openwebrx# airspyhf_info
airspyhf_lib_version: 1.4.1
Found AirSpy board 1
Firmware Version: R1.00.00
Part ID Number: 0x00000001
Serial Number: 0x3230342034313037
Supported sample rates:
0.768000 MSPS
Close board 1
root@airspy:~/openwebrx# airspyhf_rx -f144.9 -r /dev/stdout -a768000
argument error: unsupported sample rate
There doesn't seem to be any of the airspy apps along with this repo.
I was looking for the
airspyhf_rx app, so the airspy HF+ can be used with openwebrx.
Would it be possible to add these Fedora directions to the main pages?
I finally got airspyhf to install on Fedora and update airspyone_host from 1.0.9 (from Fedora repos) to 1.0.11. I was able to clean up what I was doing and simplify it thanks to https://wiki.polaire.nl/doku.php?id=airspy_mini_fedora so here is how to do it:
Prerequisites for Linux (Fedora):
sudo groupadd plugdev
sudo usermod -a -G plugdev $USER
Reboot Fedora.
sudo dnf groupinstall "Development Tools"
sudo dnf install cmake gcc-c++ libusb libusb-devel pkgconf
Build host software on Linux (Fedora):
wget https://github.com/airspy/airspyhf/archive/master.zip
unzip master.zip
cd airspyhf-master
mkdir build
cd build
cmake ../ -DINSTALL_UDEV_RULES=ON
make
sudo make install
sudo bash -c 'echo /usr/local/lib >>/etc/ld.so.conf.d/local.conf'
sudo bash -c 'echo /usr/local/lib64 >>/etc/ld.so.conf.d/local.conf'
sudo ldconfig
sudo udevadm control --reload-rules
sudo udevadm trigger
These also work for airspyone_host. Uninstall the Fedora version if installed with sudo dnf remove airspyone_host then continue. This might also remove Gqrx so you will have to reinstall it with sudo dnf install gqrx if that happens.
Build host software on Linux (Fedora):
wget https://github.com/airspy/airspyone_host/archive/master.zip
unzip master.zip
cd airspyone_host-master
mkdir build
cd build
cmake ../ -DINSTALL_UDEV_RULES=ON
make
sudo make install
sudo bash -c 'echo /usr/local/lib >>/etc/ld.so.conf.d/local.conf'
sudo bash -c 'echo /usr/local/lib64 >>/etc/ld.so.conf.d/local.conf'
sudo ldconfig
sudo udevadm control --reload-rules
sudo udevadm trigger
Hello,
would it be possible to have an option to get the I/Q stream as 16 bit integer samples (int16_t). I see there is a conversion function from int to float so the original stream from USB should be integers. This is the format I would like to access.
If you don't have time I can look closer at the code and try to find an elegant (not too ugly) way to do this.
Thank you and best regards.
I want to modify the firmware to use airspyhf.
When I try to compile airspyhf, I get the following error:
make
[ 25%] Linking CXX shared module libairspyhfSupport.so
/usr/bin/ld: CMakeFiles/airspyhfSupport.dir/Settings.cpp.o:(.data.rel.ro._ZTV13SoapyAirspyHF[_ZTV13SoapyAirspyHF]+0x148): undefined reference to SoapySDR::Device::hasIQBalanceMode(int, unsigned long) const' /usr/bin/ld: CMakeFiles/airspyhfSupport.dir/Settings.cpp.o:(.data.rel.ro._ZTV13SoapyAirspyHF[_ZTV13SoapyAirspyHF]+0x150): undefined reference to
SoapySDR::Device::setIQBalanceMode(int, unsigned long, bool)'
/usr/bin/ld: CMakeFiles/airspyhfSupport.dir/Settings.cpp.o:(.data.rel.ro._ZTV13SoapyAirspyHF[_ZTV13SoapyAirspyHF]+0x158): undefined reference to SoapySDR::Device::getIQBalanceMode(int, unsigned long) const' /usr/bin/ld: CMakeFiles/airspyhfSupport.dir/Streaming.cpp.o: in function
SoapyAirspyHF::getStreamFormats[abi:cxx11](int, unsigned long) const':
Streaming.cpp:(.text+0x777): undefined reference to SoapySDR::ConverterRegistry::listTargetFormats(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: CMakeFiles/airspyhfSupport.dir/Streaming.cpp.o: in function
SoapyAirspyHF::setupStream(int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::vector<unsigned long, std::allocator > const&, std::map<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::less<std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits, std::allocator > const, std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > > const&)':
Streaming.cpp:(.text+0xc35): undefined reference to SoapySDR::ConverterRegistry::listSourceFormats(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: Streaming.cpp:(.text+0xc94): undefined reference to
SoapySDR::ConverterRegistry::getFunction(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, SoapySDR::ConverterRegistry::FunctionPriority const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/airspyhfSupport.dir/build.make:116: libairspyhfSupport.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/airspyhfSupport.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
Ubuntu 19.10, Linux 5.3.0-51-generic #44-Ubuntu SMP Wed Apr 22 21:09:44 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
SDRangel successfully uses this library on Windows + recent versions of Linux, but it doesn't appear to work on MacOS (and in the past there were some reports of it not working on some Linux distributions with USB 3 ports, but OK when forced to USB 2). Functions to set the frequency and sample rate seem OK, but the callback never appears to be called.
It seems that the example airspyhf_rx program doesn't work on MacOS with the same symptoms (Tested using Big Sur using libusb 1.0.26 and 1.0.23), although some say other SDR software can run OK.
Any idea what the problem might be or how to debug? Thanks
These tools are not open source.
Originally posted by @touil in #18 (comment)
I don't see any options with CubicSDR regarding VHF/UFH. Not sure if that's a driver or host software problem.
thanks
A Tool to upgrade the device's firmware is missing for the Airspy HF+.
Please provide the sources how to flash this device.
A Linux binary is missing.
many pkgconfig files for programs that link against libusb have a Requires.private: libusb-1.0 >= x.x.x
in the .pc
file. Can this be added to libairspyhf's pkgconfig file?
FT8 decoding works well with RTL-SDR V3 Dongle:
$ ~/librtlsdr/src/rtl_sdr -s 1000000 -f 14074000 -g 20 -O dm=4:dm=20E6 - | csdr convert_u8_f | csdr fir_decimate_cc 250 0.00166665 HAMMING > /tmp/ft8_14074000.c2
$ ./ft8d backup/ft8_14074000.c2
00 2.6 -9 -0.15 14074124 VU3CER VU3FOE MK68 MK68
00 3.8 -6 -0.15 14074424 VU3CER VU3FOE MK68 MK68
00 3.1 -5 -0.15 14074523 VU3CER VU3FOE MK68 MK68
00 3.3 3 -0.14 14074623 VU3CER VU3FOE MK68 MK68
00 3.8 12 -0.13 14074723 VU3CER VU3FOE MK68 MK68
The ft8d
binary comes from https://github.com/pavel-demin/ft8d project.
Next, I tried using Airspy HF+ Discovery instead of the RTL-SDR V3 Dongle.
$ airspyhf_rx -r /dev/stdout -a 384000 -f 14.074000 -g on -m on - | csdr fir_decimate_cc 80 0.00166665 HAMMING > /tmp/ft8_14074000.c2"
$ ./ft8d backup/ft8_14074000.c2
<no decodes>
https://github.com/airspy/airspyhf/blob/master/tools/src/airspyhf_rx.c <-- I am using this to grab the IQ samples. I am guessing that the output format is CF32 which is directly supported by csdr
tools. I could be totally wrong here.
No luck here!
Next, I tried using the Airspy HF+ Discover with rx_tools
.
$ rx_sdr -s 384000 -f 14074000 -I CF32 -F CF32 - | csdr fir_decimate_cc 80 0.00166665 HAMMING > /tmp/ft8_14074000.c2
$ ./ft8d backup/ft8_14074000.c2
<no decodes>
No luck here either.
To ensure that FT8 traffic in always on the air, I use my https://github.com/kholia/Easy-Digital-Beacons-v1 project to generate such test FT8 traffic.
I am trying to understand where the bug is. Am I using csdr
correctly? Or is airspyhf_rx subtly different in its behavior compared to rtl_sdr?
Note: All software versions are freshly built from git repos.
When airspyhf_rx is operated in .wav mode (-w flag), I can play and decode the resultant .wav files just fine. So, what could be subtly different in the stdout mode?
Sample files:
rtl_sdr_internal_antenna_14074000.c2.txt - Recorded via RTL-SDR.
This IQ file can be opened in inspectrum
software.
The FSK signal is clearly visible in the RTL-SDR recording.
hello_14074000.c2.txt - Recorded via Airspy HF+ Discovery.
The signal looks like FSK too but doesn't decode. The timing (needed for decoding FT8 signals) seems to be quite fine.
What could be my next debugging steps to determine how airspyhf_rx is different from rtl_sdr? Thanks for the help.
Not really an issue, just a help request.
What is the function
int ADDCALL airspyhf_set_user_output(airspyhf_device_t* device, airspyhf_user_output_t pin, airspyhf_user_output_state_t value)
meant to do ?
Do I should expect an airspyhf_get_user_output in the near future ?
Asking just to know if it is worth to implement into the Extio dll.
The airspyhf/tools/src/README omits AM Modulation Examples
(eg. AM, LSB, USB, ...)
Comparing airspyhf tools README with the csdr README, I was able see what was needed for csdr compatability with airspyhf hardware, for further modifying the csdr incantation/pipes for AM modulation.
Remove the shift_addition_cc pipe, think this is for the rtl-sdr hardware not being accurate.
Augment the csdr fir_decimate_cc pipe with airspyhf's "2 0.25 HAMMING" values.
Included an additional "csdr fractional_decimator_ff 8" pipe.
$ airspyhf_rx -z -d -r stdout -f 0.970 | csdr fir_decimate_cc 2 0.25 HAMMING | csdr amdemod_cf | csdr fastdcblock_ff | csdr agc_ff | csdr limit_ff | csdr fractional_decimator_ff 8 | csdr convert_f_s16 | play -t s16 -r 48000 -
From here, users should be able to get SSB LSB/USB working too.
Next on my list, NFM.
Hi,
I was searching on the Internet for the supported samplerates of the Airspy HF+. Unfortunately, I couldn't find any information. Could you provide a list of supported samplerates?
Thanks,
Tobias
With the latest update, I notice that I still have to delete the reference to MINGW in airpsyhf/src/CMakeLists.txt because all it does is try to build the resource file and the dependency win32/airpsyhf.rc is NOT part of the distribution, so it always fails. When I inquired about this long ago, I was told the resource file was not needed and just delete the reference in CMakeLists.txt. It would be nice if that was fixed in the distribution so that those of us building under MINGW don't always have to delete the reference from CMakeLists.txt when changes affect that CMakeLists.txt from you folks.
Trying to set up the Spyserver on raspberry pi, however; it appears that the system doesn’t recognise the Airpsy discovery with those drivers.
Curious if this is some compatibility issue or some other case?
Tried various config settings ranging from detection modes to serial numbers, the result is “server busy” response on SDR#.
Clues?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.