I’m running a state machine in loop, a state transition requires the loop to restart with a 1 ms delay.
State 1: Connect to 192.168.1.100*:80 (success)
State 2: Send HTTP Request (success)
State 3: Receive webpage (failure)
Responce should be, according to pc terminalHTTP/1.1 200 OK<\r><\n>
Date: Tue, 28 Jan 2014 20:31:10 GMT<\r><\n>
Server: Apache<\r><\n>
Vary: Accept-Encoding<\r><\n>
Content-Length: 11<\r><\n>
Connection: close<\r><\n>
Content-Type: text/html<\r><\n>
<\r><\n>
< 1234;12 ><\r><\n>
Resonse Spark Core reads is:
HTTP/1.1 200 OK<\r><\n>
Date: Tue, 28 Jan 2014 20:34:24 GMT<\r><\n>
Server: Apache<\r><\n>
Vary: Accept-En
It just ends after about 80-100 chars, my code keeps reading, but nothing is coming.
Strange part is, the google example does work, but only occasionally.
The most annoying part is that a faulty request, something like GET /blard HTTP/1.0\r\n\r\n, receives an 404 which is read completely and displayed on terminal and state 5 (parsing data)
I don’t think that’s the answer… because I have been experimenting with 200 responses that return variable amounts of data anywhere from a couple hundred bytes to 1500 bytes. It’s some issue with how the data is buffered from the CC3000 and how the TCP library extracts it. You could be right about a bad circular buffer though