Skip to content
This repository has been archived by the owner on Sep 26, 2022. It is now read-only.

Shkarlatov/uhdsharp

Repository files navigation

uhdsharp

uhdsharp repository on GitHub. Moved from CodePlex

What is UHD-SHARP?

Ettus Research has great SDR. For which it supplies C++ API. UHD_SHARP library designed to lower barriers to entry for beginners and amateurs into B200/B210 world. This is achieved by simplifying the API and taking care of all the nasty staff like buffering, multi-tasking and memory management. It uses C# as powerful, yet friendly platform.

Screenshot Screenshot

Quick start guide

If you can run your B200/B210 device on your Windows machine using UHD 3.8.0, then you probably be should be okay. Otherwise follow these instructions:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UHD_SHARP;

namespace ConsoleApplication1
{
    class Program
    {
        static multi_usrp usrp;

        static void Main(string[]() args)
        {
            usrp = new multi_usrp(); // Connect to the first device 
            if (!usrp.isConnected) {
                Console.WriteLine("Cannot connect to device.");
                return;
            }
            usrp.set_rx_rate(32e6); // RX rate = 32MHz
            usrp.set_rx_freq(100e6); // RX frequency = 100 MHz
            usrp.set_rx_gain(40); // RX gain = 40 dB
            usrp.DataReceiverEvent += OnDataReceiverEvent; // Wire RX event 
            Console.WriteLine("### Starting ### ");
            Console.WriteLine("Press any key to exit");
            usrp.begin_rx_stream(); // Start stream RX data
            Console.ReadKey();
        }

        static private void OnDataReceiverEvent(int[]()() real, int[]()() imaginary, int length, rx_metadata_t md)
        {
            // Your code goes here
            Console.Write(".");
        }

    }
}

About

uhdsharp repository on GitHub. Moved from CodePlex

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published