GithubHelp home page GithubHelp logo

babjatom / gortlsdr Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jpoirier/gortlsdr

0.0 0.0 0.0 183 KB

A Go wrapper for librtlsdr (a driver for Realtek RTL2832U based SDR's)

License: BSD 3-Clause "New" or "Revised" License

C 37.02% Go 62.18% Makefile 0.80%

gortlsdr's Introduction

gortlsdr version Build Status Godoc reference Go Report Card BSD3 License

Description

gortlsdr is a simple Go interface to devices supported by the RTL-SDR project, which turns certain USB DVB-T dongles employing the Realtek RTL2832U chipset into a low-cost, general purpose software-defined radio receiver. It wraps all the functions in the librtlsdr library (including asynchronous read support).

Supported Platforms:

  • Linux
  • OS X
  • Windows (with a little work)

Installation

Dependencies

Usage

All functions in librtlsdr are accessible from the gortlsdr package:

go get -u github.com/jpoirier/gortlsdr

Example

See the eample.go file:

go run example.go

Windows

If you don't want to build the librtlsdr and libusb dependencies from source you can use the librtlsdr pre-built package, which includes libusb, but you're restricted to building a 32-bit gortlsdr library.

Building gortlsdr on Windows:

  • Download and install git.

  • Download and install the Go tools. Create a "go-pkgs" directory-your user folder is a good location-and add a GOPATH variable to your system environment, where GOPATH is set to the go-pkgs path, e.g. GOPATH=c:\users\jpoirier\go-pkgs.

  • Download the pre-built rtl-sdr library and unzip it, e.g. to your user folder. Note the path to the header files and the *.dll files in the x32 folder.

  • Download gortlsdr, but don't install the package:

        go get -d github.com/jpoirier/gortlsdr
    
  • Set CFLAGS and LDFLAGS in rtlsdr.go. Open the rtlsdr.go file in an editor, it'll be in go-pkgs\src\github.com\jpoirier\gortlsdr, and set the following two windows specific flags shown below, but with the correct paths from your system. CFLAGS points to the header files and LDFLAGS to the *.dll files:

        cgo windows CFLAGS: -IC:/Users/jpoirier/rtlsdr
        cgo windows LDFLAGS: -lrtlsdr -LC:/Users/jpoirier/rtlsdr/x32
    
  • Build gortlsdr:

        go install github.com/jpoirier/gortlsdr
    
  • Insert the DVB-T/DAB/FM dongle into a USB port, open a shell window in go-pkgs\src\github.com\jpoirier\gortlsdr and run the example program: go run example.go. Note, the pre-built rtl-sdr package contains several test executables as well.

Credit

Todo

-joe

gortlsdr's People

Contributors

jpoirier avatar 9nut avatar josephlewis42 avatar cyoung avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.