Json post and web server

As I can see here the code supports posting the data (for one VFO i.e this function is called only for one VFO) to a server. And there is a middleware http server. How is this server is used from kraken SDR? Also, what is the purpose of the websocket server too? As I have seen, the GUI communicates with the SignalProcessor using queue.

The middleware is used to communicate with map.krakenrf.com. You can also make use of it to connect to your own similar custom mapping projects. The kraken code communicates the json data with the middleware via the websocket.

Thank you. However, this json utility (wr_json function) is only for one VFO correct? Also, the middeware server is always running and I can get the DoA data/estimations using for example curl? Could I lose estimations? Indeed, I want to transfer the DoA estimations from the krakenRF code to a server (without losing any estimation) but I was thinking to build a POST from krakenRF code to server each time there is an estimation. The server then will write these estimation in a database. From your answer is not very clear if this is already supported.

Edit: As I can see the flow is: Kraken DSP sends the DoA estimation each time arises (only done when one VFO) to the middleware server via socket in port 8042. Then the middleware server sends the estimation to a third party mapping tool (like map.krakenrf.com) via websocket only if doaInterval has passed (which means that some estimation may not reach the mapping tool). Correct?

Yes only one VFO at the moment. We are planning on soon extending it to support multiple VFOs however.

If you run using the provided scripts, the middleware is always running.

You can either connect to the middleware websocket and get data that way, or simply poll the krakensdr:8081.DOA_value.html page, which provides data for all the VFOs.

Some estimations can indeed be lost if you do not poll fast enough. But as long as you poll faster than the KrakenSDR update rate (which by default is 436 ms), then you won’t lose anything.

1 Like

Thank you. Can I disable the middleware?

Yep just edit gui_run.sh in the krakensdr_doa/krakensdr_doa folder and comment out the last line that starts the middleware.

1 Like

Can I also disable the data out server by commenting this line? I don’t need this functionality (to get the data using the .html file). Will I lose other features if I disable it?

If you don’t need the html page to be accessible, then yes that can be commented. No other functionality is lost.

1 Like