networking-forum.com
Community BlogCommunity Wiki * Register  * Search  * Login
View unanswered postsView active topics

All times are UTC - 6 hours [ DST ]



Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: TCP connection issues
PostPosted: Fri Jun 15, 2012 7:29 am 
Offline
New Member
New Member

Joined: Fri Jun 15, 2012 7:24 am
Posts: 3
Good afternoon,

I am currently working on a project which purpose is to establish a TCP connection between a PC and a microcontroler.
I configured (in C language) the µC as the server, and the PC as the client (in C#, using the TCPClient class).
While running the codes, I capture the frames on the network with Wireshark.

The client's ISN is chosen randomly by the TCPClient.Connect method.
Since there will be only one TCP connection at a time, the server's ISN is always 0.
The server's port is 0xC0C0 (49344) and the client's port is also chosen randomly by the TCPClient.Connect method.

find the screenshot of the Wireshark's capture attached !

In compliance with RFC793, the three-way-handshake should conclude with an ACK segment from the client.
In my exemple, the client tries to connect three times, and then drops : the client sends no ACK segment.

The µC's SYN-ACK reply may be bad configured ...

What kind of information did I miss ? Are there special data the client is expecting ? Why don't I get back an ACK segment from the client?


Thank you for your help.
Attachment:
exemple_tcp.JPG
exemple_tcp.JPG [ 141.54 KiB | Viewed 253 times ]


Top
 Profile  
 
PostPosted: Mon Jun 18, 2012 4:06 am 
Offline
New Member
New Member

Joined: Fri Jun 15, 2012 7:24 am
Posts: 3
Problem solved : there was an error in the checksum calculation of the SYN-ACK segment.
I didn't take into account the endianness of the µC's memory.


Top
 Profile  
 
PostPosted: Mon Jun 18, 2012 7:47 am 
Offline
Post Whore
Post Whore
User avatar

Joined: Fri Mar 11, 2005 10:26 pm
Posts: 2510
Location: Perth, Western Australia
CLA Innovation wrote:
Problem solved : there was an error in the checksum calculation of the SYN-ACK segment.
I didn't take into account the endianness of the µC's memory.
We used to have that issue when moving between Motorola and Intel micro labs, students would always forget the difference when, say, implementing a stack using assembly language to store data words.

Back then we never thought about TCP comms projects though, that is interesting. Which micro are you using?

Aubrey

_________________
The illiterate of the 21st century will not be those who cannot read and write, but those who cannot learn, unlearn, and relearn. Alvin Toffler, "Future Shock" 1970


Last edited by eaadams on Mon Jun 18, 2012 9:29 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Mon Jun 18, 2012 8:53 am 
Offline
New Member
New Member

Joined: Fri Jun 15, 2012 7:24 am
Posts: 3
I am using a Cortex M3 microcontroler, on the LPC1788 board by NXP.
My project is a driver (in C language) that allows the µC and a PC (Windows XP) to exchange data through a TCP connection.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: MSN [Bot] and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group