Skip to content
forked from racerxdl/limedrv

LimeSuite Wrapper on Go (Driver for LimeSDR Devices)

License

Notifications You must be signed in to change notification settings

myriadrf/limedrv

 
 

Repository files navigation

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 myriadrf/LimeSuite#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.

About

LimeSuite Wrapper on Go (Driver for LimeSDR Devices)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 62.0%
  • C 37.9%
  • Other 0.1%