TCP/IP lite library wont close connection properly

(instructions, reset, WDT, specifications...) PIC17Cxx, PIC18Fxxx

TCP/IP lite library wont close connection properly

Postby roenyroeny » Mon Nov 13, 2017 3:45 pm

Hi All,

I've been putting together a small HTTP server on a PIC18F66j60 using the TCP/IP lite stack(v2.28) generated by MCC.
I based the server code on the sample provided in AN1921 ( page 17 )
There are a few issue's with the sample in the application note, e.g. socket_state_t seems to have been renamed to socketState_T. And near the end of the sample port60TCB is referenced, which should have been port7TCB.
So i doubt anybody @Microchip actually tested the sample ;)

The problem i'm running into is that i cant manage to close the connection properly, i can close it form the client ( a pc in this case ) but not from the PIC. The sample from the application note doesn't actually close the connection from the pic, So it could be that this is untested.
Whenever i attempt to close the connection it either ends up hanging in the SOCKET_CLOSING state or makes it all the way around to a new connection ending up in the SOCKET_IN_PROGRESS state without actually closing the connection. This means its up to the client to time out at some point, Which is not ideal when the client is a browser ;)

I analysed the packets using Wireshark and didn't see any FIN's.

Here is a link to a 'small' repro case. I've been using a small oled display (code included), but a breakpoint should do the trick as well.

Any help would be appreciated!

-Jeroen
roenyroeny
 
Posts: 1
Joined: Mon Nov 13, 2017 3:36 pm
PIC experience: Professional 5+ years with MCHP products

Return to 16-Bit Core

Who is online

Users browsing this forum: Bing [Bot] and 0 guests