This is our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

I have created socket program in C# console application using Asynchronous Server Socket. I referred example from below site to listen to particular port on server. https://msdn.microsoft.com/en-us/library/fx6588te(v=vs.100).aspx

My client is device (like vehicle tracking device) which sends data periodically using AT command through GPRS service. Most of the time data received on server by my console application but some time data not received by my application.

When data send by device it gets reply "Send OK" from SIM card but my console application on server doesn't receive any thing.

I have checked client, server communication using wireshark utility. We monitor the port & found some times ACK between client & server is missing. This data is received on wireshark but not on c# console application.

Can you please let us know what setting I missed in program or on server ? Please refer screen of captured TCP data. Here 216 is our server IP & device IP is 106. enter image description here

http://i.stack.imgur.com/WOjjs.png

asked 09 Oct '15, 21:55

Sushil%20Jadhav's gravatar image

Sushil Jadhav
1112
accept rate: 0%

No easy to tell with nothing than that picture. So with a lot of guessing, it seems that the client stack and the client application are out of sync.

The stack sends an RST and after that he sends data...

(10 Oct '15, 01:47) Christian_R

Is there any setting need to be done at windows end or in my program? We are badly trying this issue from long time. Some times it happen that even data is sent by device successfully but not received on server.

(10 Oct '15, 05:11) Sushil Jadhav

Have written the client app, too? And what kind of OS has the client.

(10 Oct '15, 13:54) Christian_R

This data is received on wireshark but not on c# console application.

can you please tell us which frame number in the screenshot shows that situation?

BTW: There is no way to do any meaningfull troubleshooting based on a screenshot. So, if you can't provide a capture file, this is going to take a loooong time ;-)

(11 Oct '15, 05:04) Kurt Knochner ♦

Formal correction of my previous comment: Have you written the client app, too? And what kind of OS has the client?

(11 Oct '15, 12:33) Christian_R

No, I have not written the client app but our organization is developing it. Client is electronic device & its code is written into C language which just pass AT command to SIM card (like AT + CIPSEND). Data is then sent by SIM GPRS system on server where my application is running.

None of the frame received on c# application from above screen. And this happens only for few times. Most of the time data received perfectly on my application.

(11 Oct '15, 21:01) Sushil Jadhav

Maybe you have ask the client developers. Or you could provide us a trace with an good and an bad example.

Otherwise I just can repeat what Kurt already has said:

There is no way to do any meaningfull troubleshooting based on a screenshot. So, if you can't provide a capture file, this is going to take a loooong time

(12 Oct '15, 13:54) Christian_R

Hi Both,

Thanks for update. I was actually avoiding to share capture file on public forum as it contains my IP & port details. Is there any way I can provide you personally on mail or by other way of communication. We really want to go away from this issue.

(12 Oct '15, 21:31) Sushil Jadhav

Hi, either you send me an email to the email address I used in my profile. Or the better way you can use tracewrangler https://www.tracewrangler.com/ to anonymize your capture.

(12 Oct '15, 22:53) Christian_R
showing 5 of 9 show 4 more comments

None of the frame received on c# application from above screen.

well, there is an attempt for a 3-way TCP handshake. Apparently the SYN-ACK does not make it to the client (106.) and thus it sends a RESET after some time. Your application should have seen the SYN though, unless the OS is finishing the 3-way handshake and only then hands over the socket to your application. It depends on the way your application works.

All frames after the first RESET from the client will (most certainly) be discarded directly by the OS, because they don't belong to any established session, so it's (most certainly) correct that your application won't see any of those frames.

The problem seems to be with the client, as it RESETs the session, but after that it seems to send the ACK for the 3-way handshake (SEQ=1, ACK=1), but with payload (len=15), which is certainly 'crap'. Maybe there is a security device between the client and server who does all this, maybe it's the client itself. Hard to tell without further information (involved infrastructure, pcap file, etc.)

Regards
Kurt

permanent link

answered 12 Oct '15, 14:40

Kurt%20Knochner's gravatar image

Kurt Knochner ♦
24.8k1039237
accept rate: 15%

Hi Kurt,

Thanks for update. This information helps me to understand few things of TCP. I was actually avoiding to share capture file on public forum as it contains my IP & port details. Is there any way I can provide you personally on mail or by other way of communication. We really want to go away from this issue.

(12 Oct '15, 21:37) Sushil Jadhav
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×752
×12

question asked: 09 Oct '15, 21:55

question was seen: 1,288 times

last updated: 12 Oct '15, 22:53

p​o​w​e​r​e​d by O​S​Q​A