Welcome to the new FlexRadio Community! Please review the new Community Rules and other important new Community information on the Message Board.
If you are having a problem, please refer to the product documentation or check the Help Center for known solutions.
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.

No panadapter instantiated

Walt - KZ1F
Walt - KZ1F Member ✭✭
edited March 2017 in SmartSDR API
Pse refer to https://community.flexradio.com/flexradio/topics/dialog-box-construction?topic-reply-list[settings][...

What happens is a command is sent to the radio to display a panadapter. If the response from the radio is non zero the panadapter is not added to the radio object and no gain information is captured.

The problem is defined in the above 'problem' in the regular community. I put forth the suspicion that there is no external exit handle created which, may or may not, be accurate. However, given the code in Panadapter my question is this, which may lead to the answer to the aforementioned problem. What condition(s) must exist for the radio to return a non-zero result of display pan create cmd?

Walt - kz1f

Answers

  • Eric-KE5DTO
    Eric-KE5DTO Administrator, FlexRadio Employee admin
    edited March 2017
    If I understand your question correctly, a successful Panadapter create command will result in a reply of R|0|. Is this what you are asking?
  • rfoust
    rfoust Member ✭✭
    edited December 2016
    I think he's asking, if it doesn't return 0, what *would* it return, and what error conditions would cause that? I supposed "no available panadapters left" would be the obvious one but not sure what else would result in a failure.
  • Walt - KZ1F
    Walt - KZ1F Member ✭✭
    edited February 2017
    No Eric and Robbie. I am referencing what I've experienced a few times with 1.3.x but two or three times since I installed 1.4 and reported that other panadapter issue. The full text is under that url for the question I asked in the main forum. A possibility is during shutdown the state is not saved and upon subsequent startup SSDR doesn't know what to instantiate, ergo no panadapter, no slice, no formated RX widget. I did some reseach at the outset and while there are notifications for File->exit and Window->close there is another handler for foreign, like OS initiated shutdowns.My supposition is this is triggered with a non-normal shutdown restart seq. I annotated the 3 start scenarios 1) everything fine, 2) panadapter instanciated but last slc not, and neither an panadapter nor a slice instantiated. I am assuming Tim hasn't forwared that question to you (Eric) In the Panadapter class there is a scenario where the panadapter doesn't get created (Robbie, nice guess but wrong). So I was asking what condition, aside from what Robbie said, would cause the panadapter to not get instanciated. Oh, an another scenario is when all panadapters get instanciated. I never run with all panadapters. So I thought if there were a person at FRS that would look at all three scenarios and know what was going on it would be you Eric.

    I hope that makes sense Eric.

    Thanks,

    Walt -kz1f
  • Walt - KZ1F
    Walt - KZ1F Member ✭✭
    edited November 2016
    Actually, where a restart sometimes results with all the available panadapters and all the available slices starting...Interesting side question, if I have two panadapters open with 2 slices each, would asking for a 3rd panadapter fail? I would guess yes, but would it fail for lack of a panadapter or lack of an available slice to put on it? I pose that question because, to me, it makes no sense to instantiate a panadapter without a slice on it. So in that scenario the 3rd pan would fail because there would be no slices available.  So why would it create a pan without a slice ( a scenario I've seen since 1.4), what if it for poop and smiles just though (uninitialized attribute) all the slices were in use. As I said earlier, I never do that as I only have a 15" monitor and having it that busy makes no sense. I never do that. Well, maybe a year ago when I was deliberately trying to stress the system to see what would happen. Back to the original question, I've seen
    1) no pan created on startup
    2) an empty pan created on startup
    4) randomly all slices created on their own pan, 4 pan 4 slices.
    5) and what should always happen, I assume, whatever was present at shutdown. In my case one pan one slice, occasionally 2.

    Walt
  • Steve-N5AC
    Steve-N5AC Community Manager admin
    edited December 2016
    I can't seem to tell if you are asking a question about the API because something you are doing in the API is causing an unexpected result (in which case you should post the code you are using) or if you are asking a question about a condition you are seeing running SmartSDR on Windows (in which case it should not be posted in the API section of the community).
  • Walt - KZ1F
    Walt - KZ1F Member ✭✭
    edited November 2016
    I did just remember when this first happened I tried to 'create a new panadapter' with the button bottom left.Nothing  happened. Yes, so it isn't just it didn't get instantiated at startup, I couldn't manually do it either.

    So now is it clear what I am reporting? Tim, I presume, didn't understand what I was saying and asked for a picture. Another good test can one even delete the last pan? Anyway, I added a screen shot of the control surface without a pan. The RX widget is not populated and one can clearly see the three squiggly lines in the center of the background where the panadapter should be.
  • Walt - KZ1F
    Walt - KZ1F Member ✭✭
    edited November 2016
    Hi Steve ...no. I think I opened the other issue as a problem in the main board. I was looking for ways startup would possibly be different depending on shutdown. I saw that there is a different shutdown hook to handle external terminations like shutdown with active apps. I thought that might be it. However, I asked here (seemed appropriate) as looking through the panadapter class if the reply returned from the radio is not 0, the create of the pan silently fails. So I was asking what would cause a non zero return code. OK, I won't post here in the future. The issue I opened elsewhere had not been, to all outward appearances, looked at and since in panadapter.cs it silently failed to create the pan, I asked why it would. sry.
  • Eric-KE5DTO
    Eric-KE5DTO Administrator, FlexRadio Employee admin
    edited December 2016
    This answer is documented in the wiki: http://wiki.flexradio.com/index.php?title=TCP/IP_display_pan.
  • rfoust
    rfoust Member ✭✭
    edited December 2016
    Oh, good point :-)
  • Eric-KE5DTO
    Eric-KE5DTO Administrator, FlexRadio Employee admin
    edited February 2017
    Walt,

    No problem on the post.  We're just trying to find the best way to help you (and to keep from confusing others).  The first step is understanding what is going on.  If I understand you correctly, you are saying that sometimes the Panadapter just doesn't show up when you are starting up SmartSDR.  Is this correct?

    I haven't seen this behavior and would like to know whether others are experiencing similar issues.  If others aren't seeing this, it would seem to be something isolated to your configuration (settings, etc).  If this is the case, a helpdesk ticket is most likely the most efficient way to get to the bottom of this.
  • Walt - KZ1F
    Walt - KZ1F Member ✭✭
    edited November 2016
    Hi Eric,
     
    "you are saying that sometimes the Panadapter just doesn't show up when you are starting up SmartSDR.  Is this correct?"

    YES,
    1) I've seen NO panadapter opened therefore no slice opened therefore no RX dialog populated.
             (in this scenario I can not manually create a pan either)
    2)  I've seen the panadapter opened but never populated with a slice.
    3)   I've seen 4 panadapters opened each with there own slice receivers. I do not open 4 panadapters so it is unclear to me why it randomly decided to open 4 of them.

    4)    Normally, the panadapter is opened, the slice I had when I shutdown is reactivated and the RX dialog is properly formed. I assume this is the behavior that should always occur at startup.

    "I haven't seen this behavior and would like to know whether others are experiencing similar issues"

    I hate passing on what others have told me, but I ran this by Al, NN4ZZ, and while he hasn't personally seen this he knows of others that have. He has a Yahoo forum on the Flex and so talks with LOTS of Flex owners.

    I surmised how the SSDR and radio are shut down influences how it restarts. I stopped doing Windows programming 15-20 years ago but I do seem to recall a separate hook was required to trap an external shutdown notification, like from the start button->shutdown. Sometimes I have shut SSDR down that way. I believe sometimes I may have inadvertantly shut down the radio before SSDR. I did some research and found that yes, .NET requires a different shutdown hook for hibernate, shutdown etc. I thought if I mentioned that you might have a Eureka moment and know what was happening.

    How is it there are 4 scenarios to startup sequence when there should be only one? What assumptions are made about the sequence of shutdown?

    Thank you for pointing to the pan display cmd page. I didn't know that existed. However, I do not see how any of those causes apply. License, it's your code, too many already open, NO, Unable to get a radio, hmmm, again, it's your code and its a fresh startup.

    I've never seen code randomly do stuff, unless there is an uninitialized field. Although this code manipulates physical hardware. I did post this to the normal board under SSDR a week ago. The suggestion to upgrade video drivers was not helpful.

    Last night Steve suggested this has nothing to do with this forum. Yes, it does, here is the code:

           public bool RequestPanadapterFromRadio() 
    {
                // check to see if this Panadapter has already been activated
                if (_radio_ack) return false;
     
                // check to ensure this object is tied to a radio object
                if (_radio == null) return false;
     
                // check to make sure the radio is connected
                if(!_radio.Connected) return false;
     
                // send the command to the radio to create the display
                _radio.SendReplyCommand(new ReplyHandler(UpdateStreamID), "display pan create x=" + (int)_size.Width + " y=" + (int)_size.Height); 
                return true;
            }
     
            private void UpdateStreamID(int seq, uint resp_val, string s)  {
                if (resp_val != 0) return;
    ...
    Interestingly, the "display pan create" has no center frequency as the doc for pan create allows
    C[D]<seq_number>|display pan c <frequency> <antenna> <x-pixels> <y-pixels>
    I grepped for this command and this appears to be the only occurrence of it. What happens when the center frequency is missing?

    There have been some other problem reports I've opened where I was afraid it reflected a hardware issue. Just as with intermittent software bugs, an intermittent hardware failure is, I guess, equally hard to shoot. I would really like this to be a software issue. If it's a software issue, it can be fixed without a trip to the F6000 hospital. Otherwise, my radio goes into the shop. I'd like to not lose the radio, if at all possible. This is why I am trying to be very exacting in describing what I am seeing.

    Thanks,
    Walt

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.