Safe Sprinkler
Master/slave irrigation system (ESP-NOW + LoRaWAN)
Loading...
Searching...
No Matches
esp_wireless_handler.h
Go to the documentation of this file.
1#ifndef ESP_WIRELESS_HANDLER
2#define ESP_WIRELESS_HANDLER
3#include "esp_err.h"
4#include "esp_event.h"
5#include "esp_log.h"
6#include "esp_netif.h"
7#include "esp_now.h"
8#include "esp_wifi.h"
10#include "lwip/ip_addr.h"
11#include "master/main_master.h"
12#include "nvs_flash.h"
13
14#include <freertos/FreeRTOS.h>
15#include <freertos/task.h>
16#include <string.h>
17
18#define MODULE_TAG "ACCESS POINT"
19
20// todo: fix redefine and use esp_wifi defines SSID, PASSPHRASE
21#define MIN_WPA2_PW_LEN 8u
22
30
39
52esp_err_t switch_to_ap_mode_keep_espnow(const char* ssid, const char* pw, uint8_t channel, const char* ip_str);
53
54#endif // ESP_WIRELESS_HANDLER
void start_espnow_at_boot(void)
Start ESP-NOW at boot (STA or default wireless mode)
int switch_to_ap_mode_keep_espnow(const char *ssid, const char *pw, uint8_t channel, const char *ip_str)
Switch to AP or APSTA mode while keeping ESP-NOW.
int switch_back_to_espnow_only(void)
Switch back from AP/APSTA to ESP-NOW-only mode.