-
Notifications
You must be signed in to change notification settings - Fork 183
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
SDRPlay [ERROR] error in activateStream() - Init() failed: sdrplay_api_ServiceNotResponding #336
Comments
@paulh002 - the SDRplay API v3.x is actually made of two components:
The two components communicate by means of shared memory, semaphores, and mutexes, but they also exchange a periodic heartbeat, to make sure that everything is OK. It is possible that when you are using the debugger and the application is waiting at a breakpoint, the thread that handles the heartbeat is 'frozen', and therefore when you resume the application it reports as the service being down, since it hasn't received the heartbeat within the expected amount of time. Franco |
Hello Franko, Your right, now SoapySDRUtil works, that is when I don't have breakpoints. But unfortuanaly I have this issue in my client application. That why I tried to build and debug SoapySDRUtil. There I get the same error also in release version |
@paulh002 - in gdb (which is what I use on Linux), I typically use breakpoints with commands (see here: https://sourceware.org/gdb/current/onlinedocs/gdb/Break-Commands.html#Break-Commands), where the last command before Franco |
@fventuri Maybe you missed. I am developing for linux on raspberry pi. But use VisualGDB extension for VisualStudio. |
If you just want debug output from the API but you're running the application without stopping, add a call to sdrplay_api_DebugEnable after sdrplay_api_SelectDevice and sdrplay_api_UnlockDeviceApi (but before the call to sdrplay_api_GetDeviceParams If you want to be able to step through your application, then you can disable the API heartbeat using a call to sdrplay_api_DisableHeartbeat() before sdrplay_api_SelectDevice However, make sure to not leave either of these calls into any production code or you may run into issues. Hope that helps, Andy |
The issue happens when calling sdrplay_api_Init in ActivateStream() |
What parameters are you calling your app with? The same as per SoapySDRUtil? So it runs ok before your changes, but not after? Without any API debug output, I can't really say why the init would be failing. Best regards, Andy |
@paulh002 - as Andy said, a common reason for A good way to see why
Franco |
Here the log, I see an error in the setGR function. If I compare this log with a correct one Dec 21 09:26:58 raspberrypi SoapySDRTest: [1422]: sdrplay_api_Open |
@paulh002 - good catch I just noticed in your code that you set the gain to 88 (see here: https://github.com/paulh002/SoapySDRTest/blob/master/SoapySDRTest/SdrDevice.cpp#L542). Franco |
Thats it!, just removed the setGain from my test program and than it works. I will check the discussion thread you shared. Hopefully I can implement a generic way to set the gain. The idea of using SoapySDR is to be independend of SDR implementations. But thanks a lot for quick response. |
Hi,
I use SoaySDR in my own software with several SDR receivers and that all works fine. Only SDRPLay SoapySDR driver keep getting an error. [ERROR] error in activateStream() - Init() failed: sdrplay_api_ServiceNotResponding
I have the same error when I use SoapySDRUtil when I run it in the debugger. When I start SoapySDRUtil from the commandline it works. So it seems I am missing something. Any tips?
The environment I use is Raspberry Pi4 buster linux 32 bits. I use Visual Studio (with visualgdb) to crosscompile and debug.
The text was updated successfully, but these errors were encountered: