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.

Tracking a Specific Client's Active TX Slice with SmartSDR Command Line API

Hello everyone!

I used to think that FlexRadio could only have a single active TX slice, but I recently learned that each connected client can have its own active TX slice. By "active TX slice," I mean where tx=1 and active=1.

In my third-party app, I need to track the active TX slice for a specific client. Currently, I only have the client’s IP/hostname to work with. I’m wondering if I should modify my app to store the client ID, something like: client_id=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX.

Is there a command to list all connected clients? If so, I could filter by client_id to find the corresponding client_handle, and then check for a slice with this specificclient_handle, tx=1, and active=1.

Does this sound like the right approach? I'd really appreciate any advice or insights!

Thanks in advance!

73 de SA6TUT

Tagged:

Comments

  • Alan
    Alan Member ✭✭✭✭

    SA6TUT

    Is there a command to list all connected clients?

    Yes, I think of several ways:

    Command: "C16|info"

    Status messages, when a new client connects.

    The UDP discovery broadcast port 4992 lists the number of connected clients and client names.

    For your app, may I suggest a different approach?

    Subscribe to the slice status messages. For each connected client, the status message has flags for TX Slice and Active Slice for each slice. Use these flags to identify the TX and Active Slice.

    Alan. WA9WUD

  • KD0RC
    KD0RC Member, Super Elmer Moderator

    There can only be two GUI clients, so in my apps, I keep a two position array with the client IDs. As clients come and go, I update the array.

    For each slice, I keep track of in_use, active_slice and TX_slice.

    The trick is to have all of the subscriptions in place at app startup that you need to provide the status messages that support the information that your app needs.

    Think in terms of radio events that cause status messages to be sent. When you get a status that has something that you need, like the TX flag for a slice, capture that and take action on it. Don't try to poll the radio for information. The idea is that the radio only sends info when the subscription is initiated, and whenever data changes.

    I have examples of how I did it out on GitHub (KD0RC). Some of my apps use C# with .net and FlexLib. My TeensyMaestro code uses C++ (Arduino) along with the IW7DMH library. The TeensyMaestro code will show you more directly how I handle the GUI clients using the text-based API.

    Hopefully this will point you in the right direction.

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.