projecthorus / radiosonde_auto_rx

Automatically Track Radiosonde Launches using RTLSDR
GNU General Public License v3.0
476 stars 123 forks source link

Docker image for spyserver@AArch64 #751

Closed 73-de-LZ closed 1 year ago

73-de-LZ commented 1 year ago

Not an issue with Radiosonde_Auto_RX, but with me, could not talk well to Linux, still learning... I tried to run few already built Docker images of Spyserver on Android TV Box H96max, bought used for 30EU. Hardware is Amlogic S905X3 ARM64 SoC 4GB RAM 32GB eMMC, runing CoreELEC-Amlogic-ng.arm-19.5-Matrix. CoreELEC is lightweight Linux distro, it have some pros and cons, but while i am running it also on other weak HW i found only pros. Usually I stop the Kodi service after initial setup and Auto_RX is runing smoothly, even on S905W SoC with few RTL-SDRs on USB ports.

So i want to test Auto_RX with Spyserver with multi reception, but i could not get it to work: started Docker container with Spyserver from https://hub.docker.com/u/compsci282, repo at https://github.com/compsci282/spyserver with this:

docker run \
  -d \
  --name spyserver \
  --restart=unless-stopped \
  --device=/dev/bus/usb \
  -p 5555:5555 \
  -e DEVICE_SAMPLE_RATE=250000 \
  -e INITIAL_FREQUENCY=430000000 \
  -e MAXIMUM_FREQUENCY=450000000 \
  compsci282/spyserver:latest

this is the log from Spyserver:

Found Rafael Micro R820T tuner
Exact sample rate is: 250000.000414 Hz
[R82XX] PLL not locked!
Found Rafael Micro R820T tuner
Exact sample rate is: 250000.000414 Hz
[R82XX] PLL not locked!
Caught signal 15
Terminating...
SPY Server v2.0.1700
Copyright (C) 2016-2018 Youssef Touil - https://airspy.com
Reading the configuration file: /etc/spyserver/spyserver.config
Listening for connections on 0.0.0.0:5555
Accepted client 172.17.0.1:52280 running gr-osmosdr
Device was sleeping. Wake up!
Acquired an RTL-SDR device
Client disconnected: 172.17.0.1:52280
No clients using the device. Sleeping...
Releasing the RTL-SDR device
Accepted client 172.17.0.1:52284 running gr-osmosdr
Device was sleeping. Wake up!
Acquired an RTL-SDR device
Client disconnected: 172.17.0.1:52284
No clients using the device. Sleeping...
Releasing the RTL-SDR device
Accepted client 172.17.0.1:52288 running gr-osmosdr
Device was sleeping. Wake up!
Acquired an RTL-SDR device
Client disconnected: 172.17.0.1:52288
No clients using the device. Sleeping...
Releasing the RTL-SDR device
Accepted client 172.17.0.1:52294 running gr-osmosdr
Device was sleeping. Wake up!
Acquired an RTL-SDR device
Client disconnected: 172.17.0.1:52294
No clients using the device. Sleeping...
Releasing the RTL-SDR device
Accepted client 172.17.0.1:52298 running gr-osmosdr
Device was sleeping. Wake up!
Acquired an RTL-SDR device
Client disconnected: 172.17.0.1:52298
No clients using the device. Sleeping...
Releasing the RTL-SDR device

and this is the log from Auto_RX:

2023-02-14 04:40:06,504 WARNING:Please do not use APRS ports which forward data        out to the wider APRS-IS network and cause network congestion. Switching to defa       ult port of 14590. If you believe this to be in error, please raise an issue at        https://github.com/projecthorus/radiosonde_auto_rx/issues
2023-02-14 04:40:07,691 CRITICAL:SpyServer (localhost:5555) - ss_iq call failed        with return code 134.
2023-02-14 04:40:07,691 CRITICAL:Config - Could not contact SpyServer localhost:       5555. Exiting.
2023-02-14 04:40:07,692 CRITICAL:Error in configuration file! Exiting...
2023-02-14 04:41:34,048 INFO:Reading configuration file...
2023-02-14 04:41:34,063 WARNING:Config - Web Password not set, disabling web con       trol
2023-02-14 04:41:34,063 WARNING:Please do not use APRS ports which forward data        out to the wider APRS-IS network and cause network congestion. Switching to defa       ult port of 14590. If you believe this to be in error, please raise an issue at        https://github.com/projecthorus/radiosonde_auto_rx/issues
2023-02-14 04:41:35,255 CRITICAL:SpyServer (localhost:5555) - ss_iq call failed        with return code 134.
2023-02-14 04:41:35,256 CRITICAL:Config - Could not contact SpyServer localhost:       5555. Exiting.
2023-02-14 04:41:35,256 CRITICAL:Error in configuration file! Exiting...

