charlie-foxtrot / RTLSDR-Airband

Multichannel AM/NFM demodulator
GNU General Public License v3.0
736 stars 133 forks source link

[BUG] RTLSDR v4 no audio/signal #443

Open hypeARM opened 6 months ago

hypeARM commented 6 months ago

Describe your environment

What happened?

RTLSDR v4 that doesn't output audio/signal

What you expected to happen?

It doesn't work as it should, there is simply no signal

Steps to Reproduce

Compile as described and see if it works correctly, there is no audio here

Additional context

Recently the RTLSDRBlog driver was updated, so it's good to check the repository "github.com/rtlsdrblog/rtl-sdr-blog"

It was also tested with the SoapySDR driver, the same problem remained, no audio/signal in stream

Your rtl_airband.conf file


localtime = true;
stats_filepath = "/tmp/rtl_airband_stats.txt";
multiple_demod_threads = true;
pidfile = "/var/tmp/rtl_airband.pid";
log_scan_activity = false;
devices:
({
  type = "rtlsdr";
  serial = "00000001"
  gain = 12.5;
  correction = 0;
  mode = "scan";
  sample_rate = 2.4;
  channels:
  (
    {
      freqs = ( 118.300, 128.950 );
      labels = ( "SBJP Tower", "SBRF Approach" );
      modulation = "am";
      lowpass = 2500;
      highpass = 150;
      outputs: (
        {
        type = "icecast";
        server = "localhost";
        port = 8000;
        mountpoint = "airband";
        genre = "ATC";
        name = "Airband";
        username = "source";
        password = "hackme";
        send_scan_freq_tags = false;
        shout_metadata_delay = 3;
        }
      );
    }
  );
 }
);
charlie-foxtrot commented 6 months ago

To isolate the problem I would recommend starting with the following:

  1. Verify your hardware setup is good, for example https://github.com/charlie-foxtrot/RTLSDR-Airband/wiki/Troubleshooting#visualizing-rf-spectrum
  2. Output to a local file (not just icecast) to eliminate icecast issues
  3. Instead of scan, configure a single channel, ideally something with lots of activity
hypeARM commented 6 months ago

Hi Charlie,

  1. Verify your hardware setup is good. βœ… but this is a R828D Tuner

  2. Output to a local file (not just icecast) to eliminate icecast issues ❌ _no signal /

only noise, with 0, 12 and 36 gain settings with ATIS frequency tested on attached video_

https://github.com/charlie-foxtrot/RTLSDR-Airband/assets/63026676/f250a711-d854-44ef-8d3e-5e05f746e438

  1. Instead of scan, configure a single channel, ideally something with lots of activity ❌ _no signal, only noise, see details rtl_airbandstats details

Squelch signal_level as dBFS & Squelch noise_level as dBFS, It looks like there is no antenna, but the antenna is connected.


# HELP channel_activity_counter Loops of output_thread with frequency active.
# TYPE channel_activity_counter counter
channel_activity_counter{freq="127.650",label="SBRF ATIS"}  0

# HELP channel_noise_level Raw squelch noise_level.
# TYPE channel_noise_level gauge
channel_noise_level{freq="127.650",label="SBRF ATIS"}   0.051

# HELP channel_dbfs_noise_level Squelch noise_level as dBFS.
# TYPE channel_dbfs_noise_level gauge
channel_dbfs_noise_level{freq="127.650",label="SBRF ATIS"}  -50.768

# HELP channel_signal_level Raw squelch signal_level.
# TYPE channel_signal_level gauge
channel_signal_level{freq="127.650",label="SBRF ATIS"}  0.053

# HELP channel_dbfs_signal_level Squelch signal_level as dBFS.
# TYPE channel_dbfs_signal_level gauge
channel_dbfs_signal_level{freq="127.650",label="SBRF ATIS"} -50.423

# HELP channel_squelch_counter Squelch open_count.
# TYPE channel_squelch_counter counter
channel_squelch_counter{freq="127.650",label="SBRF ATIS"}   0

