Wificlient.connected fails

Fugazi
Posts: 9
Joined: Wed Feb 24, 2016 5:33 am

Wificlient.connected fails

Postby Fugazi » Wed Mar 23, 2016 9:54 pm

Current setup

WIFI_AP_STA mode connected to a router.

client connects to the AP side of things via TCP connection which is kept open and is transmitting and receiving.

All works great until if the router disconnects or goes out of range on the station side, the client which is connected via the AP then fails even though it has valid connection and is in range, WifiClient.connect comes back false.

I think when the station disconnects or fails to talk to the router, the system drops Station and Access point connections ?

This is what I am seeing anyway, help ? :)

ESP_Faye
Posts: 1646
Joined: Mon Oct 27, 2014 11:08 am

Re: Wificlient.connected fails

Postby ESP_Faye » Thu Mar 24, 2016 10:11 am

Hi,

Yes, this is a limitation of ESP8266.
Although ESP8266 can work in softAP+station mode, but it actually has only one hardware channel.
More details are in http://bbs.espressif.com/viewtopic.php?f=61&t=324.
Sorry for the inconvenience.

Fugazi
Posts: 9
Joined: Wed Feb 24, 2016 5:33 am

Re: Wificlient.connected fails

Postby Fugazi » Thu Mar 24, 2016 9:13 pm

thank you for the reply.

Is there a document with all these known limitations in so we can know what it can and cant do?

Just thought, how about if we are setup in AP and STA mode, then once the Station has connected to a router, then perhaps it can only connect again on the same channel , then the AP wont break, this could be some functionality ?

Usually once it has found a router, it will be connecting and reconnecting to the same one ?

Or is there anyway to force the Station to not scan for a AP, but to lock onto the same channel?

I have tried calling

wifi_station_set_reconnect_policy(false);
wifi_station_set_auto_connect(false);

above and below the connect, but the station keeps trying to connect :(

Thanks

ESP_Faye
Posts: 1646
Joined: Mon Oct 27, 2014 11:08 am

Re: Wificlient.connected fails

Postby ESP_Faye » Tue Mar 29, 2016 4:58 pm

Hi,

wifi_station_set_reconnect_policy(false); // if the ESP8266 station connected to the router, and then the connection broke, ESP8266 will not try to reconnect to the router.

wifi_station_set_auto_connect(false); //the ESP8266 station will not try to connect to the router automatically when power on until wifi_station_connect is called.

wifi_station_disconnect(); // ESP8266 station disconnects to the router, or ESP8266 station stops trying to connect to the target router.

Fugazi
Posts: 9
Joined: Wed Feb 24, 2016 5:33 am

Re: Wificlient.connected fails

Postby Fugazi » Fri Apr 01, 2016 11:40 pm

Thank you :)

Who is online

Users browsing this forum: No registered users and 1 guest