jketterl / owrx_connector

direct conection layer for openwebrx
GNU General Public License v3.0
21 stars 18 forks source link

Please add support for airsphf+ / airspyhf discovery #2

Closed gymnae closed 4 years ago

gymnae commented 4 years ago

The airspyhf+ has its own SoapySDR module: https://github.com/pothosware/SoapyAirspyHF/wiki and only works with CF32:

$ soapy_connector 
Tuner gain set to 0.00 dB.
IQ worker thread started
socket setup complete, waiting for connections
SoapySDRDevice_setupStream failed: setupStream invalid format 'CS16' -- Only CF32 is supported by SoapyAirspyHF module.
Author contact info:    Andras Retzler, HA7ILM <randras@sdr.hu>
Author contact info:    Jakob Ketterl, DD5JFK <dd5jfk@darc.de>

2019-12-03 22:46:11,215 - owrx.source - INFO - SDR sources loaded. Availables SDRs: SDRPlay RSP1
2019-12-03 22:46:14,400 - owrx.connection - DEBUG - client connection intitialized
2019-12-03 22:46:14,408 - owrx.source - DEBUG - activating profile 70cm
2019-12-03 22:46:14,418 - owrx.source - INFO - Started rtl source: soapy_connector -p 4950 -c 48617 -s None -f 438800000 -g "0" -P 0 -a "None"
Tuner gain set to 0.00 dB.
IQ worker thread started
SoapySDRDevice_setupStream failed: setupStream invalid format 'CS16' -- Only CF32 is supported by SoapyAirspyHF module.
socket setup complete, waiting for connections
setting up control socket...
control socket started on 48617
client connection establised
2019-12-03 22:46:14,521 - owrx.source - DEBUG - opening control socket...
control connection established
2019-12-03 22:46:14,522 - owrx.source - DEBUG - received STATE_RUNNING, attempting DspSource restart
2019-12-03 22:46:14,523 - owrx.websocket - DEBUG - websocket loop ended; shutting down
2019-12-03 22:46:14,523 - owrx.websocket - DEBUG - websocket loop ended; sending close frame
----------------------------------------
Exception happened during processing of request from ('192.168.1.223', 59161)
Traceback (most recent call last):
  File "/usr/lib64/python3.6/socketserver.py", line 654, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib64/python3.6/socketserver.py", line 364, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/home/sdr/openwebrx/jketterl/owrx/http.py", line 25, in __init__
    super().__init__(request, client_address, server)
  File "/usr/lib64/python3.6/socketserver.py", line 724, in __init__
    self.handle()
  File "/usr/lib64/python3.6/http/server.py", line 418, in handle
    self.handle_one_request()
  File "/usr/lib64/python3.6/http/server.py", line 406, in handle_one_request
    method()
  File "/home/sdr/openwebrx/jketterl/owrx/http.py", line 31, in do_GET
    self.router.route(self)
  File "/home/sdr/openwebrx/jketterl/owrx/http.py", line 74, in route
    controller(handler, request).handle_request()
  File "/home/sdr/openwebrx/jketterl/owrx/controllers.py", line 155, in handle_request
    conn.handle()
  File "/home/sdr/openwebrx/jketterl/owrx/websocket.py", line 154, in handle
    self.read_loop()
  File "/home/sdr/openwebrx/jketterl/owrx/websocket.py", line 202, in read_loop
    self.messageHandler.handleTextMessage(self, message)
  File "/home/sdr/openwebrx/jketterl/owrx/connection.py", line 330, in handleTextMessage
    client = OpenWebRxReceiverClient(conn)
  File "/home/sdr/openwebrx/jketterl/owrx/connection.py", line 88, in __init__
    self.setSdr()
  File "/home/sdr/openwebrx/jketterl/owrx/connection.py", line 168, in setSdr
    self.startDsp()
  File "/home/sdr/openwebrx/jketterl/owrx/connection.py", line 204, in startDsp
    self.dsp = DspManager(self, self.sdr)
  File "/home/sdr/openwebrx/jketterl/owrx/source.py", line 797, in __init__
    self.sdrSource.addClient(self)
  File "/home/sdr/openwebrx/jketterl/owrx/source.py", line 319, in addClient
    self.start()
  File "/home/sdr/openwebrx/jketterl/owrx/source.py", line 278, in start
    self.setState(SdrSource.STATE_FAILED if self.failed else SdrSource.STATE_RUNNING)
  File "/home/sdr/openwebrx/jketterl/owrx/source.py", line 358, in setState
    c.onStateChange(state)
  File "/home/sdr/openwebrx/jketterl/owrx/source.py", line 836, in onStateChange
    self.dsp.start()
  File "/home/sdr/openwebrx/jketterl/csdr.py", line 611, in start
    command_base = " | ".join(self.chain(self.demodulator))
  File "/home/sdr/openwebrx/jketterl/csdr.py", line 141, in chain
    if self.decimation > 1:
AttributeError: 'dsp' object has no attribute 'decimation'
----------------------------------------
2019-12-03 22:46:15,552 - owrx.connection - DEBUG - client connection intitialized
2019-12-03 22:46:15,558 - owrx.websocket - DEBUG - websocket loop ended; shutting down
2019-12-03 22:46:15,558 - owrx.websocket - DEBUG - websocket loop ended; sending close frame
2019-12-03 22:46:15,559 - owrx.websocket - ERROR - ValueError while writing data
Traceback (most recent call last):
  File "/home/sdr/openwebrx/jketterl/owrx/websocket.py", line 131, in _sendBytes
    (_, write, _) = select.select([], [self.handler.wfile], [], 10)
ValueError: file descriptor cannot be a negative integer (-1)
jketterl commented 4 years ago

oh wow, an i thought i had all the airspys covered. well then, that shouldn't be too hard, since i'm already converting to CF32 internally, since that's the format used by openwebrx. i'll update this ticket by the time i have something, since i don't have hardware to test.

jketterl commented 4 years ago

alright, I just connected the discovery, and tested it out. Works perfectly with the cf32 modifictations, so i have merged the branch to master. closing :slightly_smiling_face: