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.

SmartSDR API question

Tom Worthington
Tom Worthington Member ✭✭
edited February 2020 in SmartSDR API
I would like to write a simple program to record the S meter value over time.  Is there a way to use the API to ask for this kind of data from the radio?  I want to monitor noise and eventually do things like map the noise (at a particular frequency) as a function of antenna direction.

Answers

  • Mark_WS7M
    Mark_WS7M Member ✭✭✭
    edited November 2018
    Yes. You should look into the FlexLib API It can aslo be done via direct TCP comm but more difficult. The FlexLib makes it almost simple
  • Ted  VE3TRQ
    Ted VE3TRQ Member ✭✭✭
    edited December 2019
    I wrote a quick-and-dirty C program a while ago that uses the TCP/IP API to discover the radio, connect to the radio, find all slices and dump the S-meter values as they are reported by the radio. I simply output all values to the terminal for all slices. It is not cleaned up, but you are welcome to the code I wrote. It was the prototype to allow comparing the signal levels from two simultaneously connected antennas. I intend to eventually output a csv file for Excel to manipulate and plot when I'm done. Written for Debian Linux , but should work on any system supporting C and sockets. Written and tested with the latest radio software.
  • Doug - K3TZR
    Doug - K3TZR Member
    edited November 2018
  • K9DUR
    K9DUR Member ✭✭
    edited November 2018
  • Tom Worthington
    Tom Worthington Member ✭✭
    edited November 2018
    Thank you all for your suggestions.  I was hoping it would be simple but evidently I really need to immerse myself in the C# FlexLib...maybe we'll have a have a big snowstorm and I'll be stuck inside for a week...73 and Aloha
  • Warren Merkel
    Warren Merkel Member
    edited July 2019
  • Tom Worthington
    Tom Worthington Member ✭✭
    edited March 2019
    Thanks very much for sharing this.  I'll give it a try.
    73 and Aloha, NH6Y
  • Kevin
    Kevin Member
    edited March 2019
    Why isn't cool stuff like this not document in a magazine like QEX or something. I've been thinking of using a drone for getting antennas high up into the trees. I just received the release mechanism for it. Never thought about using it for mapping radiation patterns.

    Speaking of QEX, I think I let my subscription expire. :/ 

    73,
    Kev K4VD
  • bobby
    bobby Member ✭✭
    edited February 2020
  • jlag
    jlag Member ✭✭
    [{"insert":"I am also trying to read the RX signal level via the API but I do not see a method or property in the Slice object to read the value. Would anyone know the specific method to read the RX signal level of a Slice?\nRegards to all.\n"}]
  • Ted  VE3TRQ
    Ted VE3TRQ Member ✭✭✭

    I wrote a proof-of-concept VITA parser in C for the TCP/IP interface and just subscribed to the slice meter I wanted, scaled it, and ended up with dBm readings in real time. I wanted it for antenna analysis. Never did write the plotting part of it - guess I could just plug the numbers into Excel and let it do the graphing.

  • jlag
    jlag Member ✭✭
    [{"insert":"Gotcha, that could work. I am looking to poll it briefly after a frequency change on the slice currently.\n\n"}]
  • Doug - K3TZR
    Doug - K3TZR Member ✭✭

    Here's a description that I wrote in the heading of the Meter object in my xLib6000 framework (a Mac equivalent of FlexLib)

    If you want to see code take a look at the project on GitHub here https://github.com/K3TZR/xLib6000

    Look in the Meter.swift file. That might help you.

    73's Doug

    /// Meter Class implementation

    ///

    ///   creates a Meter instance to be used by a Client to support the

    ///   rendering of a Meter. Meter objects are added / removed by the

    ///   incoming TCP messages. Meters are periodically updated by a UDP

    ///   stream containing multiple Meters. They are collected in the

    ///   meters collection on the Radio object.

    ///

  • jlag
    jlag Member ✭✭
    Thanks Doug,

    Will check it out for sure. Would like to roll it on MacOS as well.

    Was looking at the Meters class but still trying to figure out how it operates. I have only been playing with the lib for 3 hours so I can't complain much :) Some slick stuff in there.
  • Pete - W6OP
    Pete - W6OP Member ✭✭

    For those who program with C#, Doug's (K3TZR) programs are written in Swift for the Mac which is quite similar and easy to port to C#. I've ported several programs Swift --> C# and C# --> Swift and for simple functions it is just adding or removing some semicolons and parentheses. My point being, if you are a C# programmer you will easily be able to understand the code written in Swift.

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.