Quantcast
Channel: MSP430 Technical Forums
Viewing all articles
Browse latest Browse all 2077

CC3200 Wifi delay issue

$
0
0

First day with Energia, loaded it onto my 3200 in minutes, so sofar its a lot more user friendly than the TI offer :)

 

I have been trying out the webserver demo, and noticed that if I dont include a small delay in every println the connection gets dropped, I am guessing this is some buffer being filled faster than it can offload to the webclient.

 

The interesting part of the code is below, in the dummy printouts, if I lower delay to 1 or just remove it, the connection is closed pretty early, 5 seems steady, and 2 was not enough, so somewhere in between.

 

The CC3200 is connected to a local wifi, not sure which speed though.

        if (c == '\n' && currentLineIsBlank) {
          // send a standard http response header
          client.println("HTTP/1.1 200 OK");
          delay(25);
          client.println("Content-Type: text/html");
          delay(25);
          client.println("Connection: close");  // the connection will be closed after completion of the response
          delay(25);
          client.println("Refresh: 5");  // refresh the page automatically every 5 sec
          delay(25);
          client.println();
          delay(25);
          client.println("<!DOCTYPE HTML>");
          delay(25);
          client.println("<html>");

          for (uint16_t i=0; i<2000; i++)
          {
            client.println("Dummy");
            delay(5);
          }

Any ideas ?


Viewing all articles
Browse latest Browse all 2077

Trending Articles