Sming - Open Source framework for high efficiency native ESP8266 development

User avatar
By bluegiraffe
#31431 So, I'm starting to do some development using the Sming framework, and I have this rather common issue.

The WifiStation.waitConnection(connectOk, 30, connectFail) function will call the connectOK function when it successfully connects. On that function I do a standard HTTP request. So far so good and most of the times works fine.

But what the behaviour that I have is that some times the first HTTP request fails, and the following ones succeed....

So it seems that even after connectOk is called the Wifi connection is not completely established.... but this does not happen always.

Any ideas?
User avatar
By bluegiraffe
#31494 Hi. Yes it looks like a problem on the Wifi router and not on Sming.

After connecting, on the connectOK function I added another 5s delay/timer, before doing any HTTP calls.
It got better, but still the first call fails sometimes. The next calls always succeed.

The router is a FON Simpl router, so probably crappy, and it's 50 cm away.

I'm going to test with another router that I have (that is farther away), and if the problem goes away, it's definitely the router.