40 lines
1.0 KiB
C
40 lines
1.0 KiB
C
#pragma once
|
|
|
|
// Wi-Fi client configuration (Pico W / CYW43)
|
|
//
|
|
// NOTE: These are example credentials.
|
|
// Change them to match your Wi-Fi network.
|
|
|
|
#define WIFI_SSID "729_IoT"
|
|
#define WIFI_PASSWORD "DiU0w1V3z4tNscfa"
|
|
|
|
// Authentication mode for cyw43_arch_wifi_connect_timeout_ms()
|
|
// Common values:
|
|
// - CYW43_AUTH_OPEN
|
|
// - CYW43_AUTH_WPA2_AES_PSK
|
|
#define WIFI_AUTH CYW43_AUTH_WPA2_AES_PSK
|
|
|
|
// Optional regulatory domain; set this if your AP uses channels 12/13 (common in EU)
|
|
// Examples: CYW43_COUNTRY_POLAND, CYW43_COUNTRY_GERMANY, CYW43_COUNTRY_USA
|
|
#ifndef WIFI_COUNTRY
|
|
#define WIFI_COUNTRY CYW43_COUNTRY_USA
|
|
#endif
|
|
|
|
// Timeouts
|
|
#define WIFI_CONNECT_TIMEOUT_MS 30000
|
|
#define WIFI_DHCP_TIMEOUT_MS 30000
|
|
|
|
// Retry strategy
|
|
#ifndef WIFI_CONNECT_RETRIES
|
|
#define WIFI_CONNECT_RETRIES 5
|
|
#endif
|
|
|
|
// Base delay after a failed attempt; actual delay is exponential backoff
|
|
#ifndef WIFI_RETRY_BASE_DELAY_MS
|
|
#define WIFI_RETRY_BASE_DELAY_MS 500
|
|
#endif
|
|
|
|
#ifndef WIFI_RETRY_MAX_DELAY_MS
|
|
#define WIFI_RETRY_MAX_DELAY_MS 10000
|
|
#endif
|