ESP_IOT v2.5
IOT ESP Coding
WIFI_APModule.h
Go to the documentation of this file.
1#ifndef WIFI_AP_MODULE_h
2#define WIFI_AP_MODULE_h
3/*
4*******************************************************************************
5 Copyright (c) 2021 by M5Stack
6 Equipped with M5StickC-Plus sample source code
7 配套 M5StickC-Plus 示例源代码
8 Visit the website for more information:https://docs.m5stack.com/en/core/m5stickc_plus
9 获取更多资料请访问:https://docs.m5stack.com/zh_CN/core/m5stickc_plus
10
11 describe:WiFi_APModule wifi连接
12 date:2021/9/18
13
14 Scott Version: 1.1.2022
15*******************************************************************************
16*/
17#include "../../Defines.h"
18#ifdef USE_WIFI_AP_MODULE
19//! 4.8.22. Called to do any state variables.
20//! a presetup() approach ..
21//! THIS will make the doneWIFI call valid.. and has to be done before _done is looked at..
25
26//!cleans the eprom info
28
29//! The rest are custom methods ..
30//!
31//!called to see if the WIFIModule has finished bootstrapping..
33
34//!called to set the done flag (this could be from outside like if BLE updated credentials..)
35void setDoneWIFI_APModuleFlag(boolean flag);
36
37//!resets the credentials (maybe only the SSID .. keep the other)
39
40//! retrieves the JSON string
42
43//!returns true if the SSID is set, false otherwise. If set, then just exit..
45
46//! cleans credentials
48
49
50//! sets the MQTT user/password. It's up to the code to decide who needs to know
51void WIFI_APModule_updateMQTTInfo(char *ssid, char *ssid_password, char *username, char *password, char *guestPassword, char *deviceName, char *host, char *port, char *locationString);
52
53#endif
54
55
56#endif // WIFI_AP_MODULE_h
String WIFI_APModule_JsonOutputString()
retrieves the JSON string
void loop_WIFI_APModule()
main loop
void setup_WIFI_APModule()
sets the config in the EPPROM called wifi-config. NOTE: the _done isn't valid until after this code....
void clean_SSID_WIFICredentials()
cleans credentials
void WIFI_APModule_ResetCredentials()
resets the credentials (maybe only the SSID .. keep the other)
void WIFI_APModule_updateMQTTInfo(char *ssid, char *ssid_password, char *username, char *password, char *guestPassword, char *deviceName, char *host, char *port, char *locationString)
sets the MQTT user/password. It's up to the code to decide who needs to know
boolean doneWIFI_APModule_Credentials()
called to see if the WIFIModule has finished bootstrapping..
void cleanEPROM_WIFI_APModule()
cleans the eprom info
void preSetup_WIFI_APModule()
void setDoneWIFI_APModuleFlag(boolean flag)
called to set the done flag (this could be from outside like if BLE updated credentials....
boolean isSet_SSID_WIFICredentials()
returns true if the SSID is set, false otherwise. If set, then just exit..