rtlsdr

Dart bindings for Software Defined Radio (librtlsdr).


Keywords
dart, rtl-sdr, rtl-sdr-receiver, sdr
License
MIT

Documentation

Pub Package Build Status GitHub Issues GitHub Forks GitHub Stars GitHub License

Dart bindings for Software Defined Radio

This library provides a simple Dart interface to devices supported by the RTL-SDR project. It wraps much of the functionality provided by the librtlsdr library in a convenient and typesafe way.

This library is open source, stable and well tested. Development happens on GitHub. Feel free to report issues or create a pull-request there. General questions are best asked on StackOverflow.

The package is hosted on dart packages. Up-to-date class documentation is created with every release.

Installation

First, make sure you have the most recent version of librtlsdr installed on your system, either through the developer or your favorite package manager. Make sure the library is accessible to Dart.

Then follow the installation instructions on dart packages.

import 'package:rtlsdr/rtlsdr.dart';

Tutorial

import 'package:rtlsdr/rtlsdr.dart';

void main() {
  // Grab the first RTLSDR device and print its name.
  final device = getDevices()[0];
  print(device.name);

  // Open device and tune-in.
  final open = device.open();
  try {
    open.centerFrequency = 105800000;
    open.sampleRate = 2048000;

    // Read some data.
    open.resetBuffer();
    open.readAsync((data) {
      print('${data.sublist(0, 100).join(', ')} ...');
      return false; // continue?
    });
  } finally {
    // Close the device at the end.
    open.close();
  }
}

License

The MIT License, see LICENSE.