New Airspy R2/Mini driver development

Switching to Mode=1 SEN=15 now 07:10 UTC
Switching to Mode=0 LIN=16 now 2022-12-01 12:40 UTC

3 Likes

So, I have been using all three mode settings now and do not see any problems. No errors in log. I have nothing to compare with, so I do not know if this new driver is better then the one included with SatNOGS image. I can not see any difference between the three modes from my station.

Note that my location is very low, surrounded by hills. I’m using a disconne antenna at the moment, that is working OK for VHF (I have good decodes from Funcube and Nayif when these satellite are TX in high power). For UHF only the strongest satellites can be decoded, like Picsat, Bugsat.

I will switch antenna to a fixed yagi later pointing south to be able to get some better decodes from UHF satellites.

https://network.satnogs.org/stations/858/

2 Likes

Thanks for the update,

This all started with extra noise showing in the waterfall after the upgrade to SatNOGS 1.8.x this went away with the new driver, but this seem to produce vertical lines, spikes on an Airspy R2 when observations have high decimation values.

This can be tested when comparing the native osmo driver within GQRX and compare it with the Soapy driver in GQRX, spikes will show up in high decimation configuration.

I will have another look and will try to do another write up.

1 Like

The source is updated by the developer, after some initial test with build errors on Soapy 0.7 these now seem to be solved on x86, on Arm Pi3 we still see some warnings.

Have a look at the github issue for the latest updates.

1 Like

Thanks info.

I built new driver on Arm Pi4 and it worked well. See also my result.

I have built the new driver on RPI4 and I can not get gainmode=1 to work:
RuntimeError: soapy::source: Unsupported setting SENS for channel 0

Also gainmode=0 seams to produce very little gain in an observation.

@JH4XSY
When looking at your observation you have the following settings:
soapy-rx-device: "driver=airspy,serial=A74068C830423E93,gains=sensitivity,biastee=false

gains instead of gainmode

Has the parameter names changed?

Edit!
Yes it seams to have changed. Running 'SoapySDRUtil --probe="driver=airspy"' i get this:


– Device identification

driver=Airspy
hardware=Airspy
serial=62cc68ff214d1f17


– Peripheral summary

Channels: 1 Rx, 0 Tx
Timestamps: NO
Other Settings:
* Bias tee - Enable the 4.5v DC Bias tee to power SpyVerter / LNA / etc. via antenna connection.
[key=biastee, default=false, type=bool]
* Bit pack - Enable packing 4 12-bit samples into 3 16-bit words for 25% less USB traffic.
[key=bitpack, default=false, type=bool]
* Gain Mode - linearity | sensitivity | manual
[key=gains, default=linearity, type=string]

1 Like

Yes, new parameter names was the issue. First decode with the driver here:
https://network.satnogs.org/observations/7942366/

2 Likes

There is a question about the gain settings so I have gone back to the original driver.
See this issue for more info: https://github.com/ast/SoapyAirspy/issues/9

1 Like

@PE0SAT Have you heard anything about solving this problem? Nothing has happened with the issue on GitHub, so maybe Albin lost the interest…

Due to the birth of his child, he does not have much time at the moment.

The last contact I had was from a few weeks ago and I have yet to send him a response.

Albin suggested to create a driver that only supports SENS and LIN no manual settings support, and I am a bit hesitant. For some R&D is will be fine, but not for a final driver.

Please share your thoughts on this proposal by Albin.

Thank you for update. As a father of three I know that there are limited time.

I can not say if a driver with only SENS and LIN settings are OK or not, actually I think the original driver works just fine. And I have no possibility to compare different drivers at the same time, then I need two setups with exactly the same antenna running at the same time.

One question, if we make debian packages for the different versions, making it easier to switch between them. Would this effort be worth it ?
I’m thinking of placing these in satnogs-unstable repo, or my personal branch.

Not sure if it will be worth it. Note that the latest version of the driver the gain settings was not working. So maybe wait until Albin have the time to fix the gain setting?

Not for now, we first need to have a driver that works as expected, we now seem to have a driver that isn’t applying the right values.

As soon as there is some new development, I will update this subject.

3 Likes

Based on the following Airspy source information, I created the following table.

