Author Topic: Problems with WiFi  (Read 16798 times)

WarpedPixel

  • Newbie
  • *
  • Posts: 4
Re: Problems with WiFi
« Reply #15 on: April 21, 2014, 02:19:02 pm »
I think I now understand what is happening in my case, with the connections sticking around, the next requests are actively refused by the WiFi module before any of my code has a chance to see the requests. So we have two options: the first is to close all connections immediately, since we can only handle one at a time, and the other one is to keep that connection always open and reuse that sequentially to make multiple transfers (but we need to terminate each request with explicit sizes, Content-Length or Chunked transfer).

Has anyone had success implementing a DigiX server with keep-alive in the connection, and chunked web transfers using the new chunked support in DigiFi? This seems like a reasonable approach, that could be fairly efficient, as long as the clients on the other side (browsers) don't try to get too smart. These are all guidelines, so a browser could honor keep-alive and reuse that connection but also have multiple connections and pipeline them heavily assuming a beefy serve on the other side. That would be bad. The only super safe mechanism is to ensure all connections can be immediately closed on the other side (Connection: close and explicit sizes?)



gogol

  • Sr. Member
  • ****
  • Posts: 398
Re: Problems with WiFi
« Reply #16 on: July 17, 2014, 12:31:03 am »
From my understanding that problems should be solved by the work of user jamiecockrill here: http://digistump.com/board/index.php/topic,1480.0.html

pegasus44

  • Newbie
  • *
  • Posts: 12
Re: Problems with WiFi
« Reply #17 on: July 18, 2014, 02:26:38 am »
I tried all of these fixes and nothing really helps... I'm turning the leds on and off via HTTP requests. The lights turn on and off with almost no delay, so that part is perfect. The problem is that the browser (or an app) cant send another request for 2-3 seconds because the digix needs that long to answer...
The response is actually only 200 OK and Connection: close, without any real data anywhere...

gogol

  • Sr. Member
  • ****
  • Posts: 398
Re: Problems with WiFi
« Reply #18 on: July 18, 2014, 04:49:38 am »
I tried all of these fixes and nothing really helps... I'm turning the leds on and off via HTTP requests. The lights turn on and off with almost no delay, so that part is perfect. The problem is that the browser (or an app) cant send another request for 2-3 seconds because the digix needs that long to answer...
The response is actually only 200 OK and Connection: close, without any real data anywhere...

As you have nothing written in that thread up to here, it might be the better way, to open a new thread and describing exactly, what you are doing.  Attach code and network dumps, so that others can review. There are 1001 way, to switch LED with HTTP-requests. 

pegasus44

  • Newbie
  • *
  • Posts: 12
Re: Problems with WiFi
« Reply #19 on: July 18, 2014, 06:55:38 am »
Yeah I tried the "Transfer-Encoding: chunked" again and rewrote the response code and it magicly works a lot faster... I would say it takes digix 1/4 of a second to be ready for another request ... good enough for me :)
Tnx for the help though :P