-->
Page 1 of 1

WiFi connection -> Connected but not always

PostPosted: Thu Oct 15, 2015 10:03 am
by bluegiraffe
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?

Re: WiFi connection -> Connected but not always

PostPosted: Fri Oct 16, 2015 12:40 am
by alonewolfx2
propably wifi signal problem. did you try again closest place to modem ?

Re: WiFi connection -> Connected but not always

PostPosted: Fri Oct 16, 2015 3:22 am
by bluegiraffe
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.