Response Time to Sucessful Connection

  • 1
  • Question
  • Updated 1 week ago
  • Answered
  • (Edited)

I can receive the discovery packet or packet(s) if desired and I have decoded and parsed the information then used it to establish a connection with the 6400M server via tcpip on the same port. I am receiving the radio response however it is not consistent in size or content after the connection is established successfully.

Here is my question:

How long after the connection is established must I wait for the Radio to respond with the V, H, M and 10 S packets/messages?

The reason I am asking is I am not getting consistent responses from the Radio. Sometimes I get 436 byte, 837 byte data returns then sometimes I get the correct 1276 byte return in one retrieval.

I have tried 100 ms / 500 ms and 1 sec delay times before requesting the data from the tcpip buffer without much difference in results.

It will normally stop at "=50" on 436 bytes and stops normally at "connected" for the 1276 bytes which is the total return expected.

I am sure it is something I am not doing correct but until I can get consistent 1276 byte info returned after the connection is made I cannot proceed to parse the V, H, M, and S messages or to go on and establish the UDP port for streaming.

Using the Winsock control in vb6 not a .NET fan. (Please no comments about which language I choose since it can be accomplished in any language. I just prefer to use the language I am most fluent with for programming)

Yes I have seen and am using the Flex API Primer document.

Any help is appreciated.

Photo of wayne suite

wayne suite

  • 264 Posts
  • 32 Reply Likes

Posted 2 weeks ago

  • 1
Photo of Steve

Steve

  • 14 Posts
  • 10 Reply Likes
I am no where near where you are at with this stuff...BUT there is a documented problem with Smartlink and packet sizes.  It NEEDS to be fix sooner rather than later..73's
Photo of wayne suite

wayne suite

  • 264 Posts
  • 32 Reply Likes
Just using the Api not doing any remote stuff like smartlink or tablet that requies internet. Just local network stuff.
Photo of wayne suite

wayne suite

  • 264 Posts
  • 32 Reply Likes
Success! After 3 hours of adding 10 lines of code here and there with varying results none acceptable came up with a solution which was only 3 lines of code and works great and returns consistent radio responses to a network connection. Finally moving on to 4 types of message detection and receiver status settings.


Onward and Upward!
(Edited)
Photo of Doug - K3TZR

Doug - K3TZR

  • 68 Posts
  • 4 Reply Likes
Wayne,

I've written an API tester for the Mac that allows you to experiment with the API. Here's a screenshot of the responses I receive when establishing a connection.


as you can see it has timestamps in the first column (in seconds). In this case it took 6 ms for the "V" response to arrive.

I hope that helps.
Photo of Eric - KE5DTO

Eric - KE5DTO, Official Rep

  • 653 Posts
  • 198 Reply Likes
The radio should respond quickly as noted in Doug's screenshot (milliseconds).  This can be clearly be impacted by the network between the client and the radio.  As such, in general, the approach to TCP/IP communications really must be done in a way that makes very few assumptions about the timing of the replies to queries.  It must be handled as an asynchronous connection that may or may not ever respond.  This is the nature of robust networking code.
Photo of wayne suite

wayne suite

  • 264 Posts
  • 32 Reply Likes
Yes I was not waiting long enough on the data arrival event to get the whole packet of data ... now i am a d get all 1276 bytes of the response once connected.
Photo of wayne suite

wayne suite

  • 264 Posts
  • 32 Reply Likes
If would appreciate it if I could get the program your using with mac. Email is dfw1417@gmail.com thanks!,
Photo of Doug - K3TZR

Doug - K3TZR

  • 68 Posts
  • 4 Reply Likes
HI Wayne,

It’s on GitHub (https://github.com/DougPA/xAPITester) . I’d be glad to provide any help I can and/or answer questions. There is a pdf with some documentation but it hasn’t been updated to match the latest version of the program. You can download the sources and compile it yourself or you can download the executable in the Release.