# HELP channel_squelch_level Squelch squelch_level.
# TYPE channel_squelch_level gauge
channel_squelch_level{freq="127.650",label="SBRF ATIS"} 0.153

# HELP channel_flappy_counter Squelch flappy_count.
# TYPE channel_flappy_counter counter
channel_flappy_counter{freq="127.650",label="SBRF ATIS"}    0

# HELP channel_ctcss_counter count of windows with CTCSS detected.
# TYPE channel_ctcss_counter counter
channel_ctcss_counter{freq="127.650",label="SBRF ATIS"} 0

# HELP channel_no_ctcss_counter count of windows without CTCSS detected.
# TYPE channel_no_ctcss_counter counter
channel_no_ctcss_counter{freq="127.650",label="SBRF ATIS"}  0

# HELP buffer_overflow_count Number of times a device's buffer has overflowed.
# TYPE buffer_overflow_count counter
buffer_overflow_count{device="0"}   0

# HELP output_overrun_count Number of times a device or mixer output has overrun.
# TYPE output_overrun_count counter
output_overrun_count{device="0"}    0
charlie-foxtrot commented 6 months ago

I haven't used a v4 dongle myself but @remsiux got it working in #439

It looks like your hardware verification test was done on windows but you're running rtl_airband on a pi? To make sure the drivers are working on the pi I would recommend doing rtl_tcp on the pi to stream over the network, then observing the waterfall from windows. This will ensure the pi is seeing signal before introducing rtl_airband.

hypeARM commented 6 months ago

rtl_airband running on a native x86_64 w/ Debian GNU/Linux 12 (bookworm) "Dietpi"

image

Disregard frequency shown on screen, terminal print was taken before photo of the SDR Console change frequency. πŸ‘

image

Work fine with rtl_tcp

hypeARM commented 6 months ago

additionally I tested rtl_fm with input to ffmpeg and mp3 streaming with icecast server and it worked well!

charlie-foxtrot commented 6 months ago

Starting to run out of "easy" answers.....

Has this worked on a different SDR? Ie is this a v4 vs v3 issue?

You're running a 64-bit version of DietPi? What hardware is this on?

Is this just the base OS plus v4 drivers or are there other packages installed?

Instead of using the device serial number, can you try 'index = 0;'?

hypeARM commented 6 months ago

Has this worked on a different SDR? Ie is this a v4 vs v3 issue?

Work with V3, but V4 has not signal/audio

You're running a 64-bit version of DietPi? What hardware is this on?

image image

Is this just the base OS plus v4 drivers or are there other packages installed?

Reinstalled, also tested with Ubuntu, V4 dongle remained without signal/audio

Instead of using the device serial number, can you try 'index = 0;'?

Yes, V4 dongle is detected by RTLSDR-Airband, but there is no audio/signal, as reported by remsiux

Apparently it's a bug, but you won't be able to reproduce this without having a V4 dongle 😒

charlie-foxtrot commented 6 months ago

Make sure you don't have the standard librtlsdr installed. If you do, or the OS you're using comes with it, make sure to remove and fully clean up first.

Make sure you aren't installing package(s) that are pulling in the standard librtlsdr. If you are, use the Alternative Debian Package Installation Method before installing those packages so the standard one isn't pulled in.

Make sure you're compiling against and linking to the custom librtlsdr.

I was able to start with a clean docker container on x86_64, install just the https://github.com/rtlsdrblog/rtl-sdr-blog version plus the rtl_airband dependencies, compile rtl_airband, then run on both a v3 and v4 in parallel on the same frequencies and get equivalent audio.

When running rtl_airband in the foreground I noticed a message RTL-SDR Blog V4 Detected that may help confirm you're building / linking against the right version of librtlsdr.

$ /opt/rtl_airband/rtl_airband -f
Found Rafael Micro R828D tuner
RTL-SDR Blog V4 Detected
Found Rafael Micro R820T tuner