Type concatenation error with latest software

With satnogs-client-ansible-202001181213, satnogs-client-1.0+18.g74d8eec, gr-satnogs-1.5.1+127+gd6e66880-1:

Jan 25 13:24:56 rpi3bp systemd[1]: satnogs-client.service: Succeeded.
Jan 25 13:24:56 rpi3bp systemd[1]: Stopped SatNOGS client.
Jan 25 13:24:56 rpi3bp systemd[1]: Started SatNOGS client.
Jan 25 14:10:05 rpi3bp satnogs-client[15875]: Found 1 device(s):
Jan 25 14:10:05 rpi3bp satnogs-client[15875]:   0:  Realtek, RTL2838UHIDIR, SN: 00000001
Jan 25 14:10:05 rpi3bp satnogs-client[15875]: Using device 0: Generic RTL2832U OEM
Jan 25 14:10:05 rpi3bp satnogs-client[15875]: Found Rafael Micro R820T tuner
Jan 25 14:10:06 rpi3bp satnogs-client[15875]: 2020-01-25 14:10:06,519 - apscheduler.executors.default - ERROR - Job "spawn_observer (trigger: date[2020-01-25 14:10:05 UTC], next run at: 2020-01-25 14:10:05 UTC)" raised an exception
Jan 25 14:10:06 rpi3bp satnogs-client[15875]: Traceback (most recent call last):
Jan 25 14:10:06 rpi3bp satnogs-client[15875]:   File "/usr/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 125, in run_job
Jan 25 14:10:06 rpi3bp satnogs-client[15875]:     retval = job.func(*job.args, **job.kwargs)
Jan 25 14:10:06 rpi3bp satnogs-client[15875]:   File "/var/lib/satnogs/local/lib/python2.7/site-packages/satnogsclient/scheduler/tasks.py", line 74, in spawn_observer
Jan 25 14:10:06 rpi3bp satnogs-client[15875]:     observer.observe()
Jan 25 14:10:06 rpi3bp satnogs-client[15875]:   File "/var/lib/satnogs/local/lib/python2.7/site-packages/satnogsclient/observer/observer.py", line 144, in observe
Jan 25 14:10:06 rpi3bp satnogs-client[15875]:     self.observation_decoded_data)
Jan 25 14:10:06 rpi3bp satnogs-client[15875]:   File "/var/lib/satnogs/local/lib/python2.7/site-packages/satnogsclient/upsat/gnuradio_handler.py", line 53, in exec_gnuradio
Jan 25 14:10:06 rpi3bp satnogs-client[15875]:     script_name, '--soapy-rx-device=' + device, '--samp-rate-rx=' + str(samp_rate),
Jan 25 14:10:06 rpi3bp satnogs-client[15875]: TypeError: cannot concatenate 'str' and 'NoneType' objects

Would anyone be able to help me understand and correct this error?

Thanks!
Andreas / VA2WBT

1 Like

You have to define a sampling rate using satnogs-setup. Previously we supported only specific sampling rates for each device, that’s why you did not have to configure it. Now all of our flowgraphs are completely parametric supporting arbitrary sampling rates. So choose the best sampling rate of your SDR!

2 Likes

Thanks for the tip! I tried entering a sampling rate via satnogs-setup; however, it’s still crashing with the same error.

1 Like

Can you post your configuration? Take care not to reveal your API key!

1 Like

