sdrsharp-bladerf icon indicating copy to clipboard operation
sdrsharp-bladerf copied to clipboard

bladerf_sampling() error. Operation not supported

Open MSmithDev opened this issue 6 years ago • 23 comments

I'm trying to get SDR# to work on the BladeRF 2.0 Micro A4. I've followed all the instructions. I get SDR# to see the device but when i try to start the device after a short pause this popup shows.

popup

Here is the settings in SDR#

settings

And my versions from bladerf-cli

version

It seems like something may have changed with the new 2.0 libbladerf

Thanks!

MSmithDev avatar Oct 08 '18 00:10 MSmithDev

Thanks for reporting. I will try to have a look, hoping that it's not something specific to bladeRF2 because I don't have one to test.

jmichelp avatar Oct 16 '18 07:10 jmichelp

Sure thing, I would be happy to test anything for you using mine. I think the issue is libbladerf 2.0 has some changes that may have affected your wrapper.

MSmithDev avatar Oct 16 '18 13:10 MSmithDev

Ive got the same issue. Ive simply followed the instruction but it’s not workes. Then ive tryed to replace dlls in SDR # using libraries commes with nuand windows installation. Then its appiars the very same errors. If i can help something - ill be soon.

Junkers1989 avatar Nov 06 '18 17:11 Junkers1989

+1, this seems to be a common issue for BladeRF 2 devices. I also have the Micro A4 and am impacted in the same manner. bladerf-cli sees the radio just fine and can load the FPGA. Using the DLLs in this repo, the sources box is greyed out as if there is no device plugged in. By replacing the DLLs with Nuand's version, the device shows up without issue and the FPGA seems to flash just fine, however the same "Operation not supported" error is thrown. Occasionally, I'll receive a "source not ready" error on first try, followed by the operation not supported error on subsequent attempts to start.

bladerf_info sdrsharp_controller

ppil avatar May 11 '19 01:05 ppil

libbladerf changed from version 2.0 onwards, LNA gain is no longer there, the code needs to be updated

sab24 avatar May 20 '19 22:05 sab24

Thanks for reporting and for identifying the bug. At the moment I really don't have enough spare time to fix the API, update the GUI and (the most time consuming part) test that everything is working.

But I will do my best to update everything and support the latest additions before the end of summer.

jmichelp avatar May 21 '19 20:05 jmichelp

@jmichelp Hi. Any updates on the progress for this bug? It is basically a blocker for using bladeRF on Windows...

angervision avatar Sep 19 '19 15:09 angervision

Oops, I completely forgot about this issue. I see that Nuand Labs has forked my repository and applied some fixes. Do they work? Because in that case, I can simply merge that into my repository and issue new pre-compiled binaries.

jmichelp avatar Oct 10 '19 19:10 jmichelp

Any update to this? the new updates that was forked from Nuand Labs did not fix this issue.

og-openwrt avatar Oct 16 '19 18:10 og-openwrt

Hello Guys,

Same issue experienced with Bladerf xA9, running on Windows 10. Symptoms exactly as described by uzc30 in issue #17 a year ago.

Is recommended way to wait until #16 is fixed here or better contact Nuand to fix in their fork?

Cheers

botekp avatar Oct 20 '19 06:10 botekp

I started having a look and the API v2 has changed quite a lot. I started updating the code to move to API v2. But it still requires more work before it actually works.

I want also to point out that I'm note affiliated to Airspy/SDRSharp nor to Nuand. I did this plugin because I own a bladeRF and I wanted to be able to use it with SDRSharp. Thinking that it could benefit others, I decided to release it as open source software. What this all means is that I'm doing my best to keep this working and to fix bugs on my spare time but anyone can also do it and issue a pull-request so that I can merge their modifications for everyone. Also not being an owner of a bladeRF2, I can't test that it works with it. I can only ensure it works with a bladeRF x115 and with the XB200.

jmichelp avatar Oct 20 '19 15:10 jmichelp

Hello Jmichelp,

Thank you for your work on sdrsharp wrapper so far, even that you are not affiliated with Nuand. I think it makes a remarkable combo and it is worth to keep it up to date.

I am an owner of one "bladeRF 2.0 micro xA9" and happy to use it for testing if you needed, as long as it does not break.

I am also a software developer and would be happy to polish out my rusty C++ to help with getting your wrapper to work with APIs/firmware V2.2.0 (the lowest version supported by bladerf 2.0 micro xA4 and xA9 as I understood)

Please let me know how can I be of help.

botekp avatar Oct 21 '19 09:10 botekp

I also appreciate your work. Botekp i also have a micro 2.0 xA4 and also rusty in C++ but i could try and lend a hand too.

