rxseger / rx_tools

rx_fm, rx_power, and rx_sdr tools for receiving data from SDRs, based on rtl_fm, rtl_power, and rtl_sdr from librtlsdr, but using the SoapySDR vendor-neutral SDR support library instead, intended to support a wider range of devices than RTL-SDR
GNU General Public License v2.0
359 stars 69 forks source link

Can't interrupt. rx_fm doesn't stop when sent SIGINT #98

Open marrem opened 2 years ago

marrem commented 2 years ago

Using

` commit 811b21c4c8a592515279bd19f7460c6e4ff0551c (HEAD -> master, origin/master, origin/HEAD) Author: Josh Blum josh@joshknows.com Date: Sun Mar 31 08:49:12 2019 -0500

added version include for setupStream check

`

On debian 11 (VM intel 64) when I press [ctrl]+C rx_fm prints "^CSignal caught, exiting!" but doesn't actually exit. I have to open another terminal to send it a SIGKILL to stop the process.

marc@debian:~$ rx_fm -M wbfm -f 96.8M | play -r 32k
bash: play: command not found
[INFO] [UHD] linux; GNU C++ version 10.2.1 20201207; Boost_107400; UHD_3.15.0.0-4+b1
Using device Audio: device_id=0 origin=https://github.com/pothosware/SoapyAudio 
Found 1 channel(s) :
Channel 0 :
  Found 1 antenna(s): RX 
  Found 0 gain(s): 
  Found 1 frequencies: RF 
  Found 7 sample rates: 8000 16000 22050 32000 44100 48000 96000 
  Found 0 bandwidths: 
[INFO] Using format CS16.
Bandwidth set to automatic resulted in 0 Hz.
Tuned to 97071000 Hz.
Oversampling input by: 6x.
Oversampling output by: 1x.
Buffer size: 8.03ms
Sampling at 1020000 S/s.
Output at 170000 Hz.
^CSignal caught, exiting!
^CSignal caught, exiting!
^CSignal caught, exiting!
^CSignal caught, exiting!
^CSignal caught, exiting!

Same commit of rx_tools on Raspbian GNU/Linux 10 on a RaspberryPi 3B+ exhibits the same behaviour.

marrem commented 2 years ago

Update. I didn't provide the correct device (1,driver=remote (remote SDRPlay)).

But still the same issue with SIGINT:

marc@debian:~/src/rx_tools$ rx_fm -d 1,driver=remote -a A -M wbfm -f 96.8M | play -r 32k -t raw -e s -b 16 -c 1 -V1 -

-: (raw)

 File Size: 0         
  Encoding: Signed PCM    
  Channels: 1 @ 16-bit   
Samplerate: 32000Hz      
Replaygain: off         
  Duration: unknown      

In:0.00% 00:00:00.00 [00:00:00.00] Out:0     [      |      ]        Clip:0    [INFO] devIdx: 0
[INFO] SerNo: 210508C845
[INFO] hwVer: 4
[INFO] rspDuoMode: 0
[INFO] tuner: 1
[INFO] rspDuoSampleFreq: 0.000000
Using device RSPdx: remote:version=0.6.0-gc09b2f10 sdrplay_api_api_version=3.070000 sdrplay_api_hw_version=4 
Found 1 channel(s) :
Channel 0 :
  Found 3 antenna(s): Antenna A Antenna B Antenna C 
  Found 2 gain(s): IFGR RFGR 
  Found 2 frequencies: RF CORR 
  Found 19 sample rates: 62500 96000 125000 192000 250000 384000 500000 768000 1000000 2000000 2048000 3000000 4000000 5000000 6000000 7000000 8000000 9000000 10000000 
  Found 8 bandwidths: 200000 300000 600000 1536000 5000000 6000000 7000000 8000000 
[INFO] SoapyRemote::setupRxStream(remoteFormat=CS16, localFormat=CS16, scaleFactor=32767, mtu=1500, window=44040192)
[INFO] Client side stream bound to [fe80::a00:27ff:fef3:85ff%2]:40136
[INFO] Client side status bound to [fe80::a00:27ff:fef3:85ff%2]:35997
[INFO] Using format CS16.
[INFO] Server side stream bound to [fe80::8cf7:dabf:e539:74a0%2]:36085
[INFO] Server side stream connected to [fe80::a00:27ff:fef3:85ff%2]:40136
[INFO] Server side status connected to [fe80::a00:27ff:fef3:85ff%2]:35997
[INFO] Configured sender endpoint: dgram=1452 bytes, 357 elements @ 4 bytes, window=43008 KiB
[INFO] Client side stream connected to [fe80::8cf7:dabf:e539:74a0%2]:36085
[INFO] Configured receiver endpoint: dgram=1452 bytes, 357 elements @ 4 bytes, window=43008 KiB
Using antenna 'A' on channel 0
Bandwidth set to automatic resulted in 0 Hz.
Tuned to 97071000 Hz.
Oversampling input by: 6x.
Oversampling output by: 1x.
Buffer size: 8.03ms
Sampling at 1020000 S/s.
Output at 170000 Hz.
[WARNING] invalid sample rate. Sample rate unchanged.
In:0.00% 00:00:27.39 [00:00:00.00] Out:868k  [  ====|====  ]        Clip:0    ^CSignal caught, exiting!
^CSignal caught, exiting!
^CSignal caught, exiting!
^CSignal caught, exiting!
^CSignal caught, exiting!