I think I was able to avoid the type mismatch by explicitly defining satnogs_soapy_rx_device to be rtlsdr (in addition to having done so already for satnogs_rx_device. My latest troubles appear to be related to the automatic waterfall setup. Here is my current configuration (fields with “xxx” have been modified for posting):

experimental: true
hamlib_utils_rot_enabled: false
satnogs_api_token: bxxx
satnogs_post_observation_script: /home/pi/rtl_biast/build/src/rtl_biast -b 0
satnogs_pre_observation_script: /home/pi/rtl_biast/build/src/rtl_biast -b 1
satnogs_remove_raw_files: true
satnogs_rf_gain: '7.7'
satnogs_rx_device: rtlsdr
satnogs_rx_samp_rate: '48000'
satnogs_soapy_rx_device: rtlsdr
satnogs_station_elev: 70
satnogs_station_id: 1xxx
satnogs_station_lat: 4x.xxxxxx
satnogs_station_lon: -7x.xxxxxx

Installed: satnogs-client-ansible-202001181213, satnogs-client-1.0+18.g74d8eec, gr-satnogs-1.5.1+127+gd6e66880-1

My last observation attempt:

Jan 26 17:40:46 rpi3bp systemd[1]: Started SatNOGS client.
Jan 26 17:52:59 rpi3bp satnogs-client[25716]: Found 1 device(s):
Jan 26 17:52:59 rpi3bp satnogs-client[25716]:   0:  Realtek, RTL2838UHIDIR, SN: 00000001
Jan 26 17:52:59 rpi3bp satnogs-client[25716]: Using device 0: Generic RTL2832U OEM
Jan 26 17:52:59 rpi3bp satnogs-client[25716]: Found Rafael Micro R820T tuner
Jan 26 17:53:00 rpi3bp satnogs-client[25716]: rot_init called
Jan 26 17:53:00 rpi3bp satnogs-client[25716]: dummy: _init called
Jan 26 17:53:00 rpi3bp satnogs-client[25716]: rot_register (1)
Jan 26 17:53:00 rpi3bp satnogs-client[25716]: rot_register (2)
Jan 26 17:53:00 rpi3bp satnogs-client[25716]: dummy_rot_init called
Jan 26 17:53:00 rpi3bp satnogs-client[25716]: rot_open called
Jan 26 17:53:00 rpi3bp satnogs-client[25716]: dummy_rot_open called
Jan 26 17:53:00 rpi3bp satnogs-client[25716]: rot_get_position called
Jan 26 17:53:00 rpi3bp satnogs-client[25716]: dummy_rot_get_position called
Jan 26 17:53:00 rpi3bp satnogs-client[25716]: rot_set_position called
Jan 26 17:53:00 rpi3bp satnogs-client[25716]: dummy_rot_set_position called: 36.38 10.08
Jan 26 17:53:02 rpi3bp satnogs-client[25716]: Found Rafael Micro R820T tuner
Jan 26 17:53:02 rpi3bp satnogs-client[25716]: [INFO] [UHD] linux; GNU C++ version 8.2.0; Boost_106700; UHD_3.13.1.0-3
Jan 26 17:53:04 rpi3bp satnogs-client[25716]: [INFO] Using format CF32.
Jan 26 17:53:04 rpi3bp satnogs-client[25716]: gr::log :WARN: soapy::source0 - Gain out of range: 0 <= gain <= 0
Jan 26 17:53:04 rpi3bp satnogs-client[25716]: gr::log 2020-01-26 17:53:04,467 :INFO: satnogs.doppler_compensation: Output sampling rate sould be less or equal the device sampling
Jan 26 17:53:04 rpi3bp satnogs-client[25716]: Traceback (most recent call last):
Jan 26 17:53:04 rpi3bp satnogs-client[25716]:   File "/usr/bin/satnogs_fsk_ax25.py", line 472, in <module>
Jan 26 17:53:04 rpi3bp satnogs-client[25716]:     main()
Jan 26 17:53:04 rpi3bp satnogs-client[25716]:   File "/usr/bin/satnogs_fsk_ax25.py", line 457, in main
Jan 26 17:53:04 rpi3bp satnogs-client[25716]:     tb = top_block_cls(antenna=options.antenna, baudrate=options.baudrate, bw=options.bw, decoded_data_file_path=options.decoded_dat
Jan 26 17:53:04 rpi3bp satnogs-client[25716]:   File "/usr/bin/satnogs_fsk_ax25.py", line 179, in __init__
Jan 26 17:53:04 rpi3bp satnogs-client[25716]:     self.satnogs_doppler_compensation_0 = satnogs.doppler_compensation(samp_rate_rx, rx_freq, lo_offset, baudrate*decimation, 1, 0)
Jan 26 17:53:04 rpi3bp satnogs-client[25716]:   File "/usr/lib/python3/dist-packages/satnogs/doppler_compensation.py", line 94, in __init__
Jan 26 17:53:04 rpi3bp satnogs-client[25716]:     raise AttributeError
Jan 26 17:53:04 rpi3bp satnogs-client[25716]: AttributeError
Jan 26 17:53:30 rpi3bp satnogs-client[25716]: Found 1 device(s):
Jan 26 17:53:30 rpi3bp satnogs-client[25716]:   0:  Realtek, RTL2838UHIDIR, SN: 00000001
Jan 26 17:53:30 rpi3bp satnogs-client[25716]: Using device 0: Generic RTL2832U OEM
Jan 26 17:53:30 rpi3bp satnogs-client[25716]: Found Rafael Micro R820T tuner
Jan 26 17:53:32 rpi3bp satnogs-client[25716]: 2020-01-26 17:53:32,089 - apscheduler.executors.default - ERROR - Job "spawn_observer (trigger: date[2020-01-26 17:52:59 UTC], next 
Jan 26 17:53:32 rpi3bp satnogs-client[25716]: Traceback (most recent call last):
Jan 26 17:53:32 rpi3bp satnogs-client[25716]:   File "/usr/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 125, in run_job
Jan 26 17:53:32 rpi3bp satnogs-client[25716]:     retval = job.func(*job.args, **job.kwargs)
Jan 26 17:53:32 rpi3bp satnogs-client[25716]:   File "/var/lib/satnogs/local/lib/python2.7/site-packages/satnogsclient/scheduler/tasks.py", line 74, in spawn_observer
Jan 26 17:53:32 rpi3bp satnogs-client[25716]:     observer.observe()
Jan 26 17:53:32 rpi3bp satnogs-client[25716]:   File "/var/lib/satnogs/local/lib/python2.7/site-packages/satnogsclient/observer/observer.py", line 158, in observe
Jan 26 17:53:32 rpi3bp satnogs-client[25716]:     self.plot_waterfall()
Jan 26 17:53:32 rpi3bp satnogs-client[25716]:   File "/var/lib/satnogs/local/lib/python2.7/site-packages/satnogsclient/observer/observer.py", line 251, in plot_waterfall
Jan 26 17:53:32 rpi3bp satnogs-client[25716]:     waterfall_png=self.observation_waterfall_png)
Jan 26 17:53:32 rpi3bp satnogs-client[25716]:   File "/var/lib/satnogs/local/lib/python2.7/site-packages/satnogsclient/observer/waterfall.py", line 19, in plot_waterfall
Jan 26 17:53:32 rpi3bp satnogs-client[25716]:     _ = np.fromfile(wf_file, dtype="|S32", count=1)[0]
Jan 26 17:53:32 rpi3bp satnogs-client[25716]: IndexError: index 0 is out of bounds for axis 0 with size 0
1 Like

First I would suggest to run the SoapySDRUtil --probe to get some Soapy related parameters.

Eg the output for the RTL will be something like:

----------------------------------------------------
-- Device identification
----------------------------------------------------
  driver=RTLSDR
  hardware=RTLSDR
  origin=https://github.com/pothosware/SoapyRTLSDR
  rtl=0

----------------------------------------------------
-- Peripheral summary
----------------------------------------------------
  Channels: 1 Rx, 0 Tx
  Timestamps: NO
  Other Settings:
     * Direct Sampling - RTL-SDR Direct Sampling Mode
       [key=direct_samp, default=0, type=string, options=(0, 1, 2)]
     * Offset Tune - RTL-SDR Offset Tuning Mode
       [key=offset_tune, default=false, type=bool]
     * I/Q Swap - RTL-SDR I/Q Swap Mode
       [key=iq_swap, default=false, type=bool]

----------------------------------------------------
-- RX Channel 0
----------------------------------------------------
  Full-duplex: YES
  Supports AGC: YES
  Stream formats: CS8, CS16, CF32
  Native format: CS8 [full-scale=128]
  Stream args:
     * Buffer Size - Number of bytes per buffer, multiples of 512 only.
       [key=bufflen, units=bytes, default=262144, type=int]
     * Ring buffers - Number of buffers in the ring.
       [key=buffers, units=buffers, default=15, type=int]
     * Async buffers - Number of async usb buffers (advanced).
       [key=asyncBuffs, units=buffers, default=0, type=int]
  Antennas: RX
  Full gain range: [0, 49.6] dB
    TUNER gain range: [0, 49.6] dB
  Full freq range: [23.999, 1764] MHz
    RF freq range: [24, 1764] MHz
    CORR freq range: [-0.001, 0.001] MHz
  Sample rates: 0.25, 1.024, 1.536, 1.792, 1.92, 2.048, 2.16, 2.56, 2.88, 3.2 MSps

satnogs_rx_device is now obsolete. In the upcoming release it will be removed. Use the satnogs_soapy_rx_device instead. The satnogs_soapy_rx_device accepts any valid Soapy device factory. For your case you should specify driver=rtlsdr.

IF and BB gains are also obsolete and there is only the RF gain setting. The available range of gain values can be retrieved with SoapySDRUtil.

You should also specify the antenna at the corresponding field. Again SoapySDRUtil is your friend. In you RTL case you should specify RX.

Your next issue is the sampling rate. As you can see, 48000 is not a valid RTL sampling rate. Use one of the supported. 1024e3 and 2048e3 are working pretty well.

2 Likes

Im having the same issue I think? Im not sure what value i am supposed to put into satnogs_soapy_rx_device ? 2.048? the actual value 2048e3 gives me an attribute error:

I did an update that caused the system to fail in the same way above. Had to get on the roof in order to dismantle and redo the entire setup from scratch. I thought it was a driver issue but the above seems to be where the issue was.

To install SoapySDRUtil (with rtl-sdr v3 and pi 3 B+)
sudo apt-get install rtl-sdr soapysdr-module-rtlsdr
sudo apt-get install soapysdr-tools
SoapySDRUtil --probe

SoapySDRUtil --probe
######################################################
##     Soapy SDR -- the SDR abstraction library     ##
######################################################

Probe device 
Found Rafael Micro R820T tuner
Found Rafael Micro R820T tuner

----------------------------------------------------
-- Device identification
----------------------------------------------------
  driver=RTLSDR
  hardware=R820T
  origin=https://github.com/pothosware/SoapyRTLSDR
  rtl=0

----------------------------------------------------
-- Peripheral summary
----------------------------------------------------
  Channels: 1 Rx, 0 Tx
  Timestamps: NO
  Other Settings:
     * Direct Sampling - RTL-SDR Direct Sampling Mode
       [key=direct_samp, default=0, type=string, options=(0, 1, 2)]
     * Offset Tune - RTL-SDR Offset Tuning Mode
       [key=offset_tune, default=false, type=bool]
     * I/Q Swap - RTL-SDR I/Q Swap Mode
       [key=iq_swap, default=false, type=bool]
     * Digital AGC - RTL-SDR digital AGC Mode
       [key=digital_agc, default=false, type=bool]

----------------------------------------------------
-- RX Channel 0
----------------------------------------------------
  Full-duplex: YES
  Supports AGC: YES
  Stream formats: CS8, CS16, CF32
  Native format: CS8 [full-scale=128]
  Stream args:
     * Buffer Size - Number of bytes per buffer, multiples of 512 only.
       [key=bufflen, units=bytes, default=262144, type=int]
     * Ring buffers - Number of buffers in the ring.
       [key=buffers, units=buffers, default=15, type=int]
     * Async buffers - Number of async usb buffers (advanced).
       [key=asyncBuffs, units=buffers, default=0, type=int]
  Antennas: RX
  Full gain range: [0, 49.6] dB
    TUNER gain range: [0, 49.6] dB
  Full freq range: [23.999, 1764] MHz
    RF freq range: [24, 1764] MHz
    CORR freq range: [-0.001, 0.001] MHz
  Sample rates: 0.25, 1.024, 1.536, 1.792, 1.92, 2.048, 2.16, 2.56, 2.88, 3.2 MSps

If you’re seeing the audio device with SoapySDRUtil --probe with a 0, 0 gain range and sample rates stopping at 0.096 MSps, try:

SoapySDRUtil --find=["driver=rtlsdr"]

On my system, I usually get four devices with driver set to audio, remote, and rtlsdr. The one with rtlsdr is device 3. So, I can probe:

SoapySDRUtil --probe=["driver=rtlsdr,device_id=3"]

… and at last see the expected RX Channel 0 with:

  Antennas: RX
  Full gain range: [0, 49.6] dB
    TUNER gain range: [0, 49.6] dB
  Full freq range: [23.999, 1764] MHz
    RF freq range: [24, 1764] MHz
    CORR freq range: [-0.001, 0.001] MHz
  Sample rates: 0.25, 1.024, 1.536, 1.792, 1.92, 2.048, 2.16, 2.56, 2.88, 3.2 MSps
  Filter bandwidths: [0, 8] MHz

I’ve set my config accordingly:

SATNOGS_SOAPY_RX_DEVICE="rtlsdr,device_id=3"
SATNOGS_RX_SAMP_RATE="2.048e6"
SATNOGS_RF_GAIN="30"
SATNOGS_ANTENNA="RX"

Et voilà, observation 7419037. To be fair, it’s a terrible observation, because I’m using the wrong equipment for this test. But, I’m sure happy I got this basic part of the configuration nutted out.

1 Like