Categorygithub.com/myriadrf/limedrv
modulepackage
0.0.0-20210219032128-f4b5cc97de4d
Repository: https://github.com/myriadrf/limedrv.git
Documentation: pkg.go.dev

# README

Build Status Apache License Go Report

limedrv

LimeSuite Wrapper on Go (Driver for LimeSDR Devices)

Usage

So far I need to do all the comments for the methods (since go auto-generates the documentation). But while I do that, you can check the examples. The documentation is available at: https://godoc.org/github.com/myriadrf/limedrv

Examples

So far there is a functional WBFM Radio that uses SegDSP for demodulating. You can check it at _examples/limefm. To compile, just go to the folder and run:

go build

It will generate a limefm executable in the folder. It outputs the raw Float32 audio into stdout. For example, you can listen to the radio by using ffplay:

./limefm -antenna LNAL -centerFrequency 106300000 -channel 0 -gain 0.5 -outputRate 48000 | ffplay -f f32le -ar 48k -ac 1 -

There is also a FFT Generator in fftaverage folder. The parameters need to be set in the code, but it does generate a nice JPEG with the FFT.

Static Linking

Since libLimeSuite doesn't generate static libraries by default (see https://github.com/myriadrf/LimeSuite/issues/241), you should manually compile it to provide the libLimeSuite.a thats needed for static linking.

You can just do the normal LimeSuite build with -DBUILD_SHARED_LIBS=OFF to statically build LimeSuite (that does not break current dynamic linked stuff)

# Assumes in libLimeSuite folder
cmake .. -DBUILD_SHARED_LIBS=OFF
make -j8
sudo make install

Then you can change the limewrap.go line with the linking definition from:

#cgo LDFLAGS: -lLimeSuite

to

#cgo LDFLAGS: -l:libLimeSuite.a -l:libstdc++.a -lm -lusb-1.0

And then compile normally your application. The libLimeSuite should be embedded inside your executable.

# Packages

No description provided by the author

# Functions

Close closes a LMSDevice.
GetDevices return an array of available devices in the LMS7 driver.
Open opens a device specified by a DeviceInfo instance and returns a reference to LMSDevice.

# Constants

TX Antennas.
Preset of Antenna Names to be used in SetAntennaByName.
ChannelA represents the ID of Channel A in LMS Devices ( = 0 ).
ChannelB represents the ID of Channel B in LMS Devices ( = 1 ).
Loopback Antennas (works for both RX and TX).
Preset of Antenna Names to be used in SetAntennaByName.
Preset of Antenna Names to be used in SetAntennaByName.
Preset of Antenna Names to be used in SetAntennaByName.
RX Antennas.
Not connected.

# Variables

FormatFloat32 defines the output of LMS Device to have samples using 32 bit float.
FormatInt12 defines the output of LMS Device to have samples using 12 bit int.
FormatInt16 defines the output of LMS Device to have samples using 16 bit int.

# Structs

DeviceInfo is a struct with driver information required to open a connection.
LMSAntenna is a struct that represents the Antenna Port information.
LMSChannel is the struct that represents a Channel from a LMSDevice.
LMSDevice is a class representing a Open LimeSDR Device.
LMSDeviceAdvanced is a dummy structure just to separated the methods considered for "Advanced Usage" It does not have any data besides the methods to allow advanced settings of LMSDevice object.