Shop OBEX P1 Docs P2 Docs Learn Events
5100 http server closing the connection — Parallax Forums

5100 http server closing the connection

R PankauR Pankau Posts: 127
edited 2012-06-27 10:42 in Propeller 1
I'm almost there, I have a working web page (until I broke it last night) using a 5100 wiznet with prop (homegrown spinneret). The web page displays just fine in browsers like firefox, although the log in wireshark does show a red entry near the end of the exchange every time. Also I really wanted this to work with my Kindle touch but it is pretty picky evidently when it comes to protocol so it complains and does not display the page at all.

Long story short, it would seem that my disconnect and closing of the socket sequence is not correct and the browser does not like it too much.
In 5100 socket terminology what is the proper protocol for ending an HTTP exchange? So far I've been sending the data, then immediately closing the connection but now I think I should be waiting for some ack from the client that the page was received, then some sort of "let's hang up now" exchange that I am unfamiliar with.

part of my problem is that I am unfamiliar with the protocol in general, then throw in the 5100 datasheet which is a language all its own it would seem.

if anyone had a working webserver in spin that they'd be willing to share, that would probably be the tutorial that I need.

thanks.

Comments

  • JavalinJavalin Posts: 892
    edited 2012-06-27 08:29
    Best look in the spinneret forums, under the speciallity forums - MikeG' example code is in there as a sticky.
  • R PankauR Pankau Posts: 127
    edited 2012-06-27 10:03
    so that's forum:general:?? or is this under the prop forum.
  • R PankauR Pankau Posts: 127
    edited 2012-06-27 10:03
    found it, specialty... thanks.
  • Mike GMike G Posts: 2,702
    edited 2012-06-27 10:42
    R Pankau, Verify that the expected data has been sent and Tx Read and Write pointers are correctly updated in 5100. The header is especially important if you are sending content-length:. Then start the disconnect process. Send the FIN command by setting the socket status register to DICON. Check that the status register goes from disconnecting to disconnected. Restart the listener. Otherwise, check for a timeout and/or force a disconnect.
Sign In or Register to comment.