TCP client to server data to NSS listener, NBT (NetBIOS over TCP)
Hi, So I have successfully established TCP connection with the 3-way handshake (SYN, SYN-ACK, ACK) to a listening port on Windows "139" which so happen to be a NetBIOS Session Service SMB listening application - this is between NXP FRDM K64F as CLIENT development board and the PC as LISTENER/SERVER.
I have now programed the FRDM to send out raw data (String: "Hello World...") over this connection but the data is not getting ACK'ed.
Setting aside that my packet is not ACK'ed by the PC, as far as passing data and PC response back, is this WireShark capture VALID exchange between the FRDM and the PC? I'm asking because I'm trying to understand all the details of code in the FRDM as far as what to do in callback functions, e.g. recv(), send(), sent(), poll(), err()...
The following talks about what I see on WS. Can someone explain if this is valid and what the last packets exchanged are doing?
After 3-way handshake connection:
- WS captures and tags raw data packet FRDM sent via TCP driver code as an NBSS protocol packet from FRDM IP:port to PC IP: 139, and Message Type: "NBSS Continuation Message". The plain data payload has been wrapped correctly by FRDM (driver) code for TCP headers and passed to the IP layer, to ethernet and out, Seq=1 Ack=1 Len=32. WireShark sees it as NBSS packet and I see my string in the detail of the log as NetBios Session Service Continuation data: (hex format of) "Hello World..."
- PC IP:139 response back with NBSS, Message type: "Negative session response" (0x83), Error code: Unspecified error (0x8f)
- For some reason I still have to debug, FRDM re-sends the data (retries = 2) probably because it was not ACK'ed the first time (sent() callback not called) as deciphered by the protocol stack in the board. WS tags the packet the same type NBSS Continuation Message.
- Still no ACK for the data packet, BUT, the PC (re)sent the TCP ACK, I think for the last 3-way handshake connection establishement? Or, Was that the ACK for data packet I sent?
- The PC sends 2x more [TCP Retransmission] PC:139 -> FRDM:port [FIN, PSH, ACK], ...
- FRDM finally replies back from FRDM:port -> PC:139 [RST,ACK]
NOTES:
- After 1x data transmission I actually close the TCP connection. I don't do loops.
- Port Listener free SW utility I'm running on the PC listener/server did not see / not displayed the raw data on port 139
- I don't know or understand how to use echotool.exe to catch and display my data. I can't figure out from the -help shown switches to use with the command.
Any comments?
Thanks. MI