← Back to ratslair.com
aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEdvin <[email protected]>2025-11-10 12:44:07 +0100
committerEdvin <[email protected]>2025-11-10 12:44:07 +0100
commitb35ff50e613d212fed07b2d40d49847ae96ab38e (patch)
tree8c21cf0c3dcc16ad7a75366f9a914410a83263f4 /include
parent674697a333c67d79a77ab12b3923922d77e882b5 (diff)
Added code to configure softap and station
Diffstat (limited to 'include')
-rw-r--r--include/EZWIFI.h17
1 files changed, 15 insertions, 2 deletions
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);