mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-24 19:42:27 +03:00
- Add new ESP-NOW mesh backend.
- Add HelloEspnow.ino example to demonstrate the ESP-NOW mesh backend features. - Deprecate the ESP8266WiFiMesh class in favour of the new ESP-NOW and TCP/IP backends. - Update the TCP/IP mesh backend to use the new lwIP version preprocessor flag and remove obsolete preprocessor flags.
This commit is contained in:
@ -18,6 +18,28 @@
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/********************************************************************************************
|
||||
* NOTE!
|
||||
*
|
||||
* This class is deprecated and will be removed in core version 3.0.0.
|
||||
* If you are still using this class, please consider migrating to the new API shown in
|
||||
* the EspnowMeshBackend.h or TcpIpMeshBackend.h source files.
|
||||
*
|
||||
* TODO: delete this file.
|
||||
********************************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef __WIFIMESH_H__
|
||||
#define __WIFIMESH_H__
|
||||
|
||||
@ -28,9 +50,6 @@
|
||||
#include "NetworkInfo.h"
|
||||
#include "TransmissionResult.h"
|
||||
|
||||
#define ENABLE_STATIC_IP_OPTIMIZATION // Requires Arduino core for ESP8266 version 2.4.2 or higher and lwIP2 (lwIP can be changed in "Tools" menu of Arduino IDE).
|
||||
#define ENABLE_WIFI_SCAN_OPTIMIZATION // Requires Arduino core for ESP8266 version 2.4.2 or higher. Scan time should go from about 2100 ms to around 60 ms if channel 1 (standard) is used.
|
||||
|
||||
const String WIFI_MESH_EMPTY_STRING = "";
|
||||
|
||||
class ESP8266WiFiMesh {
|
||||
@ -44,8 +63,6 @@ private:
|
||||
uint8 _meshWiFiChannel;
|
||||
bool _verboseMode;
|
||||
WiFiServer _server;
|
||||
uint32_t _lwipVersion[3];
|
||||
static const uint32_t lwipVersion203Signature[3];
|
||||
String _message = WIFI_MESH_EMPTY_STRING;
|
||||
bool _scanHidden = false;
|
||||
bool _apHidden = false;
|
||||
@ -56,6 +73,7 @@ private:
|
||||
|
||||
static String lastSSID;
|
||||
static bool staticIPActivated;
|
||||
bool useStaticIP;
|
||||
static IPAddress staticIP;
|
||||
static IPAddress gateway;
|
||||
static IPAddress subnetMask;
|
||||
@ -78,8 +96,6 @@ private:
|
||||
bool waitForClientTransmission(WiFiClient &currClient, uint32_t maxWait);
|
||||
transmission_status_t attemptDataTransfer();
|
||||
transmission_status_t attemptDataTransferKernel();
|
||||
void storeLwipVersion();
|
||||
bool atLeastLwipVersion(const uint32_t minLwipVersion[3]);
|
||||
|
||||
|
||||
|
||||
@ -133,7 +149,7 @@ public:
|
||||
////////////////////////////</DEPRECATED> TODO: REMOVE IN 2.5.0////////////////////////////
|
||||
|
||||
~ESP8266WiFiMesh();
|
||||
|
||||
|
||||
/**
|
||||
* WiFiMesh Constructor method. Creates a WiFi Mesh Node, ready to be initialised.
|
||||
*
|
||||
|
Reference in New Issue
Block a user