jbrzusto / sensorgnome

master control process for a sensorgnome receiver
GNU General Public License v2.0
1 stars 2 forks source link

killing rtl_tcp doesn't turn off streaming, so power consumption of rtlsdr stays high #22

Open jbrzusto opened 7 years ago

jbrzusto commented 7 years ago

Killing rtl_tcp cleanly does shut down rtlsdr digitizing, so sends power consumption back to normal. It depends how rtl_tcp is killed. In normal operation, harnessed to vamp-alsa-host, killing vamp-alsa-host eventually causes each rtl_tcp to die cleanly, shutting down digitizing. However, killing nodejs does not do a clean kill of rtl_tcp (even though it is a faster kill), and leaves power consumption high.

In general, none of this should matter in the field, but it might indicate a bug that would.

Debugging Log

This was capture with stderr redirected. Note that the command listener thread exists, but the tcp thread doesn't, and the main thread is killed (not sure why) while it's waiting on the latter, apparently.

Found 3 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000001 usb 1:22
  1:  Realtek, RTL2838UHIDIR, SN: 00000001 usb 1:23
  2:  Realtek, RTL2838UHIDIR, SN: 00000001 usb 1:19

Using device 70400: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
[R82XX] PLL not locked!
Tuned to 100000000 Hz.
Found 3 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000001 usb 1:22
  1:  Realtek, RTL2838UHIDIR, SN: 00000001 usb 1:23
  2:  Realtek, RTL2838UHIDIR, SN: 00000001 usb 1:19

Using device 71424: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
[R82XX] PLL not locked!
Tuned to 100000000 Hz.
Found 3 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000001 usb 1:22
  1:  Realtek, RTL2838UHIDIR, SN: 00000001 usb 1:23
  2:  Realtek, RTL2838UHIDIR, SN: 00000001 usb 1:19

Using device 71168: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
[R82XX] PLL not locked!
Tuned to 100000000 Hz.
start streaming i/q samples
start streaming i/q samples
start streaming i/q samples
stop streaming i/q samples
Signal 2 caught, exiting!
stop streaming i/q samples
Signal 2 caught, exiting!
stop streaming i/q samples
Signal 2 caught, exiting!
comm recv bye
Signal 0 caught, exiting!
comm recv bye
Signal 0 caught, exiting!
comm recv bye
Signal 0 caught, exiting!