← Back to ratslair.com
aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEdvin <[email protected]>2025-10-14 17:35:18 +0200
committerEdvin <[email protected]>2025-10-14 17:35:18 +0200
commit674697a333c67d79a77ab12b3923922d77e882b5 (patch)
treecf08bd17bcfb6f39716acb7a0b1fb47b6cba8ebd /include
Initial commit
Diffstat (limited to 'include')
-rw-r--r--include/EZWIFI.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/include/EZWIFI.h b/include/EZWIFI.h
new file mode 100644
index 0000000..6470300
--- /dev/null
+++ b/include/EZWIFI.h
@@ -0,0 +1,39 @@
+#include <string.h>
+#include "esp_wifi.h"
+#include "esp_mac.h"
+#include "esp_event.h"
+#include "esp_log.h"
+#include "esp_mesh.h"
+#include "nvs_flash.h"
+
+#define SSID "CDIO_MESH"
+#define PASS "CDIO_PASS"
+
+#define MESH_AP_AUTHMODE WIFI_AUTH_WPA2_PSK
+#define MESH_AP_CONNECTIONS 5
+#define MESH_NON_MESH_AP_CONNECTIONS 2
+#define MESH_AP_PASS "CDIO_PASS"
+
+#define MESH_CHANNEL 0
+#define MESH_ROUTER_SSID "CDIO_MESH"
+#define MESH_ROUTER_PASS "CDIO_PASS"
+
+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;
+
+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 mesh_scan_done_handler(int num);
+
+void mesh_event_handler(void *arg, esp_event_base_t event_base, int32_t event_id, void *event_data);
+
+void ip_event_handler(void *arg, esp_event_base_t event_base, int32_t event_id, void *event_data);
+
+void ezmesh_init(void);