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.

Dropped packets with 2 clients same PC

W4WHL
W4WHL Member ✭✭
edited February 2019 in SmartSDR for Windows
I have an issue when connecting 2 clients from the same PC.  I start seeing 50% dropped packets in SmartSDR as soon as another client connects to port 4992.  A simple telnet to port 4992 doing nothing at all causes this.  But if I connect from a separate computer I don't see this issue.

Its as if the radio is confused by 2 IP's on the same IP and same port.  Any idea why?

Thanks

William

Comments

  • George KF2T
    George KF2T Member ✭✭✭
    edited February 2019
    That's what you'd expect. Every client does need a unique address, otherwise the server can't properly route data.

  • W4WHL
    W4WHL Member ✭✭
    edited July 2016
    That does not make much since to me, I am a network engineer by trade,, and I can connect 100 clients to one sever from the same machine, all using the same port.

    If this is true and Flex can't handle this, why write an API at all.  How many people will use a separate PC to run a API app?
    
  • Tim - W4TME
    Tim - W4TME Administrator, FlexRadio Employee admin
    edited March 2017
    Care to share the details, like what clients you are referring to?
  • W4WHL
    W4WHL Member ✭✭
    edited July 2016
    Tim,

    1. SmartSDR
    2. Can be just a telnet to port 4992, but I noticed this when programing my own app that sends commands to the radio.

    But to be clear, just a simple telnet to port 4992.  As soon as the connection is opened.  Smart SDR meter goes all the way down and shows 50% dropped packets.  Thinking it was my APP, I tried just telneting to port 4992.  The telnet cause the same behavior.  So then I tried my app and a telnet from another machine (one not running SmartSDR, and no more dropped packets.

    However This is a gig connection so I don't experience any issues, but its a bit unnerving.  I would think we should be able to connect multiple TCP connected Apps from the same PC.

    William
  • Walt - KZ1F
    Walt - KZ1F Member ✭✭
    edited November 2016
    If your router is using DHCP then they'd have 2 ip addresses. However, if they are connected wirelessly try connecting them via rj-45. You could be losing packets in the router. If you are familiar with interrupt service routines the portion run with interrupts disabled has to be lightning fast as you want interrupts to be enabled whenever possible. That same philosophy works for asynchronous network IO in the program, One of the changes it appear FRS made was to, during the callback, simply queue the packet for another thread to digest the contents of the queue. This is why you don't see the jerkiness anymore. I suspect, if you are connecting wirelessly, the problem is your router not the two programs.

    I am not sure "separate PC to run an API program" makes sense. Might you rephrase that? One hundred clients on the same machine, bound to the same port?

    Are you referring to two instances of telnet?

    A TCP connection is one endpoint to another endpoint. The endpoint is defined as IPAddress:port. The radio is listening for TCP traffic on 4992. On a PC or tablet or whatever the client connects to port 4992 on the ip address of the radio. However, the distal endpoint is not to 4992, that's what the radio is listening on. The port assigned to that connection, when the connect() succeeds is different. You won't see a lot listening on 4992 as that is the tcp endpoint that. UDP broadcasts there the discovery packets but that is once per second. They will show up in wireshark not telnet.

    What telnet will show you is a couple of lines upon initial connection then only status messages in response to add slice or when you lock ptt ... things like that.

    The bulk of the traffic going to SSDR is UDP traffic, this would be panafall, waterfall, the various meters.

    The ask portion of this response: what is it you are running and what is it you are seeing?
  • W4WHL
    W4WHL Member ✭✭
    edited July 2016
    First let me clear something up, I see no dropped physical packets on the port.  And I an connected straight to a gigabit switch.  SmartSDR is just saying dropped packets in the network health indicator.

    I am not experiencing any slowdown, hiccup, or other bad thing.  I just want to know why telneting to port 4992 causes SmartSDR to show dropped packets. 

    I ran wireshark and see no retrans or anything. 

    William
  • Walt - KZ1F
    Walt - KZ1F Member ✭✭
    edited November 2016
    Update: I wish I could copy/paste from my windows machine:
    Here's what a netstat shows

    I have 4 client connections to the radio 192.168.0.12:4992
    the is the distal endpoint
    The proximal endports are
    192.168.0.11:49207
    192.168.0.11:49208
    192.168.0.11:49209
    192.168.0.11:49210

    Even though it is the same distal endpoint they have different proximal endpoints.
    distal == far
    proximal == near.

    What does your netstat show?



  • Walt - KZ1F
    Walt - KZ1F Member ✭✭
    edited November 2016
    I show out of 753300 packets 1 was dropped. is this using remote? I believe, not sure, but that is UDP as well.
  • Walt - KZ1F
    Walt - KZ1F Member ✭✭
    edited November 2016
    there won't be any retransmissions on the UDP traffic and the TCP traffic is pretty miniscule. How many slices do you have open?
    As for where that dropped packet count is coming from, I don't know.
    SSDR wouldn't even know telnet issued a connection. Apparently I didn't buy the deluxe version of win7, I don't have telnet on it. (I am a Linux guy, except for turbotax (which I won't need until next year) and SSDR which I won't need shortly either. That's a different conversation.
    Does Windows say there is retransmission or dropped packets? If there was a break in the sequence number that would be construed as lost packets. The stack itself for known that, not sure the application would/should. The idea behind tcp is the client gets consistently good data, even if there is congestion.
  • W4WHL
    W4WHL Member ✭✭
    edited July 2016
    Walt, all I can say is try it yourself.  Download putty its free and tiny.  Do a telnet to port 4992.  Then watch the network indicator in SmartSDR take a nose dive.

    And this is TCP, and just handshakes.  No data being transmitted

    Also this happens with just a single slice.  TCP uses a unique source port for each new session, so there should be no issues with 2 sessions from same computer.  I can't see why 1 extra tcp session cause SmartSDR problems.  If it does, it surely is a bug!  It one thing if your flodding the radio with TCP data, but just a simple telnet???  Somethings not right here.

    But please someone try this simple telnet test, and watch smartsdr network health.  Let me know.

    William
  • Walt - KZ1F
    Walt - KZ1F Member ✭✭
    edited November 2016
    I do have telnet on my Linux machines and I did connect to the flex with it while ssdr is running in the windows laptop no difference. I will back off and let Tim work the issue with you.
  • Walt - KZ1F
    Walt - KZ1F Member ✭✭
    edited November 2016
    I, apparently, fibbed. Are you referring to the green bars? I thought that was wireless connectivity. If you go to, in ssdr, settings->network that will show you latency and dropped packets.
  • W4WHL
    W4WHL Member ✭✭
    edited July 2016
    Walt, I said earlier that there is no issue with doing it from a different machine.  It has to be the same machine.

    William
  • W4WHL
    W4WHL Member ✭✭
    edited July 2016
  • W4WHL
    W4WHL Member ✭✭
    edited July 2016
    yes the bars

  • Walt - KZ1F
    Walt - KZ1F Member ✭✭
    edited November 2016
    don't look at the bars, I believe that is showing wifi connectivity. goto Settings->Networks. And I was referring to multiple apps connecting from the same machine. It seems you are referring to SSDR and telnet on the same machine pointing to the radio and seeing issues on the radio. Does that machine HAVE a wifi connection. My laptop has both a wifi connection AND a RJ-45 connection, the radio has an RJ-45 connection, Disable the wifi on your windows box and try it.
  • Walt - KZ1F
    Walt - KZ1F Member ✭✭
    edited November 2016
    I am trying very hard NOT to put putty (I don't like it) on my machine and cygwin apparently dropped telnet. I don't believe in the green bars as the only visual equiv to that is a cell connection, not even wifi. On cell phones the bars are connections to the cell tower, wifi is concentric circles. Look at Settings->networks.

    I have telnet installed. I am running it along side SSDR and there is no diffence in the SSDR UI, bars are the same, dropped packet count is the same. I suspect you are running wireless even though you have a hardwire cat 6 or 5e connection.
  • W4WHL
    W4WHL Member ✭✭
    edited July 2016
    I'm not using wifi im on a gigabit switch.  And as I said multiple times.  it only happens if I do it on the same machine running smartsdr.  No packet loss at all is I do it on another machine.  And yes the settings>network is showing MASSIVE packet lose.  But only when I have a telnet running or my APP which is basically just a telnet.  Close the telnet and no more packet loss.

    Here is a video

    https://www.youtube.com/watch?v=xtsTSu2WUzE&feature=player_detailpage



  • W4WHL
    W4WHL Member ✭✭
    edited July 2016
    I tried another PC running SmartSDR and running my app and/or telnet without any packet loss.  I opened 15 telnet sessions to the Flex and not a single dropped packet (and this is over wifi).

    I guess there is something funky on my main machine.  So consider this issue closed.

    William

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.