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.

Slice and Radio Property Persistence

Jerry
Jerry Member ✭✭
I am a retired C#, WPF developer and just for fun I have been developing a client program and so far, I have most controls, Filters, buttons, Audio, Panadapter, and waterfall working well. Now I am working on fine tuning the RadioViewModel, SliceViewModel and PanadapterViewModel.
When SmartSDR starts, user controls such as AudioGain, AGCThreshold, NROn, NRLevel, et; and other API propertied from the Radio, Slice, and Panadapter are set back like they were the last time SmartSDR was shutdown. Are those "Last Used" settings stored in the Radio or on the PC.
I recall reading somewhere that persistence is somehow related to comparing the client Program version, API version, and Radio firmware versions. If that is true, then could someone post a general description of the comparison process.

Thanks 73
KD4XR
Jerry

Answers

  • KD0RC
    KD0RC Member, Super Elmer Moderator

    Hi Jerry, I think that they must be stored in the radio. If I log into a friend's 6400, I can see where he was last operating.

    Sounds like you are working on a very ambitious project!

  • Jerry
    Jerry Member ✭✭
    I also think they are stored in the Flex Radio. However, I'm not received the "Last Used" settings when the API provides Radio, Slice, and Panadapter instances. How do I convince the FlexRadio to return the "Last Used" settings. The FlexRadio knows my programs name and PC IP address. So, what is missing. What piece of info do I need to provide that convinces the radio to send a Radio, Slice, and Panadapter with "Last Used" setting?

    BTW: I'm writing the program in C#, WPF and .NetCore 8. I've also migrated the API to .Net8 but having trouble building 64bit due to LibOpus,dll being 32bit. I have LibOpus source and at some point, I'll build a 64bit version. I'm using a Flex6600, TGXL, and PGXL for development.
  • Mike-VA3MW
    Mike-VA3MW Administrator, FlexRadio Employee, Community Manager, Super Elmer, Moderator admin

    If you wireshark the communications between the radio and the PC on port 4992, you will quickly see how it is recovered and what is recovered.

    Using Wireshark to capture and analyze the communication between your FlexRadio and a PC on port 4992 can help troubleshoot or understand the data exchange. Here’s how to set it up, including using the "Follow TCP Stream" feature to analyze the traffic flow:

    Step-by-Step Guide to Capture and Analyze Port 4992 Communication:

    1. Install Wireshark

    2. Determine the Network Interface

    • Open Wireshark and identify the correct network interface for your PC (e.g., Ethernet or Wi-Fi). This is the interface your PC uses to communicate with the FlexRadio.

    3. Set a Capture Filter for Port 4992

    • tcp port 4992This limits Wireshark to capturing only traffic on port 4992, reducing unrelated data.

    4. Start the Capture

    • Click Start to begin capturing data on the selected interface.
    • Perform actions on your PC and FlexRadio to generate traffic over port 4992. For example:
      • Open SmartSDR or another client connected to the radio.
      • Interact with the radio to create network activity.

    5. Analyze the Data

    • Once enough data has been captured, click Stop in Wireshark.

    tcp.port == 4992

    6. Follow the TCP Stream

    • To view the communication flow between the PC and FlexRadio, do the following:
      1. Click on any packet in the capture that uses port 4992.
      2. Right-click the packet and select Follow > TCP Stream.
      3. This will display the entire conversation between the PC and the radio in an easy-to-read format.
      4. Use the drop-down menu in the "Follow TCP Stream" window to filter only data sent by the client, server, or both.

    7. Inspect Individual Packets

    • After reviewing the TCP stream, you can return to the packet view for detailed analysis:
      • Source and Destination IPs to verify communication between the PC and FlexRadio.
      • TCP payload to examine specific data packets or commands.

    Additional Tips for Capturing Traffic:

    • Promiscuous Mode: Ensure Wireshark is set to capture in promiscuous mode (enabled by default) so you don’t miss packets.

    ip.addr == <FlexRadio IP> && tcp.port == 4992

    • Save Your Capture: Save the capture file for later review by going to File > Save As.

    Why Use Port 4992 with FlexRadio?

    Port 4992 is used for TCP communication between the radio and client software, such as SmartSDR.

    By using Wireshark's Follow TCP Stream feature, you can easily see the flow of data and better understand the interaction between your PC and FlexRadio.

  • KD0RC
    KD0RC Member, Super Elmer Moderator

    I don't recall seeing a subscription for last used data. I think that the radio just presents the last frequency used when the slice data is presented. If you don't get a more definitive answer here, you may want to submit a help desk ticket.

  • Jerry
    Jerry Member ✭✭
    Mike,
    Thanks for the info on Wireshark. I am already using Wireshark to follow SmartSDR TCP traffic and it's very helpful. You provided a nice setup tutorial. However, Wireshark shows only low-level messaging between the API and the Radio. The answers I am looking for deal with the communications between the GUI Client and the API. What does my gui client program (FlexLite) need to tell the API to make the API tell the radio to return "last Used" settings. I can run SmartSDR or my program (FlexLite) on the same PC using the same DLL's, and SmartSDR always starts with so called "Last Used" settings while FlexLite always starts with what appears to be default settings. For example, after starting my program (FlexLite), I can change the Frequency to 28.400 adjust the volume and AGCThreshold, turn NT on and set its level and it all works fine. If I shutdown and restart FlexLite, it always comes back with Frequency at 14.100, AudioGain=50, AGCThreshold=60, etc; Those I think are defaults. How do I tell the API to return the last used settings. What API property needs to be set or what API method needs to be called?
  • Alan
    Alan Member ✭✭✭✭

    Len

    There may be another way, But when you send any of the subscription commands, the Flex radio sends a status message of all the current settings associated with the subscription.

    I capture these settings into context for later use, to send API commands to return to the "original" settings.

    Another fact to consider. When a parameter is commanded to change from a GUI client, the flex radio will not send a status message, for the new parameter value, to that same GUI client…..it assumes the client knows….it does send a command confirmation message. You need to keep "sent commands" in context to remember what was last sent.

    Alan. WA9WUD

  • Jerry
    Jerry Member ✭✭
    Len,
    I apologize for not being clear. In my world the term subscribe is a C# way of telling your program to listen for certain event broadcasts from a C# object such as Radio, Slice, Panadapter.
  • Trucker
    Trucker Member ✭✭✭

    Jerry, that is exactly the same way that the term is used with the Flex API. You subscribe to particular events from your application and the radio sends messages to your application and responds to commands from your application and makes any changes that your application sends to the radio. I believe both you and Len are talking about the same thing. Just stating it in a different manner.

    James

    WD5GWY

  • n8wrl
    n8wrl Member ✭✭

    Jerry, I too an a retired C# dev and am writing code against the API. I'd be very interested in your progress on the 64-bit front. Lots of config-hoops to jump thru to get 32-bit builds with other 64-bit libs I'm writing and using.

    73!

    -Brian n8wrl

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.