ESP8266 Developer Zone The Official ESP8266 Forum 2014-12-26T17:58:13+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=103 2014-12-26T17:58:13+08:00 2014-12-26T17:58:13+08:00 https://bbs.espressif.com:443/viewtopic.php?t=103&p=367#p367 <![CDATA[Re: Station WiFI - connection to router]]> Statistics: Posted by FrenkR — Fri Dec 26, 2014 5:58 pm


]]>
2014-12-26T16:20:13+08:00 2014-12-26T16:20:13+08:00 https://bbs.espressif.com:443/viewtopic.php?t=103&p=365#p365 <![CDATA[Re: Station WiFI - connection to router]]>
FrenkR wrote:
wifi connection to a router.

is there any way to get callback immediately after status wifi_station_connect() is set to IDLE or range from STATION_WRONG_PASSWORD to STATION_CONNECT_FAIL?
Right now, after calling wifi_station_connect(), I have timer that checks wifi connection every 1 second. From debug window, I see that if connection is broken, system automatically tries to reconnect again. For me, better option would be callback function on status change. In callback, I would disconnect, (re)initialize parameters and connect again with some delay.

Currently I have only UART1 debug info on GPIO2. Is there any setup (API) to get more detailed (debug) info about connecting to wifi (station mode)?


Our OS version SDK will meet your requirement soon...

Statistics: Posted by jackon — Fri Dec 26, 2014 4:20 pm


]]>
2014-12-26T16:00:17+08:00 2014-12-26T16:00:17+08:00 https://bbs.espressif.com:443/viewtopic.php?t=103&p=363#p363 <![CDATA[Re: Station WiFI - connection to router]]> Statistics: Posted by ESP_Faye — Fri Dec 26, 2014 4:00 pm


]]>
2014-12-26T08:51:43+08:00 2014-12-26T08:51:43+08:00 https://bbs.espressif.com:443/viewtopic.php?t=103&p=360#p360 <![CDATA[Re: Station WiFI - connection to router]]>
is there any way to get callback immediately after status wifi_station_connect() is set to IDLE or range from STATION_WRONG_PASSWORD to STATION_CONNECT_FAIL?
Right now, after calling wifi_station_connect(), I have timer that checks wifi connection every 1 second. From debug window, I see that if connection is broken, system automatically tries to reconnect again. For me, better option would be callback function on status change. In callback, I would disconnect, (re)initialize parameters and connect again with some delay.

Currently I have only UART1 debug info on GPIO2. Is there any setup (API) to get more detailed (debug) info about connecting to wifi (station mode)?

Statistics: Posted by FrenkR — Fri Dec 26, 2014 8:51 am


]]>
2014-12-25T17:27:03+08:00 2014-12-25T17:27:03+08:00 https://bbs.espressif.com:443/viewtopic.php?t=103&p=349#p349 <![CDATA[Re: Station WiFI - connection to router]]> http://bbs.espressif.com/viewtopic.php?f=7&t=104

system after calling wifi_station_connect() and when connection is broken, rescans and tries to reconnect to wifi automatically(when system detects unsucessful connect, it does step 8 and step 6 again). Is there any way to disable this behavior?
-> call wifi_station_disconnect() to disconnect a router, we won't connect to it automatically ; call wifi_Station_set_auto_connect(0); we won't connect to router automatically when power on.

After some time(e.g. 30 min) of constantly losing a connection, system cannot connect anymore. After restart, module connects itself again.
-> Sorry that I'm a little confused what are you asking.. Can you offer more information like some logs ? what is the connection means ? TCP connection or wifi connection to a router ?

Statistics: Posted by ESP_Faye — Thu Dec 25, 2014 5:27 pm


]]>
2014-12-25T01:28:17+08:00 2014-12-25T01:28:17+08:00 https://bbs.espressif.com:443/viewtopic.php?t=103&p=345#p345 <![CDATA[Station WiFI - connection to router]]> using 0.9.4, I am trying to connect to wifi network by code.
After calling wifi_station_connect(), looks like everything is then automatic(reconnect, scanning WiFi networks).
Is there any way to disable this automation steps and doing this by myself?

My code looks like:
Step 1.:wifi_Station_set_auto_connect() ... to disable auto connection to WiFI
Step 2.:wifi_station_get_config() to get structure of configuration
Step 3.:wifi_station_set_config() ... instruction to which wifi to connect
Step 4.: wifi_station_dhcpc_stop() ...disable dhcp (I wan't to setup IP by myself not retrieve it from WiFi network)
Step 5.: wifi_set_ip_info() ... setup my IP address, mask and gateway
Step 6.:wifi_station_connect() ... start connecting to wifi
Step 7.:wifi_station_get_connect_status() ... using timer, check status of connection. if connection is not STATION_GOT_IP(range from STATION_WRONG_PASSWORD to STATION_CONNECT_FAIL), then call
Step 8.:wifi_station_disconnect() and start step 3.

Problem is, that system after calling wifi_station_connect() and when connection is broken, rescans and tries to reconnect to wifi automatically(when system detects unsucessful connect, it does step 8 and step 6 again). Is there any way to disable this behavior?
Also after loosing a connect to AP and automatic reconnection, it looks like that system does not initialize properly. After some time(e.g. 30 min) of constantly losing a connection, system cannot connect anymore. After restart, module connects itself again.

is there any API to totally initializi WiFi infrastructure that can be called before connection?

Rgds,
Frenk

Statistics: Posted by FrenkR — Thu Dec 25, 2014 1:28 am


]]>