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 check the Help Center for known solutions.
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.

Does anyone have a Client working that creates a panadapter/slice then accesses it?

Steve Scoggins
edited May 2020 in SmartSDR API
We are working on a Remote Hams Client in C# and on an iPhone Client using the FlexAPI.
I am interested in finding out if anyone else has been able to create a panadapter/slice from scratch using the FlexAPI and get valid status back.  I would also be interested if finding out if you can watch the API commands using SmartSDR at the same time.  Should be possible if your client code is set to non GUI.

Steve Scoggins N9HE

Answers

  • Walt - KZ1F
    Walt - KZ1F Member ✭✭
    edited November 2016
    Steve, is your intent to see if you are doing something wrong? Lot's of people have done it in C#, Stu's done it in Objective C, I've done in Java. What specifically is your question, aside from has anyone done it?

    https://community.flexradio.com/flexradio/topics/first_steps_with_flexlib

    I cannot speak for the others but initially I was not using client gui. It works way better when you do. As I changed more than one thing when I added 'client gui' I am not sure if that is the singular reason things started working better, but they did. Did you wire the events properly? Did you wire the property change notification on RadioAck?

    What I did was:
    Wait for the radio to arrive via API and Discovery, once that happened (recv'd notification)

    Request the panadapter via the radio object, once that happened (recv'd notification)

    Request the slice from the panadapter, once that happened (recv'd notification)

    Do whatever with the slice, change freq, change demodulation etc etc.

    My point was to be certain you aren't accessing an object before it has been created / activated by the radio. This is easy to do if you are not careful. At this point, the onXXXAdded occurs after the reply has been sent by the radio (sendReplyCommand()) but just to be sure, verify RadioAck in the instance has been set to true. If it hasn't either there was an issue with the request or pretty much you are hosed. The RadioAck is set to true before the onXXXAdded is fired so if it isn't true, then there is an issue.
  • Stu Phillips - K6TU
    Stu Phillips - K6TU Member ✭✭
    edited May 2020
    Steve,

    If you are looking to write code for the iPhone, I have an almost complete equivalent to FlexLib written in Objective C which is in use bot on the iPad and on the Mac in different applications.

    As it stands now, the Objective C code provides full support of the radio API except for:
    • TNF (listing, adding, removing filters)
    • Profiles
    • Memories
    • CWX
    I am slowly adding these remaining items and can prioritize their implementation if they are needed before my schedule would normally get to them.  CWX will be the next added in a couple of weeks.

    The code is available on github at:

    https://github.com/K6TU/smartsdr-objective-c/tree/V2.2

    Be sure to use the code on the 2.2 branch - the code currently at the top of Master is an older version which I will shortly deprecate and merge the 2.2 branch to master.

    The 2.2 code is still in active development so its worth making sure you re-sync regularly if you start developing a client using this code.

    I'm happy to answer questions about the API with or without the use of this code.

    Stu K6TU


  • Steve Scoggins
    edited May 2020
    Stu can you create a panadapter and slices from your client without using the SmartSDR?

  • Stu Phillips - K6TU
    Stu Phillips - K6TU Member ✭✭
    edited August 2016
    But of course!

    My current K6TU Control app creates slices and controls the radio - without SmartSDR being active.  It does not support the display of a pan adaptor.

    However, the interface code provides full support for the pan and waterfall - providing you with the data that you can then display.

    The code has been fully tested.
    Stu K6TU
  • Walt - KZ1F
    Walt - KZ1F Member ✭✭
    edited November 2016
    Steve, as I said to James, if you want to get something working without using SmartSDR, don't start SmartSDR. SmarSDR is capable of ensuring your app doesn't work. In the James thread I gave him the java code to do what he wants to do, Eric has supplied the dozen or so stmts to accomplish that in C#, as the Java version is only syntactically different than the C# version. I have to believe the Objective-C is merely syntactically different than C# or Java. But, independent of that you'll mess yourself up, or stand a really good chance of it, when trying to concurrently run SSDR, there is no reason to. Instantiating a radio and panadapter and slice is pretty straight forward. The "hard' part is rewriting FlexLib. Oh, and the really 'hard' part is wiring up the graphical controls to it. None of it is rocket science but if you don't know graphical programming, it can feel like it. Parts of the learning curve are steeper than others, if it is all brand new it is a really steep slope.

    Walt
  • Stu Phillips - K6TU
    Stu Phillips - K6TU Member ✭✭
    edited August 2016
    The Objective C code is more than just syntactically different than the C# FlexLib.

    iOS/OS X is a different critter than Windows in how threads are handled, how multi-threading works etc.  So it was a write from scratch project.

    There are clearly parallels between them - for example, C# raises a property to signal a change, iOS/OS X uses key value observers (KVO) so that interested parties are called when the value of a property changes.

    There are reasons why one would want to run SmartSDR in parallel with other clients - a larger, high res pan adaptor is an example and this allows the K6TU Control app to function in concert with SmartSDR for contesting/DXing.

    Currently the radio will only support a single client with a GUI which displays pan adaptors or that handles Opus encoded remote audio.  One of the things I've requested is the ability to handle mirrored pan adaptors so that multiple clients can have a GUI - at some point in the future this will likely be supported.

    Stu K6TU
  • Walt - KZ1F
    Walt - KZ1F Member ✭✭
    edited November 2016
    At the level these people are stuck, they would be better off forgoing a running SSDR altogether. It just confuses thing. As I was suggesting to James, get a <whatever> version to:

    1) start
    2) 'discover' the radio
    3) request a panadapter
    4) request a slice
    5) disconnect properly

    Once they accomplish this without SSDR then they can start setting the center freq for the panadapter, adjusting the freq on the slice.

    Yes, there are use cases to use them both, but not at the flexlib 101 level.

    I did not know that about Objective C, much like there are things in C# that are alien to me having a C, C++, Java background. But, to be sure, the Java version was largely a 'from scratch' are there are things with no direct counterpart between them. Plus, I've been fixing bugs as I've found them in the C# code.

    My understanding of your iPad version is it was largely a contesting extension. Is that still the case or do you now have sliding  panadapters and sliding slices? Also, I tried looking it up, under your call and under Flex in the iPhone App store, are there different stores for different form factors and does it even make sense to try and run yours on an iPhone?

    I am not sufficiently motivated to buy an iPad to run yours as mine will be running on my Android in a couple of months. I am working on the GUI now. I may directly port the Linux version to Android to buy time to work out the features that will be unique to Android and build a 'native' version there. The hard part is done. But it would be cool if yours worked on an iPhone.
  • Stu Phillips - K6TU
    Stu Phillips - K6TU Member ✭✭
    edited August 2016
    The current app (K6TU Control in the AppStore) is indeed focused on providing workflow optimization for contesting and DXing.  It is intended to be used in conjunction with SmartSDR.

    That app does not (and will not) provide pan adaptors.  Slices can be tuned by dragging on the frequency display of the slice on the app.  I didn't want to sacrifice the utility of the app for contesting by moving to a pan adaptor based display.

    K6TU Control does not support the iPhone.  The screen is too small to support the reason the app was written - remove the need to use SmartSDR for anything other than a display and therefore never have to change window focus from the logging program to SmartSDR.  Together with a FlexControl, it provides full control of the radio.

    The AppStore app can be told to display apps for all devices - by default I believe it only shows apps capable of running on the device type running the store app.

    I am working on a new app capable of providing full remote operation including over the Internet.  As you guess from my recent post on the subject, it will be  using a VPN for access to the radio prior to FlexRadio implementing WAN support in SmartSDR.

    What I discovered in writing K6TU Control is that there are many different use cases where client customization can make a huge difference.  Different uses of the radio such as DXing, Contesting, Digital operation, remote control etc, can all benefit from being designed from the ground up to support the use case.

    I'm very happy that you are working on an Android app - many folks ask me if I would be supporting Android but its enough work supporting one platform without adding another!

    Stu K6TU

  • James Whiteway
    edited June 2015
    HUGE apology to you WALT!!!! Thanks for pushing me! I actually got it working WITHOUT SSDR running. I had some, for lack of better words, **** code in my program that was actually killing what I needed to do. Now, everything works!
    Again, THANK YOU, Eric and everyone else that has put up with my poorly worded and sometimes confusing questions.
    james
    WD5GWY
     
    
  • Walt - KZ1F
    Walt - KZ1F Member ✭✭
    edited November 2016
    That makes perfect sense Stu. I know I saw something on yours a year or so ago but, as I said, it clearly wasn't on the app store. I recall, in 2014, at Hartford, there was this guy milling around demostrating the panadapter running on his I6+. As it was running at his home, presumably and wasn't running 2.0 or 1.4 it was just an RDP app showing SmartSDR. My thought was he was advertising something FRS can't do, which would have bothered me had I been Tim or Greg. Since I wasn't I smiled and left.

    My Linux and Android (did I mention it will run on a Mac?) will have a built in client side SSL. I suspect this is what FRS will do for 2.x. At home, there always a machine running somewhere, I will have a mirror running. To the radio the local mirror will be SSDR and on my laptop/tablet to my SSDR the mirror will be the radio. The two mirrors will merely pass traffic between them. Where the 'far' side will be implement client side ssl, I need not worry about an open vector to my radio as the only end point that can successfully open a connection to the mirror needs to provide a valid cert.

    I suspect, in Austin, they will / could embed the farside mirror in SSDR and the local mirror in the radio itself. Each radio will do it's own local discovery and merely report as if it were the only one doing it. To me, that is the simplest way to implement WAN as the 2 mirrors will traverse the WAN just fine.

    mirrors == shims == stubs
  • Steve Scoggins
    edited June 2015
    I have installed your K6TU Control and have been playing with it.
    I have downloaded your Flex API Obj C library. Thanks Steve
    Does your K6TU Control support Audio streaming to the IPAD?


  • Stu Phillips - K6TU
    Stu Phillips - K6TU Member ✭✭
    edited August 2016
    Steve,

    If you are looking at the Objective C code, be sure to look at the 2.2 branch and not the current head of master on the repository.  The 2.2 branch is under active development, has implemented the majority of the missing functionality from 1.6 (current head of master) and is the branch which supports pan adaptors, streaming audio etc.

    The K6TU Control app does not support pan adaptor display or audio.  I wrote that app to provide a virtual front panel for the radio to help stream line workflow in contesting and DXing.

    Stu K6TU

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.