ESP32+Webserver (OpenSSLserver example) in AP mode
Posted: Wed Jul 05, 2017 9:58 am
Hi,
I want to run OpenSSL example https://github.com/espressif/esp-idf/tr ... ssl_server in AP mode.
I have tried to run it in dual mode (AP+STA), it works fine.
But when I'm truing to connect to 192.168.4.1 (its gateway, my [client] have ip 192.168.4.2) it says that connection refused in browser.
Also I tried 192.168.4.1:443 , 192.168.4.1:80 (just for case) - same result, I dont get webpage "Openssl example", only connection refused.
Here is my AP conf part:
I want to run OpenSSL example https://github.com/espressif/esp-idf/tr ... ssl_server in AP mode.
I have tried to run it in dual mode (AP+STA), it works fine.
But when I'm truing to connect to 192.168.4.1 (its gateway, my [client] have ip 192.168.4.2) it says that connection refused in browser.
Also I tried 192.168.4.1:443 , 192.168.4.1:80 (just for case) - same result, I dont get webpage "Openssl example", only connection refused.
Here is my AP conf part:
Code: Select all
#define AP_EXAMPLE_WIFI_SSID "ESP32"
#define AP_EXAMPLE_WIFI_PASS "12345678" // for futher wpa implementation
. . .
static void wifi_conn_init(void)
{
tcpip_adapter_init();
wifi_event_group = xEventGroupCreate();
ESP_ERROR_CHECK( esp_event_loop_init(wifi_event_handler, NULL) );
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
ESP_ERROR_CHECK( esp_wifi_init(&cfg) );
ESP_ERROR_CHECK( esp_wifi_set_storage(WIFI_STORAGE_RAM) );
// AP mode only
wifi_config_t wifi_config = {
.ap = {
.ssid = AP_EXAMPLE_WIFI_SSID,
.password = AP_EXAMPLE_WIFI_SSID, // for futher wpa implementation
.authmode = WIFI_AUTH_OPEN,
.max_connection = 2
}
};
ESP_ERROR_CHECK( esp_wifi_set_mode(WIFI_MODE_AP) );
ESP_ERROR_CHECK( esp_wifi_set_config(ESP_IF_WIFI_AP, &wifi_config) );
ESP_ERROR_CHECK( esp_wifi_start() );