makar853 / nethackrf Goto Github PK
View Code? Open in Web Editor NEW.net framework classes for hackrf transceiver
License: The Unlicense
.net framework classes for hackrf transceiver
License: The Unlicense
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();
}
}
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?
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:
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.