ESP8266 Developer Zone The Official ESP8266 Forum 2015-12-03T16:46:46+08:00 https://bbs.espressif.com:443/feed.php?f=61&t=1468 2015-12-03T16:46:46+08:00 2015-12-03T16:46:46+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1468&p=4879#p4879 <![CDATA[Q: Which API need to call in user_init]]> Q: Which API need to call in user_init

wifi_set_ip_info and wifi_set_macaddr can only be called in user_init, it will be valid if called at anywhere else.

system_timer_reinit is suggested to call in user_init. If it's called anywhere else, need to arm all timer again.

wifi_station_set_config, if it's called in user_init, phy layer will connect router automatically, no need to call wifi_station_connect again. Or need to call wifi_station_connect if you want to set a connection.

wifi_station_set_auto_connect will set if need to connect to router automatically. For example, if you want to close automatically connection, a) you call wifi_station_set_auto_connect in user_init, then automatically connection will close this time; b) you call wifi_station_set_auto_connect somewhere else, automatically connection will close after next boot.

Statistics: Posted by Guest — Thu Dec 03, 2015 4:46 pm


]]>