acid-drop

- Hacking the planet from a LilyGo T-Deck using custom firmware
git clone git://git.acid.vegas/acid-drop.git
Log | Files | Refs | Archive | README | LICENSE

Network.h (993B)

      1 #pragma once
      2 
      3 #include <vector>
      4 
      5 #include <esp_wifi.h>
      6 #include <WireGuard-ESP32.h>
      7 
      8 #include "Display.h"
      9 #include "Storage.h"
     10 #include "Utilities.h"
     11 #include "WiFi.h"
     12 
     13 struct WiFiNetwork {
     14     int index;
     15     int channel;
     16     int rssi;
     17     String encryption;
     18     String ssid;
     19 };
     20 
     21 extern std::vector<WiFiNetwork> wifiNetworks;
     22 extern int selectedNetworkIndex;
     23 extern WireGuard wg;
     24 
     25 void connectToWiFi(String ssid, String password);
     26 void displayPasswordInputLine();
     27 void displayWiFiNetworks();
     28 void displayWiFiNetwork(int index, int displayIndex);
     29 String getEncryptionType(wifi_auth_mode_t encryptionType);
     30 void handlePasswordInput(char key);
     31 void handleWiFiSelection(char key);
     32 void initializeNetwork();
     33 void randomizeMacAddress();
     34 void scanWiFiNetworks();
     35 void updateSelectedNetwork(int delta);
     36 void wgConnect(const IPAddress& localIp, const char* privateKey, const char* endpointAddress, const char* publicKey, uint16_t endpointPort);
     37 void WiFiEvent(WiFiEvent_t event, WiFiEventInfo_t info);