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.

Meter data duplicated?

John G3WGV
John G3WGV Member ✭✭
edited November 2018 in SmartSDR API
For some time I've wanted to put some software damping on the S-meter to stop it bouncing around quite so wildly, so that took me into code I've not looked at for a while to check timings.

I was perplexed to discover that my API library was sending three identical S-meter events to my application within 1ms of one another and assumed I had a bug. In fact, it appears that the radio is sending multiple copies of meter data per packet.

In the following screen-scrape of a Wireshark UDP packet capture, the S-meter is meter 0x0015:

image

The three sets of S-meter data are highlighted. Further inspection shows that other meters are sent multiple times as well. As the meter data are always identical in a given packet I've fixed the issue by only processing the first occurrence of each meter per packet.

Is it a bug, a feature or by design?

73, John, G3WGV

Answers

  • Doug - K3TZR
    Doug - K3TZR Member
    edited November 2018
    John,

    I've added some code to my API Tester to check for meter duplication in a single Vita meter packet. The code keeps track of which meters are contained in a single Vita meter packet and how many times it has seen that meter in the packet. It produces a printout whenever the count for a meter is greater than one.

    Here's a portion of what got printed:

    meter = 5, count = 2

    meter = 1, count = 2

    meter = 14, count = 2

    meter = 17, count = 2

    meter = 19, count = 2

    meter = 2, count = 2

    meter = 18, count = 2

    meter = 1, count = 2

    meter = 11, count = 2

    meter = 12, count = 2

    meter = 10, count = 2

    meter = 13, count = 2

    meter = 14, count = 2

    meter = 5, count = 2

    meter = 6, count = 2

    meter = 7, count = 2

    meter = 3, count = 2

    meter = 1, count = 2

    meter = 8, count = 2

    meter = 17, count = 3

    meter = 19, count = 3

    meter = 22, count = 3

    meter = 18, count = 3

    meter = 2, count = 3

    meter = 4, count = 3

    meter = 9, count = 3

    meter = 21, count = 3

    meter = 23, count = 3

    meter = 24, count = 3

    meter = 1, count = 3

    meter = 5, count = 3

    meter = 1, count = 3

    meter = 14, count = 3

    meter = 17, count = 3

    meter = 19, count = 3

    meter = 2, count = 3

    meter = 18, count = 3

    meter = 1, count = 3

    meter = 11, count = 2

    meter = 12, count = 3

    meter = 10, count = 3

    meter = 13, count = 3

    meter = 14, count = 3

    It seems to happen constantly. As you asked, Is this by design or is it a bug?



  • John G3WGV
    John G3WGV Member ✭✭
    edited May 2018
    Hi Doug,

    Yes, that tallies with what I am seeing on my V2.1.33 system. I'm surprised I'd not noticed it before and I wonder if it might have been introduced with V2?
  • Doug - K3TZR
    Doug - K3TZR Member
    edited May 2018
    My system is also 2.1.33. I'm not sure about previous versions.
  • John G3WGV
    John G3WGV Member ✭✭
    edited May 2018
    I'm sure Eric will be along in a bit to give us the inside track.
  • Eric-KE5DTO
    Eric-KE5DTO Administrator, FlexRadio Employee admin
    edited May 2018
    Looks like a bug to me.  I wouldn't expect the same meter to show up in the same meter packet more than once.  I've captured this as #6250 for tracking.  We will let you know what we find.
  • John G3WGV
    John G3WGV Member ✭✭
    edited May 2018
    Thanks Eric.
  • Steve-N5AC
    Steve-N5AC Community Manager admin
    edited November 2018
  • James Whiteway
    edited July 2018
    Steve, I saw this behavior in SSDR in versions prior to 2.3. You could add meters over and over. Haven't seen it since then. Maybe you fixed it! James WD5GWY
  • Doug - K3TZR
    Doug - K3TZR Member
    edited October 2018
    The duplicates I saw in 2.1 were the same meter being listed more than once inside a single Vita meter packet. Running 2.3.9 I'm not seeing any duplicates of this type.
  • John G3WGV
    John G3WGV Member ✭✭
    edited July 2018
  • John G3WGV
    John G3WGV Member ✭✭
    edited July 2018
    As an aside, I tried Wiresharking with only Smart SDR connected to the 6500 and was curious to note that I couldn't see any UDP VITA49 meter packets at all. Does Smart SDR use some other way to get meter data out of the radio?
  • Steve-N5AC
    Steve-N5AC Community Manager admin
    edited July 2018
    What version of SmartSDR are you running? I tried multiple clients and did not observe this problem.
  • John G3WGV
    John G3WGV Member ✭✭
    edited July 2018
    V2.3 now, problem first seen on V2.1. I can't think of anything else to try but I also cannot see that Wireshark can lie. Were the multiple clients all connected concurrently and all subscribed to meters?
  • Steve-N5AC
    Steve-N5AC Community Manager admin
    edited July 2018
    Yes I connected CAT and DAX locally and then CAT from another system thinking this was the issue. I would not suggest that the problem doesn’t exist nor that Wireshark lies. But we need to duplicate the problem to fix it so I’m just trying to make it happen so I can see what the cause is (so it can be fixed).
  • John G3WGV
    John G3WGV Member ✭✭
    edited July 2018
    I don't think this is anything to do with CAT or DAX, neither of which I use. It seems to be a direct consequence of multiple concurrent clients that have each subscribed to meter data. My set up is:

    1. Smart SDR (the GUI client)
    2. My controller (you saw it at Visalia in 2017)
    3. My logging program
    4. The test controller, whose UDP stream I am Wiresharking.

    All are connected concurrently and all but the logging program subscribe to meter data.
  • John G3WGV
    John G3WGV Member ✭✭
    edited July 2018
  • Steve-N5AC
    Steve-N5AC Community Manager admin
    edited July 2018
  • John G3WGV
    John G3WGV Member ✭✭
    edited July 2018
    Result, Steve, well done. I always have to figure out how to use Wireshark each time I have a problem like this and need to go back to first principles. It's very powerful but it's easy (for me at least) to get it wrong and wonder what on earth is going on!

    This was never really a critical problem, as I suppose the number of people that are doing what I do with multiple clients is always going to be small. Cracking it early on a Saturday morning, TX time, is definitely going beyond the call of duty. Many thanks.
  • Steve-N5AC
    Steve-N5AC Community Manager admin
    edited July 2018
  • Doug - K3TZR
    Doug - K3TZR Member
    edited August 2018
    I just saw the same behavior in 2.3.9 that John reported, duplicate meters in a single Vita meter packet when running two clients simultaneously (in this case my SmartSDR-like client and my xAPITester).
  • Eric-KE5DTO
    Eric-KE5DTO Administrator, FlexRadio Employee admin
    edited August 2018
    Note that the fix mentioned above will be in v2.4 when it is released (currently going through Alpha testing).

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.