From b35ff50e613d212fed07b2d40d49847ae96ab38e Mon Sep 17 00:00:00 2001 From: Edvin Date: Mon, 10 Nov 2025 12:44:07 +0100 Subject: Added code to configure softap and station --- include/EZWIFI.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'include/EZWIFI.h') diff --git a/include/EZWIFI.h b/include/EZWIFI.h index 6470300..e2ccf9d 100644 --- a/include/EZWIFI.h +++ b/include/EZWIFI.h @@ -6,9 +6,12 @@ #include "esp_mesh.h" #include "nvs_flash.h" -#define SSID "CDIO_MESH" +#define SSID "CDIO" #define PASS "CDIO_PASS" +#define WIFI_AP_AUTHMODE WIFI_AUTH_WPA2_PSK +#define WIFI_CHANNEL 0 + #define MESH_AP_AUTHMODE WIFI_AUTH_WPA2_PSK #define MESH_AP_CONNECTIONS 5 #define MESH_NON_MESH_AP_CONNECTIONS 2 @@ -18,17 +21,25 @@ #define MESH_ROUTER_SSID "CDIO_MESH" #define MESH_ROUTER_PASS "CDIO_PASS" +#define MAX_STA_CONN 10 + static const char *TAG = "wifi_main"; static const uint8_t MESH_ID[6] = { 0x77, 0x77, 0x77, 0x77, 0x77, 0x77}; static mesh_addr_t mesh_parent_addr; static int mesh_layer = -1; static esp_netif_t *netif_sta = NULL; +static EventGroupHandle_t s_wifi_event_group; + +// void _print_csi_csv_header(); + +// void _wifi_csi_cb(void *ctx, wifi_csi_info_t *data); + void wifi_event_handler(void* arg, esp_event_base_t event_base, int32_t event_id, void* event_data); void setup_station(void); -void setup_ap(void); +void setup_softap(void); void mesh_scan_done_handler(int num); @@ -37,3 +48,5 @@ void mesh_event_handler(void *arg, esp_event_base_t event_base, int32_t event_id void ip_event_handler(void *arg, esp_event_base_t event_base, int32_t event_id, void *event_data); void ezmesh_init(void); + +void setup_csi(void); -- cgit v1.2.3