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.

Maximum Datagram size sent from Radio

Walt - KZ1F
Walt - KZ1F Member ✭✭
edited February 2017 in SmartSDR API
In the code, the datagram buffer is set to 65536. According to Elliotte Harold, in one of his books on Network Programming, "most native UDP implementations don't support more than 8K of data per datagram". As I don't know what the native Linux (Android/Raspberry Pi) limits are I wanted to ask what was the real maximum packet size produced.
I have discovery converted and tested with VitaDiscoveryPacket and the other Vita classes converted.  I am less than a week away from having a working portable Flexlib. Working doesn't necessarily mean correctly. Is it possible that FRS will open source the NUnit tests for Flexlib? It would be ideal if there were a way to ask the radio to 'give me one of these packets' where a unit test could tell definitively if it was decoded properly. There are a lot of permutations in any given packet's contents. It would be nice to be able to say something stronger than "it seems to work OK ...knock wood".  I understand I am in a unique position with this request as most all others are running against the stock Flexlib which has already gone through QA.

Thanks,

Walt - kz1f

Answers

  • Walt - KZ1F
    Walt - KZ1F Member ✭✭
    edited November 2016
    Now that it's languished 3 months, I guess I'll answer this. The maximum UDP packet size was found to be greater than 4096 so I set 8192 as the max.
  • Brian M. N9ADG
    edited November 2016
    I'm just looking at the discovery packet description; per http://www.ice-online.com/support/documentation/ice-vita-49-0-radio-transport-ethernet-packet-specif...  it seems like 1440 is the max size of the payload?


  • Walt - KZ1F
    Walt - KZ1F Member ✭✭
    edited November 2016
    Trust me. I was correct the first time.
  • Eric-KE5DTO
    Eric-KE5DTO Administrator, FlexRadio Employee admin
    edited February 2017
    Somehow missed this one until now.  Walt said: "In the code, the datagram buffer is set to 65536."  Which code?

    We definitely use some larger UDP packets for streaming.  The waterfall data is probably the largest as I recall.  I would have to take some measurements to be sure, but I suspect they are indeed in the 8k range.
  • Walt - KZ1F
    Walt - KZ1F Member ✭✭
    edited November 2016
    It was a manifest constant (Max_Vita_Packet_Size or something to that effect) and 65536 is actually not do-able. I believe I verified 8192 as the proper value back a year ago. The orignal question was upon seeing what was the manifest constant was and, according to Elliote Harold, was actually not a valid data size for UDP...It might be it was on Windows or perhaps an unused constant. XPSLib handles all the data streams just fine now, I inched it up from the 2k default to 8K. I finished it and the testing over a year ago at this point and haven't had a failure yet.

    But thanks for getting back to me Eric :-) Seriously, I know you have been busy. Any time you are free to talk about some other issues, by all means, let me know.
  • Eric-KE5DTO
    Eric-KE5DTO Administrator, FlexRadio Employee admin
    edited December 2016
    I'm sure you are aware Walt, but for everyone else's benefit: the UDP protocol is interesting in that you can send relatively large datagrams and the protocol will actually break it into digestible (read reasonably-sized) packets and reassemble them at the far end.  As such, the limit on the size as defined in the IPv4 space is just under 64K (http://lmgtfy.com/?q=max+udp+packet+size).

    Feel free to post questions here anytime (or a link to one if I've missed it!) -- however, I may require a demo of XPSSDR before I answer.  ;)
  • Walt - KZ1F
    Walt - KZ1F Member ✭✭
    edited November 2016
    I'd be more than happy to accommodate that
  • Lee Maisel
    Lee Maisel Member
    edited June 2016
    Will we be able to buy it for OSX/Linux soon?

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.