hb9fxq / flexlib-go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

flexlib-go

Multi platform tools to interact with flexradio 6k series radio.

Currently, any tools, except the MQTT adapter require an instance of SmartSDR Windows/OSX/IOS to be running. DAX and DAX IQ Data is currently not "headless".

Installation

Option A) Binary Download

Option B) Install from source

go get -u github.com/hb9fxq/flexlib-go/cmd/smartsdr-iqtransfer
go get -u github.com/hb9fxq/flexlib-go/cmd/smartsdr-mqttadapter
go get -u github.com/hb9fxq/flexlib-go/cmd/smartsdr-daxclient

Tools

Binary "smartsdr-iqtransfer"

Tool to transfer DAX IQ data from a FRS 6K Radio to any platform.

When you run smartsdr-iqtransfer, make sure, that you select the matching DAX IQ channel in Smartsdr.

fCenter is the center of the GUI Panadapter, it can be set via argument '--FCENTER' or changed while running by typing to stdin.

Options:

  • RADIO IP address of the radio
  • MYUDP UDP port on local machine that the radio will send VITA49 traffic. Must be a free port on your machine. Check your firewall!
  • CH DAX-IQ channel to stream.
  • FWD (Optional) Endpoint to send the Float32 IQ data to. If not supplied, the data is written to stdout and can be used for piping. You can find a sample for GNU Radio under https://github.com/hb9fxq/flexlib-go/tree/master/GRC/iq-transfer
  • RATE SampleRate in kHz, Possible Values: 24000 48000 96000 192000
  • FCENTER (Optional) Initially tune panadapter to fCenter in MHz, e.g. 7.1

e.g.

Send raw IQ data 127.0.0.1:2345

./smartsdr-iqtransfer --RADIO=192.168.92.8 --MYUDP=5999 --RATE=192000 --CH=1 --FCENTER=7.1 --FWD=127.0.0.1:2345

record IQ Data to a file

./smartsdr-iqtransfer  --RADIO=192.168.92.8 --MYUDP=5999 --RATE=192000 --CH=1 --FCENTER=7.1 --FWD=127.0.0.1:2345 > "$(date +"%FT%T").raw"

alt text

Binary "smartsdr-daxclient"

Receives RAW DAX audio streams (RX Channels 1-6)

Options:

  • RADIO IP address of the radio
  • MYUDP UDP port on local machine that the radio will send VITA49 traffic. Must be a free port on your machine. Check your firewall!
  • CH DAX audio channel to stream.
  • FWD Endpoint to send the Float32 IQ data to. If not supplied, the data is written to stdout and can be used for piping. You can find a sample for GNU Radio under https://github.com/hb9fxq/flexlib-go/tree/master/GRC/iq-transfer

e.g. Forward raw DAX audio stream from channel 1 to a computer on the network (FWD)

./smartsdr-daxclient --RADIO=192.168.92.8 --MYUDP=5999 --CH=1 --FWD=127.0.0.1:2345

LiveStream via ffmpeg with libopus transcoding

ffmpeg -flags low_delay -fflags nobuffer -f f32be -ar 24000 -ac 2 -i udp://127.0.0.1:2345 -acodec libopus -ar 24000 -f rtp rtp://127.0.0.1:1234 -sdp_file daxslice.sdp

Play RAW audio to the speaker. 2 Channels, 32 Bit float, big endian

socat -u udp-recv:2345 - | play -q -t f32 -r 24k --endian big -c 2 -

alt text

Binary "smartsdr-mqttadapter"

Tool to reflect most important radio status, like Slices, Panadapters and connected clients to a MQTT broker. Useful for status monitoring, dashboards or advanced radio integration.

./smartsdr-mqttadapter --RADIO=192.168.92.8 --MQTTBROKER=tcp://192.168.92.7:1883 --MQTTCLIENTID=flexdev --MQTTTOPIC=flexdev

alt text

Some experiments

The library is currently able to parse most of the VITA 49 types, that the FRS is using...

SoapySDR Module draft version based on flexlib-go with CGO bindings: IMAGE ALT TEXT HERE

Reconstructed waterfall tile data from pcap:

alt text

Reconstructed opus audio from pcap:

https://soundcloud.com/frank-werner-hb9fxq-14069568/opus-decoded

Reconstructed FFT Plot (all captured fft points aggregated)

alt text

About


Languages

Language:Go 82.9%Language:Python 13.1%Language:Shell 4.0%