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

  • 1
  • Question
  • Updated 3 years ago
  • Answered
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
Photo of Steve Scoggins

Steve Scoggins

  • 19 Posts
  • 0 Reply Likes

Posted 3 years ago

  • 1
Photo of Walt - KZ1F

Walt - KZ1F

  • 3040 Posts
  • 643 Reply Likes
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.
(Edited)
Photo of Stu Phillips - K6TU

Stu Phillips - K6TU, Elmer

  • 642 Posts
  • 256 Reply Likes
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
Photo of Steve Scoggins

Steve Scoggins

  • 1 Post
  • 0 Reply Likes
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?
Photo of Stu Phillips - K6TU

Stu Phillips - K6TU, Elmer

  • 642 Posts
  • 256 Reply Likes
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
Photo of Steve Scoggins

Steve Scoggins

  • 19 Posts
  • 0 Reply Likes
Stu can you create a panadapter and slices from your client without using the SmartSDR?
Photo of Stu Phillips - K6TU

Stu Phillips - K6TU, Elmer

  • 642 Posts
  • 256 Reply Likes
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
Photo of Walt - KZ1F

Walt - KZ1F

  • 3040 Posts
  • 643 Reply Likes
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.
Photo of Stu Phillips - K6TU

Stu Phillips - K6TU, Elmer

  • 642 Posts
  • 256 Reply Likes
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
Photo of James Whiteway

James Whiteway

  • 904 Posts
  • 222 Reply Likes
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, crappy 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
 

Photo of Walt - KZ1F

Walt - KZ1F

  • 3040 Posts
  • 643 Reply Likes
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
(Edited)