-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SoapySDRPlay support #144
Comments
Fully supporting this request and willing to help with testing! |
It looks like using SoapySDR for #64 is going to future-proof us for this. It's possible to add an SDRPlay SoapySDR driver without even having to re-compile CubicSDR; they already have a separate driver available for UHD and BladeRF I'm just using the OsmoCom RTL one to start for testing as it's the only device I have here at the moment. That said once Soapy is implemented anyone could write the SoapySDRPlay driver and add it to CubicSDR without needing my intervention; it'd be a bit more difficult for me to do without the hardware so adding it as a SoapySDR issue for them might get the driver done more quickly. |
Cool! Since i have a SDRplay, is there anything i can do to help moving this forward? |
FYI: I've just placed an enhancement request at the SDRPlay website to provide a SoapySDR module for the SDRPlay RSP. |
@dc1rdb cool -- you might want to direct them here: https://github.com/pothosware/SoapySDRPlay as I've also partly implemented it myself last night in a fork here: https://github.com/cjcliffe/SoapySDRPlay I'm hoping between @Toontje and I we can get it working; would love to have one to test (as I would with all the devices, hah) with but it won't be in the budget for a few months yet. |
Done - it should show up in the thread at http://sdrplay.com/community/viewtopic.php?f=5&t=230 in a couple of hours. |
Please let me know when you checked in SoapySDRplay support si i can build Ton. On Wed, Sep 16, 2015 at 5:04 PM, Charles J. Cliffe <[email protected]
|
@Toontje we'll need to do a bit of testing prior to CubicSDR to verify the implementation. I'll put the steps here and we'll make sure SoapySDR and SoapySDRPlay are building properly and you should be able to give me some immediate results. First up, installing SoapySDR:
Next get OSX mir_sdr from sdrplay (requires you fill out a form) at http://www.sdrplay.com/mac.html and install it like this:
Additionally I was missing /usr/local/lib/libusb-1.0.0.dylib which libmir_sdr was expecting to find; so I had to copy the MacPorts version I had installed to there:
Then install the SoapySDRPlay module from my fork:
If all went well, test to see if you can get a response from the SDRPlay: (this is my current status with no device connected)
|
@Toontje the build that should eventually work with this is on OSX now up at: https://github.com/cjcliffe/CubicSDR/releases/tag/0.1.7-soapyexperiment1 |
@Toontje @dc1rdb -- it's possible that https://github.com/cjcliffe/SoapySDRPlay now works; but I feel there may be some order-of-operations issues still to deal with. Let me know when you've had a chance to review everything 👍 |
Initial test after performing above mentioned installs, SDRPlay hardware connected: See here: https://gist.github.com/cjcliffe/6adadcbbbb1a7ba9c713 |
CubicSDR 0.1.7 crashes about 1 second after painting the UI. I sent the detailed report by mail. |
Yeah I think it's implied by the example code (but not stated anywhere) that there's a specific order of operations to setting the parameters / checking flags after the stream has opened which I have not followed. I'll do some reworking so that everything is cached and only initialized when the stream starts; if that doesn't do it then we'll get into more detailed logging. |
@dc1rdb can you try running CubicSDR 0.1.7 like this?
It should produce a log to the terminal with all the startup details. Note you can post logs here easier by using three backquotes Replace /Applications/ with wherever you have v0.1.7 located. Edit: doing some debugging with fake input, there's some obvious issues so a commit will be on the way. https://github.com/cjcliffe/SoapySDRPlay has been updated with fixes for several errors, some pretty obvious :) You can update existing with:
|
Success! Works like a charm. Here comes the log, I captured a couple of frequency changes, too. See here: https://gist.github.com/cjcliffe/9f4ed1e2098a0bbd0a53 |
I noticed that the driver seems to be performing a firmware update:
It does not seem to be persistent, i.e. when I disconnect the SDRPlay from USB and reconnect it, the firware version goes back to 0x0200. Any ideas? |
It's a soft update - it will perform the update every time the device is reconnected. It happens on Windows as well you just don't see all the debug information. If you need any help from us on the API usage please let us know. SDRplay Support |
@dc1rdb -- that's great news! Now all I need you to do is try increasing bandwidths incrementally and see what does/doesn't work and paste some activity of it from the logs -- the manual bandwidth entry option in 0.1.7 should now let you take it beyond 3.2M :) |
@SDRplay thanks for joining the issue! I'm sure I'll have more questions for you as I start to finish up the details but a few come to mind right away:
Cheers, |
Here you go:
I noticed that at 2.88M and 3.2M the audio signal becomes increasingly choppy even though the CPU load remaines pretty much the same. Beyond 3.2M, it becomes pretty much unusable. |
Changing the input bandwidth also seems to change the tone pitch of the audio signal, i.e. higher input bandwidth results in higher pitch and vice versa. |
Hmm, sounds like it's possible that it's not actually changing rate or propagating the rate change to CubicSDR; I'll investigate this evening here and see if I can spot the issue. |
@dc1rdb I've made some updates to my SoapySDRPlay fork that re-locates the center and rate updates into the stream process and does some flag checking to log if the updates succeeded. Please update and give it another try. |
I have the same issue as @dc1rdb where CubicSDR starts and closes after less then 1 second. See here: https://gist.github.com/cjcliffe/50551d25f65b73e2d7db |
There is no built-in AGC - our website has a technical note to explain the gain control system (http://www.sdrplay.com/docs/SDRplay_AGC_technote_r2p2.pdf) |
Ok, just updated to the current SoapySDRPlay. Gone are the mentioned tone pitch changes, but the choppy audio at 2.88M and higher is still present. Here are the respective parts of the log: See here: https://gist.github.com/cjcliffe/4dfc7105ef70a44c5f0c |
@dc1rdb hmm, I should have seen some:
entries in there; can you see if you can locate? I'm pretty sure the remaining issue is just the buffer size which I may need to handle better on the CubicSDR side of things. I'm going to have CubicSDR dynamically adjust the buffer size so that the processing rate stays constant -- it's most likely just trying to jam too many requests into the pipe that could be done in much larger pieces. I think I can figure out the last bits of the AGC now from the flowchart in the link provided by @SDRplay -- and the IF bandwidth adjustment shouldn't be too hard to implement with some range checks. |
I installed the latest API to get Pothos working and for the sake of it re-built SoapySDR, SoapySDRplay and CubicSDR again and i now get OpenGL errors.
|
@dc1rdb @SDRplay If you're running from the latest .DMG it packages it's own libSoapySDR via cpack automatically from my local 0.3.0 build. Do you need an 0.4.0 build? I've been using the 0.3 "release" version with bundles. Edit: I see on Facebook now that people are having success; I'll leave it as is for the moment :) @Toontje I don't see the OpenGL errors here; but I'll try it in my Ubuntu VM -- that's where they usually show for me if it's a problem. |
@Toontje I think I see what's going on from the log you e-mailed me.. the Waterfall update routine has changed.. I'll make an adjustment to fortify the thread access and have you pull an update to confirm. |
@Toontje pushed an update for the waterfall changes; should be more thread-safe now; let me know if that clears up any of the OpenGL errors and waterfall 'OnPaint' crashes. |
@SDRplay Your hosted version of CubicSDR http://sdrplay.com/software/CubicSDR-0.1.11-Darwin.dmg is different to the original version https://github.com/cjcliffe/CubicSDR/releases/download/v0.1.11/CubicSDR-0.1.11-Darwin.dmg I just followed the installation instructions on https://github.com/cjcliffe/CubicSDR/releases/tag/v0.1.11 which resulted in a perfectly working configuration on Mac OS 10.9.5 Mavericks. |
@SDRplay Some additional observations: I just wiped my entire /usr/local/ folder and reinstalled SDRplay_RSP_API_Installer_1.9.2.pkg together with CubicSDR hosted at SDRPLay.com (http://www.sdrplay.com/software/CubicSDR-0.1.11-Darwin.dmg). |
@dc1rdb pretty sure this is just a Soapy version mismatch; I've been building with 0.3.0 since that's what the pothos windows binaries were at. |
@Toontje That's kinda strange considering the one in the top left is still working.. I may have to make a special debug branch for you -- can you give me the specs for your graphics card in "About This Mac"? Edit: Have you restarted recently? it's possible the GPU driver tanked and doesn't have enough resources for the waterfall texture.. Also while tinkering with Qt installations did it have you install anything OpenGL related? It's possible a library is conflicting with wxWidgets.. Try building the static wxWidgets from the Wiki and use that during CMake as the wxWidgets path: https://github.com/cjcliffe/CubicSDR/wiki/Build-OSX---MacPorts-.App |
@Toontje on second thought I pushed a quick revert of my removal of the DEFAULT_SAMPLE_RATE in some places -- that initially caused an immediate waterfall failure for me before and you might just be racing a bit faster or slower than my system and hitting the issue on another one I changed. Those should all be back to defaults now and hopefully just something in the waterfall chain was getting badly initialized because of the zerod value. |
Graphics card: Intel HD Graphics 3000 512 MB See: https://gist.github.com/cjcliffe/9b45d9e7aa460fc0103f |
@Toontje going to tweak it so that only the waterfall thread can update the waterfall texture; I think this is still a graphics driver issue with the recent waterfall changes at the moment. |
@Toontje -- I pushed an update to sopaysdr-support that should fix any conflicts in OnPaint() and processInput() in the waterfall which I keep seeing in the crash traces. |
Seg fault: https://www.dropbox.com/s/ofx85t93eez7ht0/segfault.mov?dl=0 |
@Toontje that's still failing on the new waterfall memcpy code.. I must still be doing something funky there I'm going to have to take another look! |
@Toontje I've committed some more fixes to keep the gl context happy on waterfall panel init; let me know if that stabilizes anything. |
First impression is good. No segfaults, all interface elements preset and working. Won't have a lot of time to test today. Travelling and all. I will keep you informed how it's going, but all is looking good so far. |
@Toontje sounds good; I think we've got it -- it does sort of a funky mutex walk between the waterfall data and waterfall render now and I can't theorize how the texture could end up badly initialized any more. Thanks for your help! You're doing wonders for the Facebook crew as you have the perfect configuration for maximum GPU driver havoc 👍 |
And i thought i was just a pain in the b*tt for you. ;-) |
@Toontje Hmm, yeah that thing acts up in windows all the time -- I think I have an uninitialized variable somewhere.. Going to take a look at it now. |
@Toontje spectrum/scope and some additional crash fixes are now committed; let me know how you make out. |
All looking good so far. |
Good news that @jazzkutya has implemented Low-IF modes for SoapySDRPlay -- pull the latest updates and you'll now get 222KHz, 333KHz, 428KHz, 500KHz, 571KHz, 750KHz, 875Khz and 1MHz input rates in CubicSDR! |
actually only 500khz, 1Mhz and 2Mhz are Low IF modes, all others are zero-IF modes. |
Thanks for your help on this issue everyone; going to wrap it up as it's getting slow to load ;) Feel free to create new issues related to SDRPlay and CubicSDR here or use https://github.com/pothosware/SoapySDRPlay/issues for SoapySDRPlay specific issues. I'm going to shift on-going SoapySDR implementation related discussion over to #64 Cheers! |
I am trying to get the SDRplay to work on a mac using osmosdr and it just doesn't work. Also i don't expect too much Mac support from the SDRplay guys. They are mainly focussing on Windows.
Given that the SDRplay API is public, how much effort would it be to add native support for SDRplay in CubicSDR? I think native support for the trio RTL-SDR (done), AirSpy and SDRplay would make CubicSDR the first SDR application for the "new generation" SDR devices.
In this issue you can find (will be copied to wiki eventually):
Build instructions (OSX): #144 (comment)
Update instructions: #144 (comment)
The text was updated successfully, but these errors were encountered: