Statistics: Posted by roc2 — Sat Nov 19, 2016 4:41 pm
Statistics: Posted by Mdb — Tue Nov 08, 2016 7:16 pm
Code:
struct softap_config {
uint8 ssid[32];
uint8 password[64];
uint8 ssid_len; // Note: Recommend to set it according to your ssid
uint8 channel; // Note: support 1 ~ 13
AUTH_MODE authmode; // Note: Don't support AUTH_WEP in softAP mode.
uint8 ssid_hidden; // Note: default 0
uint8 max_connection; // Note: default 4, max 4
uint16 beacon_interval; // Note: support 100 ~ 60000 ms, default 100
};
bool wifi_softap_set_config(struct softap_config *config);
Statistics: Posted by ESP_Faye — Wed Jun 15, 2016 10:05 am
Statistics: Posted by rupak426 — Tue Jun 14, 2016 5:22 pm
Code:
#define FPM_SLEEP_MAX_TIME 0xFFFFFFF
void fpm_wakup_cb_func1(void)
{
wifi_fpm_close(); // disable force sleep function
wifi_set_opmode(STATION_MODE); // set station mode
wifi_station_connect(); // connect to AP
}
#ifndef SLEEP_MAX
// Wakeup till time out.
void user_func(...)
{
wifi_station_disconnect();
wifi_set_opmode(NULL_MODE); // set WiFi mode to null mode.
wifi_fpm_set_sleep_type(LIGHT_SLEEP_T); // light sleep
wifi_fpm_open(); // enable force sleep
wifi_fpm_set_wakeup_cb(fpm_wakup_cb_func1); // Set wakeup callback
wifi_fpm_do_sleep(50*1000);
}
#else
// Or wake up by GPIO
void user_func(...)
{
wifi_station_disconnect();
wifi_set_opmode(NULL_MODE); // set WiFi mode to null mode.
wifi_fpm_set_sleep_type(LIGHT_SLEEP_T); // light sleep
wifi_fpm_open(); // enable force sleep
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTCK_U,3);
gpio_pin_wakeup_enable(13, GPIO_PIN_INTR_LOLEVEL);
wifi_fpm_set_wakeup_cb(fpm_wakup_cb_func1); // Set wakeup callback
wifi_fpm_do_sleep(FPM_SLEEP_MAX_TIME);
...
}
#endif
Statistics: Posted by ESP_Faye — Tue Jun 14, 2016 5:03 pm
Statistics: Posted by rupak426 — Tue Jun 14, 2016 4:34 pm
Statistics: Posted by ESP_Faye — Tue Jun 14, 2016 9:49 am
Statistics: Posted by rupak426 — Tue Jun 14, 2016 1:38 am