- jmatusiak June 6, 2022 at 10:27 am
We usually use the SM200C is fast freq sweep mode, but we started allowing IQ streaming in our software. I am having issues switching from iq stream to freqsweep, but the other way works, so I think I am not releasing something.
Here are the steps I am doing with our custom software.
1 – start software in freq sweep mode. all is ok.
2 – completely stop and exit the software
3 – start software in iq mode. all is ok.
4 – completely stop and exit the software
5 – start software in freq sweep mode again. I get data streaming, but it seems to be garbage.
6 – completely stop and exit the software
7 – start software in iq mode again. all is ok again.
I am unable to get iq streaming mode to work again unless I hard power-cycles the SH. The fact that freq sweep continues to work tells me that something is setup that I am not being breaking down when I stop the software.
What is odd is that when I start it up in iq streaming (when I know it won’t work), the configuration doesn’t throw any errors, and smConfigure works, and smGetSweepParameters returns settings that I would expect. I would have expected the UDP port being taken still (or something like that).
AndrewModeratorAndrew June 6, 2022 at 11:38 am
When you stop and exit the software are you calling smCloseDevice or smAbort? If not it’s possible the device is still active. If you stop and exist the LED should have gone back to solid green. Flashing indicates data transfer.
I’m not aware of any outstanding issues that prevent the instrument from going between different modes like this. The API can only operate in one measurement mode at a time.
If you had two instances of your software running, this could certainly create this type of issue (let’s say your previous instance of your software didn’t fully close and is still running in the back ground) Our API does not stop you from interfacing the device from two different processes (which is not recommended or supported).
Are you monitoring the status’s returned from the API. When you mention getting garbage data, is it possible you are simply not getting any data and the API is throwing an error? (maybe you are just looking at uninitialized memory?)
If you continue to have issues after further investigations you can contact us directly at email@example.com. You could also create a small sample application that illustrates the problem and we can try to reproduce it on our end.jmatusiak June 6, 2022 at 12:13 pm
Thank you for the info Andrew, those are definitely the sort of tips I was looking for. It does smell like the process isn’t getting closed properly, but I don’t see any leftover processes tied to this app running (I am in Ubuntu), and the light is a solid green on the unit when I exit.
That is interesting that two different processes can interface at the same time. I assumed that if I could get a handle, it meant that no one else was currently using that device. I’ll have to keep that in mind while debugging.
I am not getting any errors while I am getting my data, so I think that the SH at least thinks that it is operating as it should.
I just keep coming back to the fact that it works until I switch modes; always when going from iq stream to freq sweep, so it must be the way I am cleaning up when done with IQ stream (though I am not sure why a hard reboot of the unit would fix that).
I’ve tried playing with the smPreset option, but I have never gotten it to work without having to do a power cycle on the unit. I always get smDeviceNotFoundErr (-2) after the blocking is done (which is about 15s).
AndrewModeratorAndrew June 6, 2022 at 4:00 pm
Thanks for the follow up. It may be worth setting up a phone call to discuss things further. I think that could accelerate troubleshooting. We can set that up through email if you are interested.
Andrewjmatusiak June 7, 2022 at 9:18 am
I appreciate it Andrew, but as expected, it was my fault. I won’t bore you with the details, but the way that the software was written (which was before my time), the vector of pointers to our sub-class of radios wasn’t getting freed properly. So even though the app was closing, none of our destructors were getting called, and it was keeping certain things running that we were only doing with the SH when in IQ streaming mode. Once I caught that and re-worked it, all seems good again.
So thank you for your help.
You must be logged in to reply to this topic.