Gain 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Linearity VGA 13 12 11 11 11 11 11 10 10 10 10 10 10 10 10 10 9 8 7 6 5 4
Linearity MIX 12 12 11 9 8 7 6 6 5 0 0 1 0 0 2 2 1 1 1 1 0 0
Linearity LNA 14 14 14 13 12 10 9 9 8 9 8 6 5 3 1 0 0 0 0 0 0 0
Sensitive VGA 13 12 11 10 9 8 7 6 5 5 5 5 5 4 4 4 4 4 4 4 4 4
Sensitive MIX 12 12 12 12 11 10 10 9 9 8 7 4 4 4 3 2 2 1 0 0 0 0
Sensitive LNA 14 14 14 14 14 14 14 14 14 13 12 12 9 9 8 7 6 5 3 2 1 0

This can help you to find the manual value that corresponds with a certain Linear or Sensitive value.

As an example:

Say you want to set a LIN 14 gain value this will result in VGA=10,MIX=6,LNA=9

For a SatNOGS client running with the stock driver this will result in:

SATNOGS_SOAPY_RX_DEVICE="driver=airspy"
SATNOGS_GAIN_MODE="Settings Field"
SATNOGS_OTHER_SETTINGS="VGA=10,MIX=6,LNA=9"

Jan - PE0SAT

3 Likes

@PE0SAT
I’m currently running these settings for my Airspy and stock driver:
LNA=13,MIX=13,VGA=13
I have used SDR Console finding these values trying to find the best S/N setting for the antenna I’m currently using (without LNA).

According to the table this is wrong. Should I adjust to values according the table?

1 Like

It isn’t wrong, manual is just a free format, the table is only there to show the LIN and SENS values related to there manual values.

Many SDR software is only showing the 0 - 21 values.

2 Likes

I have a new Airspy Mini and spent a couple of days trying the new driver with no luck this on a new Pi4 with the current SatNOGS client built on Bullseye.
I ended up with these settings but it is in use on a 1700MHz dish at the moment.
https://network.satnogs.org/observations/8507050/

#Old Driver.  New driver does not work as of November 2023
SATNOGS_SOAPY_RX_DEVICE="driver=airspy,biastee=true"
SATNOGS_GAIN_MODE="Settings Field"
SATNOGS_OTHER_SETTINGS="VGA=13,MIX=13,LNA=13"
SATNOGS_ANTENNA="RX"
SATNOGS_RX_SAMP_RATE="6e6"

Nice to see that others are also still interested in this development.

Two guestions, what is the SoapySDRUtil --probe="driver=airspy' there we should see the gainmode option.

The second question, what parameters are you using with the SATNOGS_SOAPY_RX_DEVICE= variable?

With the new driver you need to add the gainmode below an example:

SATNOGS_SOAPY_RX_DEVICE="driver=airspy,gainmode=0,biastee=true"

With the new driver I tried lots of combinations. I read all of the threads including this one and followed your attempts. I am sure that if I try to explain it will be confusing but; I did keep notes.

                                           NEW Driver
######################################################
##     Soapy SDR -- the SDR abstraction library     ##
######################################################

Probe device driver=airspy
[DEBUG] SoapyAirspy::SoapyAirspy()
[DEBUG] SoapyAirspy::SoapyAirspy(driver) = airspy
[DEBUG] SoapyAirspy::SoapyAirspy(label) = AirSpy One [258c62dc30750e8f]
[DEBUG] SoapyAirspy::SoapyAirspy(serial) = 258c62dc30750e8f
[DEBUG] Found AirSpy device: serial = 258c62dc30750e8f
[DEBUG] Supported sample rate: 3000000
[DEBUG] Supported sample rate: 6000000
[DEBUG] SoapyAirspy::setGain(1, 0, 0.000000)
[DEBUG] SoapyAirspy::listAntennas(1, 0)
[DEBUG] SoapyAirspy::hasDCOffsetMode(1, 0)
[DEBUG] getBandwidth: 0.000000
[DEBUG] listBandwidths(1, 0)

----------------------------------------------------
-- Device identification
----------------------------------------------------
  driver=Airspy
  hardware=Airspy
  serial=258c62dc30750e8f

----------------------------------------------------
-- Peripheral summary
----------------------------------------------------
  Channels: 1 Rx, 0 Tx
  Timestamps: NO
  Other Settings:
     * Bias tee - Enable the 4.5v DC Bias tee to power SpyVerter / LNA / etc. via antenna connection.
       [key=biastee, default=false, type=bool]
     * Bit pack - Enable packing 4 12-bit samples into 3 16-bit words for 25% less USB traffic.
       [key=bitpack, default=false, type=bool]
     * Gain Mode - linearity | sensitivity | manual
       [key=gains, default=linearity, type=string]

----------------------------------------------------
-- RX Channel 0
----------------------------------------------------
  Full-duplex: YES
  Supports AGC: YES
  Stream formats: CS16, CF32
  Native format: CS16 [full-scale=32767]
  Antennas: RX
  Full gain range: [0, 21] dB
    LIN gain range: [0, 21] dB
  Full freq range: [24, 1800] MHz
    RF freq range: [24, 1800] MHz
  Sample rates: 3, 6 MSps
  Filter bandwidths: 2.25, 4.5 MHz


######################################################
##     Soapy SDR -- the SDR abstraction library     ##
######################################################

Lib Version: v0.7.2-2
API Version: v0.7.1
ABI Version: v0.7
Install root: /usr
Search path:  /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7
Search path:  /usr/local/lib/arm-linux-gnueabihf/SoapySDR/modules0.7                (missing)
Search path:  /usr/local/lib/SoapySDR/modules0.7
Module found: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/libHackRFSupport.so  (0.3.3)
Module found: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/libLMS7Support.so    (20.10.0)
Module found: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/libRedPitaya.so      (0.1.1)
Module found: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/libairspySupport.so  (0.2.0-1232a06)
Module found: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/libaudioSupport.so   (0.1.1)
Module found: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/libbladeRFSupport.so (0.4.1)
Module found: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/libmiriSupport.so    (0.2.5)
Module found: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/libosmosdrSupport.so (0.2.5)
Module found: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/libremoteSupport.so  (0.5.2)
Module found: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/librfspaceSupport.so (0.2.5)
Module found: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/librtlsdrSupport.so  (0.3.2)
Module found: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/libuhdSupport.so     (0.4.1)
Available factories... airspy, audio, bladerf, hackrf, lime, miri, osmosdr, redpitaya, remote, rfspace, rtlsdr, uhd
Available converters...
 -  CF32 -> [CF32, CS16, CS8, CU16, CU8]
 -  CS16 -> [CF32, CS16, CS8, CU16, CU8]
 -  CS32 -> [CS32]
 -   CS8 -> [CF32, CS16, CS8, CU16, CU8]
 -  CU16 -> [CF32, CS16, CS8]
 -   CU8 -> [CF32, CS16, CS8]
 -   F32 -> [F32, S16, S8, U16, U8]
 -   S16 -> [F32, S16, S8, U16, U8]
 -   S32 -> [S32]
 -    S8 -> [F32, S16, S8, U16, U8]
 -   U16 -> [F32, S16, S8]
 -    U8 -> [F32, S16, S8]

                                           **Old Driver**


######################################################

Soapy SDR – the SDR abstraction library

######################################################

Probe device driver=airspy


– Device identification

driver=Airspy
hardware=Airspy
device_id=0
origin=GitHub - pothosware/SoapyAirspy: Soapy SDR plugin for the Airspy


– Peripheral summary

Channels: 1 Rx, 0 Tx
Timestamps: NO
Other Settings:
* Bias tee - Enable the 4.5v DC Bias tee to power SpyVerter / LNA / etc. via antenna connection.
[key=biastee, default=false, type=bool]
* Bit Pack - Enable packing 4 12-bit samples into 3 16-bit words for 25% less USB trafic.
[key=bitpack, default=false, type=bool]


– RX Channel 0

Full-duplex: YES
Supports AGC: YES
Stream formats: CS16, CF32
Native format: CS16 [full-scale=32767]
Antennas: RX
Full gain range: [0, 45] dB
LNA gain range: [0, 15] dB
MIX gain range: [0, 15] dB
VGA gain range: [0, 15] dB
Full freq range: [24, 1800] MHz
RF freq range: [24, 1800] MHz
Sample rates: 6, 3 MSps
######################################################

Soapy SDR – the SDR abstraction library

######################################################

Lib Version: v0.7.2-2
API Version: v0.7.1
ABI Version: v0.7
Install root: /usr
Search path: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7
Search path: /usr/local/lib/arm-linux-gnueabihf/SoapySDR/modules0.7 (missing)
Search path: /usr/local/lib/SoapySDR/modules0.7
Module found: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/libHackRFSupport.so (0.3.3)
Module found: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/libLMS7Support.so (20.10.0)
Module found: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/libRedPitaya.so (0.1.1)
Module found: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/libairspySupport.so (0.1.2)
Module found: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/libaudioSupport.so (0.1.1)
Module found: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/libbladeRFSupport.so (0.4.1)
Module found: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/libmiriSupport.so (0.2.5)
Module found: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/libosmosdrSupport.so (0.2.5)
Module found: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/libremoteSupport.so (0.5.2)
Module found: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/librfspaceSupport.so (0.2.5)
Module found: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/librtlsdrSupport.so (0.3.2)
Module found: /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/libuhdSupport.so (0.4.1)
Available factories… airspy, audio, bladerf, hackrf, lime, miri, osmosdr, redpitaya, remote, rfspace, rtlsdr, uhd
Available converters…

  • CF32 → [CF32, CS16, CS8, CU16, CU8]
  • CS16 → [CF32, CS16, CS8, CU16, CU8]
  • CS32 → [CS32]
  • CS8 → [CF32, CS16, CS8, CU16, CU8]
  • CU16 → [CF32, CS16, CS8]
  • CU8 → [CF32, CS16, CS8]
  • F32 → [F32, S16, S8, U16, U8]
  • S16 → [F32, S16, S8, U16, U8]
  • S32 → [S32]
  • S8 → [F32, S16, S8, U16, U8]
  • U16 → [F32, S16, S8]
  • U8 → [F32, S16, S8]
    `
    Top is the most recent and now in use with the old/original driver
#AIRSPY PITA November 2023
#OLD DRIVER OLD DRIVER SETTINGS
SATNOGS_SOAPY_RX_DEVICE="driver=airspy,biastee=true"
SATNOGS_GAIN_MODE="Settings Field"
SATNOGS_OTHER_SETTINGS="VGA=12,MIX=10,LNA=15"
SATNOGS_ANTENNA="RX"
SATNOGS_RX_SAMP_RATE="3e6"

#Old Driver Japanese guy settings
#SATNOGS_SOAPY_RX_DEVICE="driver=airspy,gainmode=1,biastee=true"
#SATNOGS_GAIN_MODE="Settings Field"
#SATNOGS_OTHER_SETTINGS="SENS=14"
#SATNOGS_ANTENNA="RX"
#SATNOGS_RX_SAMP_RATE="6e6"

#PE0SAT old driver settings
#SATNOGS_SOAPY_RX_DEVICE="driver=airspy,serial=[replace with your calue],gainmode=0,biastee=true"
#SATNOGS_RX_SAMP_RATE="3e6"
#SATNOGS_GAIN_MODE="Settings Field"
#SATNOGS_OTHER_SETTINGS="LIN=14"
#SATNOGS_ANTENNA="RX"

#NEW DRIVER NEW DRIVER SETTINGS     DOES NOT WORK  Unsupported setting SENS for channel 0
#SATNOGS_SOAPY_RX_DEVICE="driver=airspy,gainmode=1,biastee=true"
#SATNOGS_RX_SAMP_RATE="6e6"
#SATNOGS_GAIN_MODE="Settings Field"
#SATNOGS_OTHER_SETTINGS="SENS=14"
#SATNOGS_ANTENNA="RX"

#nope new driver tries
#SATNOGS_SOAPY_RX_DEVICE="driver=airspy,biastee=true"
#SATNOGS_DEV_ARGS="driver=airspy,biastee=true"
#SATNOGS_GAIN_MODE="Settings Field"
#SATNOGS_OTHER_SETTINGS="LNA=8,MIX=8,VGA=11"
#SATNOGS_RF_GAIN="43"
#SATNOGS_RX_BANDWIDTH="60000"
#SATNOGS_RX_SAMP_RATE="6e6"
#SATNOGS_ANTENNA="RX"

#nope
#SATNOGS_SOAPY_RX_DEVICE="driver=airspy,serial=258c62dc30750e8f,biastee=true,gains=sensitivity"
#SATNOGS_RX_SAMP_RATE="6e6"
#SATNOGS_GAIN_MODE="Overall"
#SATNOGS_RF_GAIN="18"

Notes on what I did here at N5ZKK


# AIRSPY TESTING
cd /tmp

satnogs_afsk1200_ax25.py --soapy-rx-device="airspy=0,bias=1" --antenna=RX --samp-rate-rx=6e6 --rx-freq=1694000000 --other-settings="LNA=8,MIX=8,VGA=11" --gain=43 --file-path=./audio-out.ogg --

waterfall-file-path=./waterfall.dat

#SETUP
First make sure you have the latest Airspy library installed, this can be done by following the steps on this airspyone_host 10 github page.
https://github.com/airspy/airspyone_host
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 ldconfig

mkdir source
cd source 
git clone https://github.com/ast/SoapyAirspy.git
mkdir build
cd build
cmake -Wno-dev ../
make
sudo make install

#check for the new module
ls /usr/local/lib/SoapySDR/modules0.7/libairspySupport.so

#verify that both exist, red error message
SoapySDRUtil --probe="driver=airspy"

#move the old module out of /usr  and make copies of both new and old modules for safekeeping
mkdir /home/pi/airspy_new_driver
mkdir /home/pi/airspy_old_driver
sudo mv /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/libairspySupport.so /home/pi/airspy_old_driver/libairspySupport.so
sudo mv /usr/local/lib/SoapySDR/modules0.7/libairspySupport.so /home/pi/airspy_new_driver/libairspySupport.so
#copy the new module 
sudo cp /home/pi/airspy_new_driver/libairspySupport.so /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/libairspySupport.so

#see that the modulle is ready
SoapySDRUtil --probe="driver=airspy"
#good

#now some things are needed to use the module

sudo dmesg -wT   #plug in the airspy to see messages
airspy_info
airspy_rx -r /dev/null -t 2

sudo nano /etc/modprobe.d/airspy-blacklist.conf
add this stuff    
#
# Block AirSpy kernel module from loading
#
blacklist airspy
#


id

sudo nano /etc/udev/rules.d/52-airspy.rules  
 add this line                               ATTR{idVendor}=="1d50", ATTR{idProduct}=="60a1", SYMLINK+="airspy-%k", MODE="660", GROUP="plugdev" 

sudo usermod -a -G plugdev satnogs
sudo usermod -a -G plugdev pi


#Fix up the config
sudo nano /etc/default/satnogs-client
#with this stuff.  Comment out the old stuff
SATNOGS_SOAPY_RX_DEVICE="driver=airspy,gainmode=1,biastee=true"
SATNOGS_RX_SAMP_RATE="6e6"
SATNOGS_GAIN_MODE="Settings Field"
SATNOGS_OTHER_SETTINGS="SENS=14"
SATNOGS_ANTENNA="RX"

reboot

id

#new driver needs to be moved here
sudo cp /home/pi/airspy_new_driver/libairspySupport.so /usr/lib/arm-linux-gnueabihf/SoapySDR/modules0.7/libairspySupport.so

SoapySDRUtil --info
SoapySDRUtil --probe="driver=airspy"


sudo nano /etc/default/satnogs-client

SATNOGS_SOAPY_RX_DEVICE="driver=airspy,gainmode=1,biastee=true"
SATNOGS_RX_SAMP_RATE="6e6"
SATNOGS_GAIN_MODE="Settings Field"
SATNOGS_OTHER_SETTINGS="SENS=14"
SATNOGS_ANTENNA="RX"


Gain		21	20	19	18	17	16	15	14	13	12	11	10	9	8	7	6	5	4	3	2	1	0

Linearity VGA	13	12	11	11	11	11	11	10	10	10	10	10	10	10	10	10	9	8	7	6	5	4
Linearity MIX	12	12	11	9	8	7	6	6	5	0	0	1	0	0	2	2	1	1	1	1	0	0
Linearity LNA	14	14	14	13	12	10	9	9	8	9	8	6	5	3	1	0	0	0	0	0	0	0
Sensitive VGA	13	12	11	10	9	8	7	6	5	5	5	5	5	4	4	4	4	4	4	4	4	4
Sensitive MIX	12	12	12	12	11	10	10	9	9	8	7	4	4	4	3	2	2	1	0	0	0	0
Sensitive LNA	14	14	14	14	14	14	14	14	14	13	12	12	9	9	8	7	6	5	3	2	1	0