GithubHelp home page GithubHelp logo

nethackrf's People

Contributors

hopperpop avatar makar853 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

nethackrf's Issues

Intermittent/random HACKRF_ERROR_NOT_FOUND

I'm experiencing seemingly random exceptions while trying to work with the HackRF device.

System.Exception: Error "HACKRF_ERROR_NOT_FOUND" have occured in OpenDevice.
   at nethackrf.NetHackrf.CheckHackrfError(hackrf_error error)
   at nethackrf.NetHackrf.hackrf_device_info.OpenDevice()

As far as I'm concerned the error is due to the USB connection is gone. I started to monitor the USB disconnect/attach events on the windows machine but cannot see that it's happening. So I'm kinda lost why the error would happen.
Device reset may be a good idea, but since it cannot be opened I cannot issue a reset either. So what can be a workaround?

FYI, my implementation is a singleton wrapper around the nethackrf class to provide the users high level functions. The init methods are as follows:

public static HackRfDevice Instance
        {
            get
            {
                if (_instance == null)
                {
                    _instance = new HackRfDevice();
                }

                return _instance;
            }
        }

private static HackRfDevice _instance;

private HackRfDevice()
{
    var devices = HackrfDeviceList();
    if (devices.Length == 0)
        throw new Exception("No HackRF device found");

    _deviceInfo = devices[0];

    Log.Info($"HackRF device initialized. Serial=\"{_deviceInfo.serial_number}\", index={_deviceInfo.usb_device_index}");
}

        /// <summary>
        /// Provide a HackRF device handle by opening the communication to the phyisical device. Disposeable!
        /// </summary>
        private nethackrf.NetHackrf Device
        {
            get
            {
                if (_deviceInfo == null)
                {
                    throw new InvalidOperationException("Device not initialized");
                }

                return _deviceInfo.OpenDevice();
            }
        }


RX Example

Hey,

I'm pretty new with the HackRF and would love to learn how to understand the data I get delivered by the HackRF. At the moment, I took a Stream Reader but I don't know how to understand the data delivered.

You might can give an example what do to with the data?

Unable to load DLL 'hackrf.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

Hi! I have spent several hours trying to figure out the source of the problem but I believe I need to ask for some help.
I have an application using HackRF and it works nicely on any dev computer. Now I deployed the app via an installer to the target machine (no Visual Studio installation!) and get the following exception:

System.TypeInitializationException: The type initializer for 'nethackrf.NetHackrf' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'hackrf.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
   at nethackrf.libhackrf.hackrf_init()
   at nethackrf.NetHackrf..cctor()
   --- End of inner exception stack trace ---
   at nethackrf.NetHackrf.HackrfDeviceList()
   at ***
   at ***
   at ***

As far as I'm concerned the DLL is in the same folder as the executable and the NetHackRf.dll:
image

My last suspicion is that the hackrf.dll packaged with the NetHackRf is built in debug mode somehow and it requires additional SDKs or runtimes on the target machine. Is this a valid suspicion? Can someone confirm or just try to help me in any other way to get my app running on the target?

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.