and this is log from bash in spyserver:

root@a457775175d6:/# rtl_test -t
Found 1 device(s):
  0:  Realtek, 18_Red, SN: 18

Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Supported gain values (29): 0.0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28.0 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6
[R82XX] PLL not locked!
Sampling at 2048000 S/s.
No E4000 tuner found, aborting.
root@a457775175d6:/#

Now I put one RTL with Elonics4000 tuner and Spyserver seems to be running, but I keep getting this from Auto_RX: CRITICAL:SpyServer (localhost:5555) - ss_iq call failed with return code 134. Is there any way to test the SpyServer with CLI from the used SpyServer_client ?

Also I would like to ask if somebody could make a prebuilt Docker image to run with RTL-SDR on center frequency somewhere in the sonde band.

Thanks for all efforts.

P.S. Updated info: The same Spyserver Docker image is tested with SDR# and it is working, so i put it on another HW in local network. Again tested with SDR# OK. So now Spyserver is on one platform and Auto_RX on another S905X3. When i try to connect from Auto_RX 1.6.0 installed from Docker :testing repo, i get this again:

2023-02-14 21:03:32,119 CRITICAL:Error in configuration file! Exiting...
2023-02-14 21:03:36,483 INFO:Reading configuration file...
2023-02-14 21:03:37,550 CRITICAL:SpyServer (10.10.111.10:5555) - ss_iq call failed with return code 134.
2023-02-14 21:03:37,551 CRITICAL:Config - Could not contact SpyServer 10.10.111.10:5555. Exiting.
2023-02-14 21:03:37,551 CRITICAL:Error in configuration file! Exiting...
2023-02-14 21:03:43,627 INFO:Reading configuration file...
2023-02-14 21:03:44,697 CRITICAL:SpyServer (10.10.111.10:5555) - ss_iq call failed with return code 134.
2023-02-14 21:03:44,698 CRITICAL:Config - Could not contact SpyServer 10.10.111.10:5555. Exiting.
2023-02-14 21:03:44,698 CRITICAL:Error in configuration file! Exiting...
2023-02-14 21:03:53,956 INFO:Reading configuration file...
2023-02-14 21:03:55,019 CRITICAL:SpyServer (10.10.111.10:5555) - ss_iq call failed with return code 134.
2023-02-14 21:03:55,019 CRITICAL:Config - Could not contact SpyServer 10.10.111.10:5555. Exiting.
2023-02-14 21:03:55,020 CRITICAL:Error in configuration file! Exiting...

SpyServer strted with:

docker run \
  -d \
  --name spyserver \
  --restart=unless-stopped \
  --device=/dev/bus/usb \
  --network=host \
  -e BIND_HOST=127.0.0.1 \
  -e BIND_PORT=5555 \
  -e LIST_IN_DIRECTORY=0 \
  -e MAXIMUM_CLIENTS=5 \
  -e ALLOW_CONTROL=1 \
  -e DEVICE_TYPE=RTL-SDR \
  -e DEVICE_SERIAL=0 \
  -e MAXIMUM_BANDWIDTH=2000000 \
  -e DEVICE_SAMPLE_RATE=2400000 \
  -e FORCE_8BIT=1 \
  -e INITIAL_FREQUENCY=401500000 \
  -e MINIMUM_FREQUENCY=400100000 \
  -e MAXIMUM_FREQUENCY=403000000 \
  -e RTL_SAMPLING_MODE=0 \
  -e BUFFER_COUNT=10 \
  compsci282/spyserver:latest
darksidelemm commented 1 year ago

Auto_rx is telling you that it can't connect to the spyserver for whatever reason. This is likely going to be something to do with docker networking, and auto_rx not being able to communicate into wherever the spyserver is listening.

I don't know anything about that spyserver docker image, so I'm unsure what's going on here.

If you run up auto_rx with the enable_debug_logging set to True ( https://github.com/projecthorus/radiosonde_auto_rx/blob/master/auto_rx/station.cfg.example.network#L449 ) then you'll see what commands are used for each call.