Megan Moscony – Software Engineer

Most Deepwave customers leverage our Python programming interface to interact with our Artificial Intelligence Radio Transceiver (AIR-T), but did you know that you can also program the radio using the Go programming language? Because we leverage SoapySDR, a vendor and platform neutral software defined radio (SDR) support library, customers are able to use Go bindings. We are happy to announce that we have created a source code tutorial on how to use the Go programming language to perform spectral analysis with the AIR-T.
While Python is a great language for solving data science problems and implementing easy to understand code for software defined radios, Go has the added benefit of supporting concurrency and is used widely for system programming. According to go.dev: “Go was created at Google in 2007, and since then, engineering teams across Google have adopted Go to build products and services at massive scale.”
Here is a short snippet of code for setting up and reading from the AIR-T:
//Initialize the AIR-T
args := map[string]string{"driver": "SoapyAIRT"}
dev, err := device.Make(args)
// Set radio settings
dev.SetSampleRate(device.DirectionRX, rx_chan, fs)
dev.SetFrequency(device.DirectionRX, rx_chan, freq, nil)
dev.SetGainMode(device.DirectionRX, rx_chan, use_agc)
// Activate the radio and define buffer
s, err := dev.SetupSDRStreamCS16(device.DirectionRX, []uint{0}, nil)
buff := make([][]int16, 1)
buff[rx_chan] = make([]int16, 2*N)
// Read the data
timeNs, numElemsRead, err := s.Read(buff, N, flags, timeout_us)
The full tutorial with source code may be found in our documentation and tutorials here. In this tutorial, the Deepwave team walks you through installing Go on the embedded SDR, interfacing with the radio, and performing signal processing on the received samples. The output plot is shown below.
Contact us or one of our distributors for more information on our product line.
