mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #13446 from benpicco/esp-wifi/open
esp-wifi: allow connecting to open networks
This commit is contained in:
commit
98277b0d3b
@ -688,12 +688,18 @@ static const netdev_driver_t _esp_wifi_driver =
|
||||
static wifi_config_t wifi_config_sta = {
|
||||
.sta = {
|
||||
.ssid = ESP_WIFI_SSID,
|
||||
#ifdef ESP_WIFI_PASS
|
||||
.password = ESP_WIFI_PASS,
|
||||
#endif
|
||||
.channel = 0,
|
||||
.scan_method = WIFI_ALL_CHANNEL_SCAN,
|
||||
.sort_method = WIFI_CONNECT_AP_BY_SIGNAL,
|
||||
.threshold.rssi = -127,
|
||||
#ifdef ESP_WIFI_PASS
|
||||
.threshold.authmode = WIFI_AUTH_WPA_WPA2_PSK
|
||||
#else
|
||||
.threshold.authmode = WIFI_AUTH_OPEN
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
@ -720,8 +726,12 @@ static wifi_config_t wifi_config_ap = {
|
||||
.ssid = ESP_WIFI_SSID,
|
||||
.ssid_len = ARRAY_SIZE(ESP_WIFI_SSID),
|
||||
.ssid_hidden = 1, /* don't make the AP visible */
|
||||
#ifdef ESP_WIFI_PASS
|
||||
.password = ESP_WIFI_PASS,
|
||||
.authmode = WIFI_AUTH_WPA2_PSK,
|
||||
#else
|
||||
.authmode = WIFI_AUTH_OPEN,
|
||||
#endif
|
||||
.max_connection = 0, /* don't allow connections */
|
||||
.beacon_interval = 60000, /* send beacon only every 60 s */
|
||||
}
|
||||
|
@ -51,7 +51,7 @@
|
||||
/**
|
||||
* @brief Passphrase used for the AP as clear text (max. 64 chars).
|
||||
*/
|
||||
#ifndef ESP_WIFI_PASS
|
||||
#ifdef DOXYGEN
|
||||
#define ESP_WIFI_PASS "ThisistheRIOTporttoESP"
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user