STM32-Arduino icon indicating copy to clipboard operation
STM32-Arduino copied to clipboard

SimpleWebServerWiFi Fail

Open Goheeca opened this issue 9 years ago • 2 comments

When I was playing around with Duo and this example, I came across a nasty bug.

I let the root page show on the Nexus 5 and that worked just fine, then I've used LG G3 instead of Nexus 5 and the Duo's begun blinking red. According to Photon docs the LED indicated 'Hard fault'.

How to reproduce

I've cought the communication with Wireshark and here are the particular http requests. Possibly change the host ip address in them accordingly. The Duo runs 0.2.2 fw.

The working request: nc -i 1 10.1.2.205 80 < Nexus_5 The non-working request: nc -i 1 10.1.2.205 80 < LG_G3

Goheeca avatar Mar 03 '16 20:03 Goheeca

I use some Android Phones to test it .When I use the browser of system or google browser,it doesn't have problem.But when using other browser , the problem appear.

JacksonLv avatar Mar 07 '16 06:03 JacksonLv

I've looked in the code. The problem is the fixed buffer length (in which the lines from the http request have to fit in) or more generally the way of processing the http requests. The buffer is 150 bytes long. And the longest lines in requests are:

  • Nexus 5: 148 bytes
  • LG G3: 158 bytes

Clearly, that's not good for these hello world examples.

Goheeca avatar Apr 02 '16 13:04 Goheeca