MSmithDev avatar Oct 21 '19 18:10 MSmithDev

Thanks for the offered help. Here the language is C#, not C++ :)

I started updating the NativeMethods.cs file which gives access in C# to the bladeRF library and I also compiled the newest library from Nuand. Several things have changed with the new API, including the gain control which will require to update the GUI too. The modifications don't seem to be complicated, just time consuming. As soon as I'm done with NativeMethods.cs file the rest should follow fairly quickly. But testing will take time though.

The problem with the bladeRF 2.0 is not to test if it works or not. I've got a decent amount of hope that it will even if I don't have a unit to test. The big problem is that when someone reports a bug on using bladeRF with SDRSharp, I have no way to reproduce or to debug and I also can't tell if it's an issue with the bladeRF 2.0 or with my code or with the API...

jmichelp avatar Oct 26 '19 19:10 jmichelp

I updated NativeMethods.cs (commit 37c7d0caed131432309e62cb5c4cca92d99f3953). Now compiling the project doesn't work anymore because the API changed with v2.2. Moving to the new APIs will be the next step. The UI also has to change quite significantly. All in all, the plugin will not be ready soon.

jmichelp avatar Oct 27 '19 22:10 jmichelp

Hi JMichelP,

Looked at your commit, seen lots of green and red - excellent stuff!

Let me know how can we split the jobs to save you time. My C# is not as rusty as my C++.

What beer do you drink? I have access to some of the best.

Cheers - P.

botekp avatar Oct 28 '19 08:10 botekp

As this issue appears to be a dependency issue, is there any recommendations on versions of the bladeRF installer, firmware, and SDRSharp application that are expected to work together?

kalanihelekunihi avatar Jan 01 '20 15:01 kalanihelekunihi

It's not entirely a dependency issue. The main issue here is that I haven't finished moving the code to the newer API due to a lack of spare time. The newest bladeRF mini requires to use API v2 and the same thing goes with the "classic" bladeRF running a modern firmware/FPGA image.

I will finish a newer version of the plugin that supports the latest combo of firmware + FPGA image + libBladeRF somewhere in 2020. I can't commit on a more precise deadline yet and I can't promise it will work perfectly with a bladeRF mini.

jmichelp avatar Jan 01 '20 15:01 jmichelp

I have a "classic" BladeRF device. Is there a previous version firmware and fpga image that I could downgrade to and make the board work?

kalanihelekunihi avatar Jan 02 '20 02:01 kalanihelekunihi

I have a "classic" BladeRF device. Is there a previous version firmware and fpga image that I could downgrade to and make the board work?

Yes you could try with a libbladerf version below 2.0. Other FPGA versions are on the site of Nuand: https://www.nuand.com/fpga_images/ Just try the December 2018 version and work your way down.

I remember I had a limited version working last May with the newest bladerf 2.0 micro and the newest FPGA, but I lost all my Windows computers (the motherboard burned through while compiling gnu radio). I have only a 10 year old laptop left, can try later this week.

sab24 avatar Jan 02 '20 08:01 sab24

Bushfires in Australia and now corona seem to be temporarily over so I'm finally back in air.

Sending result of testing with original bladerf.dll and new updated bladerf.dll.

Testing rig: Windows 10 x64, Bladerf xA9.

Is there anything else that I can test?

Untitled

botekp avatar Apr 24 '20 13:04 botekp

Hi, I'm Álvaro, I've forked the repository and I've made changes to make it work again with libbladeRF2.2.1 and SDRSharp 1732 I've tested it only with my bladeRF1 x40. There is still quite a lot functionality (not used by SDRSharp) that needs to be tested or fixed. I plan to dedicate some more time to reviewing all wrapper functions against the latest version of bladeRF library, as I would like to use the wrapper for my own C# projects.

Having gone through the code I have to recognise the amazing work done by jmichel.

aorgazf avatar Aug 09 '20 16:08 aorgazf

Hi, I'm Álvaro, I've forked the repository and I've made changes to make it work again with libbladeRF2.2.1 and SDRSharp 1732 I've tested it only with my bladeRF1 x40. There is still quite a lot functionality (not used by SDRSharp) that needs to be tested or fixed. I plan to dedicate some more time to reviewing all wrapper functions against the latest version of bladeRF library, as I would like to use the wrapper for my own C# projects.

Having gone through the code I have to recognise the amazing work done by jmichel.

Hi @aorgazf , I'm Javier, I've tested your fork on a BladeRF Micro 2.0 xA9, without success (same sampling error()). If needed I can test further since I maybe too rusty for C# development i'm mostly focused on front-end dev (javascript).

Amazing work @jmichelp honestly! :)

z0t4 avatar Aug 20 '20 23:08 z0t4