1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-22 21:23:07 +03:00

Merge branch 'master' into wifi_mesh_update_2.2

This commit is contained in:
aerlon 2019-08-10 10:45:40 +02:00 committed by GitHub
commit 26e626de19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 129 additions and 55 deletions

View File

@ -9,9 +9,9 @@ Arduino core for ESP8266 WiFi chip
# Arduino on ESP8266
This project brings support for ESP8266 chip to the Arduino environment. It lets you write sketches using familiar Arduino functions and libraries, and run them directly on ESP8266, no external microcontroller required.
This project brings support for the ESP8266 chip to the Arduino environment. It lets you write sketches, using familiar Arduino functions and libraries, and run them directly on ESP8266, with no external microcontroller required.
ESP8266 Arduino core comes with libraries to communicate over WiFi using TCP and UDP, set up HTTP, mDNS, SSDP, and DNS servers, do OTA updates, use a file system in flash memory, work with SD cards, servos, SPI and I2C peripherals.
ESP8266 Arduino core comes with libraries to communicate over WiFi using TCP and UDP, set up HTTP, mDNS, SSDP, and DNS servers, do OTA updates, use a file system in flash memory, and work with SD cards, servos, SPI and I2C peripherals.
# Contents
- Installing options:
@ -71,9 +71,9 @@ python get.py
### Using PlatformIO
[PlatformIO](https://platformio.org?utm_source=github&utm_medium=arduino-esp8266) is an open source ecosystem for IoT
development with a cross-platform build system, library manager and full support
for Espressif (ESP8266) development. It works on the popular host OS: macOS, Windows,
Linux 32/64, Linux ARM (like Raspberry Pi, BeagleBone, CubieBoard).
development with a cross-platform build system, a library manager, and full support
for Espressif (ESP8266) development. It works on the following popular host operating systems: macOS, Windows,
Linux 32/64, and Linux ARM (like Raspberry Pi, BeagleBone, CubieBoard).
- [What is PlatformIO?](https://docs.platformio.org/en/latest/what-is-platformio.html?utm_source=github&utm_medium=arduino-esp8266)
- [PlatformIO IDE](https://platformio.org/platformio-ide?utm_source=github&utm_medium=arduino-esp8266)
@ -95,7 +95,7 @@ Documentation for latest development version: https://arduino-esp8266.readthedoc
### Issues and support ###
[ESP8266 Community Forum](https://www.esp8266.com/u/arduinoanswers) is a well-established community for questions and answers about Arduino for ESP8266. If you need help, have a "How do I..." type question, have a problem with a 3rd party lib not hosted in this repo, or just want to discuss how to approach a problem, please ask there.
[ESP8266 Community Forum](https://www.esp8266.com/u/arduinoanswers) is a well-established community for questions and answers about Arduino for ESP8266. If you need help, have a "How do I..." type question, have a problem with a 3rd party library not hosted in this repo, or just want to discuss how to approach a problem, please ask there.
If you find the forum useful, please consider supporting it with a donation. <br />
[![Donate](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://www.paypal.com/webscr?cmd=_s-xclick&hosted_button_id=4M56YCWV6PX66)
@ -107,7 +107,7 @@ Please provide as much context as possible, as well as the information requested
- ESP8266 Arduino core version which you are using (you can check it in Boards Manager)
- your sketch code; please wrap it into a code block, see [Github markdown manual](https://help.github.com/articles/basic-writing-and-formatting-syntax/#quoting-code)
- when encountering an issue that happens at run time, attach the serial output. Wrap it into a code block, just like the code.
- for issues which happen at compile time, enable verbose compiler output in the IDE preferences, and attach that output (also inside a code block)
- for issues that happen at compile time, enable verbose compiler output in the IDE preferences, and attach that output (also inside a code block)
- ESP8266 development board model
- IDE settings (board choice, flash size)
- etc

View File

@ -482,6 +482,8 @@ generic.menu.baud.512000.windows=512000
generic.menu.baud.512000.upload.speed=512000
generic.menu.baud.921600=921600
generic.menu.baud.921600.upload.speed=921600
generic.menu.baud.3000000=3000000
generic.menu.baud.3000000.upload.speed=3000000
##############################################################
esp8285.name=Generic ESP8285 Module
@ -752,6 +754,8 @@ esp8285.menu.baud.512000.windows=512000
esp8285.menu.baud.512000.upload.speed=512000
esp8285.menu.baud.921600=921600
esp8285.menu.baud.921600.upload.speed=921600
esp8285.menu.baud.3000000=3000000
esp8285.menu.baud.3000000.upload.speed=3000000
##############################################################
espduino.name=ESPDuino (ESP-13 Module)
@ -946,6 +950,8 @@ espduino.menu.baud.512000.windows=512000
espduino.menu.baud.512000.upload.speed=512000
espduino.menu.baud.921600=921600
espduino.menu.baud.921600.upload.speed=921600
espduino.menu.baud.3000000=3000000
espduino.menu.baud.3000000.upload.speed=3000000
##############################################################
huzzah.name=Adafruit Feather HUZZAH ESP8266
@ -1132,6 +1138,8 @@ huzzah.menu.baud.512000.windows=512000
huzzah.menu.baud.512000.upload.speed=512000
huzzah.menu.baud.921600=921600
huzzah.menu.baud.921600.upload.speed=921600
huzzah.menu.baud.3000000=3000000
huzzah.menu.baud.3000000.upload.speed=3000000
##############################################################
inventone.name=Invent One
@ -1318,6 +1326,8 @@ inventone.menu.baud.512000.windows=512000
inventone.menu.baud.512000.upload.speed=512000
inventone.menu.baud.921600=921600
inventone.menu.baud.921600.upload.speed=921600
inventone.menu.baud.3000000=3000000
inventone.menu.baud.3000000.upload.speed=3000000
##############################################################
cw01.name=XinaBox CW01
@ -1507,6 +1517,8 @@ cw01.menu.baud.512000.windows=512000
cw01.menu.baud.512000.upload.speed=512000
cw01.menu.baud.921600=921600
cw01.menu.baud.921600.upload.speed=921600
cw01.menu.baud.3000000=3000000
cw01.menu.baud.3000000.upload.speed=3000000
##############################################################
espresso_lite_v1.name=ESPresso Lite 1.0
@ -1696,6 +1708,8 @@ espresso_lite_v1.menu.baud.512000.windows=512000
espresso_lite_v1.menu.baud.512000.upload.speed=512000
espresso_lite_v1.menu.baud.921600=921600
espresso_lite_v1.menu.baud.921600.upload.speed=921600
espresso_lite_v1.menu.baud.3000000=3000000
espresso_lite_v1.menu.baud.3000000.upload.speed=3000000
##############################################################
espresso_lite_v2.name=ESPresso Lite 2.0
@ -1885,6 +1899,8 @@ espresso_lite_v2.menu.baud.512000.windows=512000
espresso_lite_v2.menu.baud.512000.upload.speed=512000
espresso_lite_v2.menu.baud.921600=921600
espresso_lite_v2.menu.baud.921600.upload.speed=921600
espresso_lite_v2.menu.baud.3000000=3000000
espresso_lite_v2.menu.baud.3000000.upload.speed=3000000
##############################################################
phoenix_v1.name=Phoenix 1.0
@ -2074,6 +2090,8 @@ phoenix_v1.menu.baud.512000.windows=512000
phoenix_v1.menu.baud.512000.upload.speed=512000
phoenix_v1.menu.baud.921600=921600
phoenix_v1.menu.baud.921600.upload.speed=921600
phoenix_v1.menu.baud.3000000=3000000
phoenix_v1.menu.baud.3000000.upload.speed=3000000
##############################################################
phoenix_v2.name=Phoenix 2.0
@ -2263,6 +2281,8 @@ phoenix_v2.menu.baud.512000.windows=512000
phoenix_v2.menu.baud.512000.upload.speed=512000
phoenix_v2.menu.baud.921600=921600
phoenix_v2.menu.baud.921600.upload.speed=921600
phoenix_v2.menu.baud.3000000=3000000
phoenix_v2.menu.baud.3000000.upload.speed=3000000
##############################################################
nodemcu.name=NodeMCU 0.9 (ESP-12 Module)
@ -2449,6 +2469,8 @@ nodemcu.menu.baud.512000.windows=512000
nodemcu.menu.baud.512000.upload.speed=512000
nodemcu.menu.baud.921600=921600
nodemcu.menu.baud.921600.upload.speed=921600
nodemcu.menu.baud.3000000=3000000
nodemcu.menu.baud.3000000.upload.speed=3000000
##############################################################
nodemcuv2.name=NodeMCU 1.0 (ESP-12E Module)
@ -2635,6 +2657,8 @@ nodemcuv2.menu.baud.512000.windows=512000
nodemcuv2.menu.baud.512000.upload.speed=512000
nodemcuv2.menu.baud.921600=921600
nodemcuv2.menu.baud.921600.upload.speed=921600
nodemcuv2.menu.baud.3000000=3000000
nodemcuv2.menu.baud.3000000.upload.speed=3000000
##############################################################
modwifi.name=Olimex MOD-WIFI-ESP8266(-DEV)
@ -2841,6 +2865,8 @@ modwifi.menu.baud.512000.windows=512000
modwifi.menu.baud.512000.upload.speed=512000
modwifi.menu.baud.921600=921600
modwifi.menu.baud.921600.upload.speed=921600
modwifi.menu.baud.3000000=3000000
modwifi.menu.baud.3000000.upload.speed=3000000
##############################################################
thing.name=SparkFun ESP8266 Thing
@ -3027,6 +3053,8 @@ thing.menu.baud.512000.windows=512000
thing.menu.baud.512000.upload.speed=512000
thing.menu.baud.921600=921600
thing.menu.baud.921600.upload.speed=921600
thing.menu.baud.3000000=3000000
thing.menu.baud.3000000.upload.speed=3000000
##############################################################
thingdev.name=SparkFun ESP8266 Thing Dev
@ -3213,6 +3241,8 @@ thingdev.menu.baud.512000.windows=512000
thingdev.menu.baud.512000.upload.speed=512000
thingdev.menu.baud.921600=921600
thingdev.menu.baud.921600.upload.speed=921600
thingdev.menu.baud.3000000=3000000
thingdev.menu.baud.3000000.upload.speed=3000000
##############################################################
esp210.name=SweetPea ESP-210
@ -3399,6 +3429,8 @@ esp210.menu.baud.512000.windows=512000
esp210.menu.baud.512000.upload.speed=512000
esp210.menu.baud.921600=921600
esp210.menu.baud.921600.upload.speed=921600
esp210.menu.baud.3000000=3000000
esp210.menu.baud.3000000.upload.speed=3000000
##############################################################
d1_mini.name=LOLIN(WEMOS) D1 R2 & mini
@ -3585,6 +3617,8 @@ d1_mini.menu.baud.460800.macosx=460800
d1_mini.menu.baud.460800.upload.speed=460800
d1_mini.menu.baud.512000.windows=512000
d1_mini.menu.baud.512000.upload.speed=512000
d1_mini.menu.baud.3000000=3000000
d1_mini.menu.baud.3000000.upload.speed=3000000
##############################################################
d1_mini_pro.name=LOLIN(WEMOS) D1 mini Pro
@ -3754,6 +3788,8 @@ d1_mini_pro.menu.baud.460800.macosx=460800
d1_mini_pro.menu.baud.460800.upload.speed=460800
d1_mini_pro.menu.baud.512000.windows=512000
d1_mini_pro.menu.baud.512000.upload.speed=512000
d1_mini_pro.menu.baud.3000000=3000000
d1_mini_pro.menu.baud.3000000.upload.speed=3000000
##############################################################
d1_mini_lite.name=LOLIN(WEMOS) D1 mini Lite
@ -3980,6 +4016,8 @@ d1_mini_lite.menu.baud.460800.macosx=460800
d1_mini_lite.menu.baud.460800.upload.speed=460800
d1_mini_lite.menu.baud.512000.windows=512000
d1_mini_lite.menu.baud.512000.upload.speed=512000
d1_mini_lite.menu.baud.3000000=3000000
d1_mini_lite.menu.baud.3000000.upload.speed=3000000
##############################################################
d1.name=WeMos D1 R1
@ -4166,6 +4204,8 @@ d1.menu.baud.460800.macosx=460800
d1.menu.baud.460800.upload.speed=460800
d1.menu.baud.512000.windows=512000
d1.menu.baud.512000.upload.speed=512000
d1.menu.baud.3000000=3000000
d1.menu.baud.3000000.upload.speed=3000000
##############################################################
espino.name=ESPino (ESP-12 Module)
@ -4355,6 +4395,8 @@ espino.menu.baud.512000.windows=512000
espino.menu.baud.512000.upload.speed=512000
espino.menu.baud.921600=921600
espino.menu.baud.921600.upload.speed=921600
espino.menu.baud.3000000=3000000
espino.menu.baud.3000000.upload.speed=3000000
##############################################################
espinotee.name=ThaiEasyElec's ESPino
@ -4541,6 +4583,8 @@ espinotee.menu.baud.512000.windows=512000
espinotee.menu.baud.512000.upload.speed=512000
espinotee.menu.baud.921600=921600
espinotee.menu.baud.921600.upload.speed=921600
espinotee.menu.baud.3000000=3000000
espinotee.menu.baud.3000000.upload.speed=3000000
##############################################################
wifinfo.name=WifInfo
@ -4787,6 +4831,8 @@ wifinfo.menu.baud.512000.windows=512000
wifinfo.menu.baud.512000.upload.speed=512000
wifinfo.menu.baud.921600=921600
wifinfo.menu.baud.921600.upload.speed=921600
wifinfo.menu.baud.3000000=3000000
wifinfo.menu.baud.3000000.upload.speed=3000000
##############################################################
arduino-esp8266.name=Arduino
@ -4985,6 +5031,8 @@ arduino-esp8266.menu.baud.512000.windows=512000
arduino-esp8266.menu.baud.512000.upload.speed=512000
arduino-esp8266.menu.baud.921600=921600
arduino-esp8266.menu.baud.921600.upload.speed=921600
arduino-esp8266.menu.baud.3000000=3000000
arduino-esp8266.menu.baud.3000000.upload.speed=3000000
##############################################################
gen4iod.name=4D Systems gen4 IoD Range
@ -5172,6 +5220,8 @@ gen4iod.menu.baud.512000.windows=512000
gen4iod.menu.baud.512000.upload.speed=512000
gen4iod.menu.baud.921600=921600
gen4iod.menu.baud.921600.upload.speed=921600
gen4iod.menu.baud.3000000=3000000
gen4iod.menu.baud.3000000.upload.speed=3000000
##############################################################
oak.name=Digistump Oak
@ -5359,6 +5409,8 @@ oak.menu.baud.460800.macosx=460800
oak.menu.baud.460800.upload.speed=460800
oak.menu.baud.512000.windows=512000
oak.menu.baud.512000.upload.speed=512000
oak.menu.baud.3000000=3000000
oak.menu.baud.3000000.upload.speed=3000000
##############################################################
wifiduino.name=WiFiduino
@ -5545,6 +5597,8 @@ wifiduino.menu.baud.460800.macosx=460800
wifiduino.menu.baud.460800.upload.speed=460800
wifiduino.menu.baud.512000.windows=512000
wifiduino.menu.baud.512000.upload.speed=512000
wifiduino.menu.baud.3000000=3000000
wifiduino.menu.baud.3000000.upload.speed=3000000
##############################################################
wifi_slot.name=Amperka WiFi Slot
@ -5841,6 +5895,8 @@ wifi_slot.menu.baud.512000.windows=512000
wifi_slot.menu.baud.512000.upload.speed=512000
wifi_slot.menu.baud.921600=921600
wifi_slot.menu.baud.921600.upload.speed=921600
wifi_slot.menu.baud.3000000=3000000
wifi_slot.menu.baud.3000000.upload.speed=3000000
##############################################################
wiolink.name=Seeed Wio Link
@ -6027,6 +6083,8 @@ wiolink.menu.baud.512000.windows=512000
wiolink.menu.baud.512000.upload.speed=512000
wiolink.menu.baud.921600=921600
wiolink.menu.baud.921600.upload.speed=921600
wiolink.menu.baud.3000000=3000000
wiolink.menu.baud.3000000.upload.speed=3000000
##############################################################
espectro.name=ESPectro Core
@ -6213,4 +6271,6 @@ espectro.menu.baud.512000.windows=512000
espectro.menu.baud.512000.upload.speed=512000
espectro.menu.baud.921600=921600
espectro.menu.baud.921600.upload.speed=921600
espectro.menu.baud.3000000=3000000
espectro.menu.baud.3000000.upload.speed=3000000

View File

@ -303,6 +303,10 @@ extern "C" void configTime(long timezone, int daylightOffset_sec,
#include "pins_arduino.h"
#ifndef PUYA_SUPPORT
#define PUYA_SUPPORT 1
#endif
#endif
#ifdef DEBUG_ESP_OOM

View File

@ -330,7 +330,12 @@ unsigned char String::concat(const char *cstr, unsigned int length) {
return 1;
if(!reserve(newlen))
return 0;
memmove(wbuffer() + len(), cstr, length + 1);
if (cstr >= wbuffer() && cstr < wbuffer() + len())
// compatible with SSO in ram #6155 (case "x += x.c_str()")
memmove(wbuffer() + len(), cstr, length + 1);
else
// compatible with source in flash #6367
memcpy_P(wbuffer() + len(), cstr, length + 1);
setLen(newlen);
return 1;
}

View File

@ -42,7 +42,7 @@
*/
#include "Arduino.h"
#include <pgmspace.h>
#include "../../libraries/GDBStub/src/GDBStub.h"
#include "gdb_hooks.h"
#include "uart.h"
#include "esp8266_peri.h"
#include "user_interface.h"

View File

@ -1,25 +1,25 @@
ESP8266WiFi library
===================
ESP8266 is all about Wi-Fi. If you are eager to connect your new ESP8266 module to Wi-Fi network to start sending and receiving data, this is a good place to start. If you are looking for more in depth details of how to program specific Wi-Fi networking functionality, you are also in the right place.
ESP8266 is all about Wi-Fi. If you are eager to connect your new ESP8266 module to a Wi-Fi network to start sending and receiving data, this is a good place to start. If you are looking for more in depth details of how to program specific Wi-Fi networking functionality, you are also in the right place.
Introduction
------------
The `Wi-Fi library for ESP8266 <https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266WiFi>`__ has been developed based on `ESP8266 SDK <https://bbs.espressif.com/viewtopic.php?f=51&t=1023>`__, using naming convention and overall functionality philosophy of `Arduino WiFi library <https://www.arduino.cc/en/Reference/WiFi>`__. Over time the wealth Wi-Fi features ported from ESP9266 SDK to `esp8266 /
Arduino <https://github.com/esp8266/Arduino>`__ outgrew `Arduino WiFi library <https://www.arduino.cc/en/Reference/WiFi>`__ and it became apparent that we need to provide separate documentation on what is new and extra.
The `Wi-Fi library for ESP8266 <https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266WiFi>`__ has been developed based on `ESP8266 SDK <https://bbs.espressif.com/viewtopic.php?f=51&t=1023>`__, using the naming conventions and overall functionality philosophy of the `Arduino WiFi library <https://www.arduino.cc/en/Reference/WiFi>`__. Over time, the wealth of Wi-Fi features ported from ESP9266 SDK to `esp8266 /
Arduino <https://github.com/esp8266/Arduino>`__ outgrew `Arduino WiFi library <https://www.arduino.cc/en/Reference/WiFi>`__ and it became apparent that we would need to provide separate documentation on what is new and extra.
This documentation will walk you through several classes, methods and properties of `ESP8266WiFi <https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266WiFi>`__ library. If you are new to C++ and Arduino, don't worry. We will start from general concepts and then move to detailed description of members of each particular class including usage examples.
This documentation will walk you through several classes, methods and properties of the `ESP8266WiFi <https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266WiFi>`__ library. If you are new to C++ and Arduino, don't worry. We will start from general concepts and then move to detailed description of members of each particular class including usage examples.
The scope of functionality offered by `ESP8266WiFi <https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266WiFi>`__ library is quite extensive and therefore this description has been broken up into separate documents marked with :arrow\_right:.
The scope of functionality offered by the `ESP8266WiFi <https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266WiFi>`__ library is quite extensive and therefore this description has been broken up into separate documents marked with :arrow\_right:.
Quick Start
~~~~~~~~~~~
Hopefully you are already familiar how to load `Blink.ino <https://github.com/esp8266/Arduino/blob/master/libraries/esp8266/examples/Blink/Blink.ino>`__ sketch to ESP8266 module and get the LED blinking. If not, please check `this tutorial <https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout/using-arduino-ide>`__ by Adafruit or `another great tutorial <https://learn.sparkfun.com/tutorials/esp8266-thing-hookup-guide/introduction>`__ developed by Sparkfun.
Hopefully, you are already familiar how to load the `Blink.ino <https://github.com/esp8266/Arduino/blob/master/libraries/esp8266/examples/Blink/Blink.ino>`__ sketch to an ESP8266 module and get the LED blinking. If not, please use `this tutorial <https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout/using-arduino-ide>`__ by Adafruit or `another great tutorial <https://learn.sparkfun.com/tutorials/esp8266-thing-hookup-guide/introduction>`__ developed by Sparkfun.
To hook up ESP module to Wi-Fi (like hooking up a mobile phone to a hot spot), you need just couple of lines of code:
To hook up the ESP module to Wi-Fi (like hooking up a mobile phone to a hot spot), you need only a couple of lines of code:
.. code:: cpp
@ -46,21 +46,21 @@ To hook up ESP module to Wi-Fi (like hooking up a mobile phone to a hot spot), y
void loop() {}
In the line ``WiFi.begin("network-name", "pass-to-network")`` replace ``network-name`` and ``pass-to-network`` with name and password to the Wi-Fi network you like to connect. Then upload this sketch to ESP module and open serial monitor. You should see something like:
In the line ``WiFi.begin("network-name", "pass-to-network")`` replace ``network-name`` and ``pass-to-network`` with the name and password of the Wi-Fi network you would like to connect to. Then, upload this sketch to ESP module and open the serial monitor. You should see something like:
.. figure:: pictures/wifi-simple-connect-terminal.png
:alt: Connection log on Arduino IDE's Serial Monitor
How does it work? In the first line of sketch ``#include <ESP8266WiFi.h>`` we are including `ESP8266WiFi <https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266WiFi>`__ library. This library provides ESP8266 specific Wi-Fi routines we are calling to connect to network.
How does it work? In the first line of the sketch, ``#include <ESP8266WiFi.h>`` we are including the `ESP8266WiFi <https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266WiFi>`__ library. This library provides ESP8266 specific Wi-Fi routines that we are calling to connect to the network.
Actual connection to Wi-Fi is initialized by calling:
The actual connection to Wi-Fi is initialized by calling:
.. code:: cpp
WiFi.begin("network-name", "pass-to-network");
Connection process can take couple of seconds and we are checking for this to complete in the following loop:
The connection process can take couple of seconds and we are checking for whether this has completed in the following loop:
.. code:: cpp
@ -70,52 +70,52 @@ Connection process can take couple of seconds and we are checking for this to co
Serial.print(".");
}
The ``while()`` loop will keep looping while ``WiFi.status()`` is other than ``WL_CONNECTED``. The loop will exit only if the status changes to ``WL_CONNECTED``.
The ``while()`` loop will keep looping as long as ``WiFi.status()`` is other than ``WL_CONNECTED``. The loop will exit only if the status changes to ``WL_CONNECTED``.
The last line will then print out IP address assigned to ESP module by `DHCP <https://whatismyipaddress.com/dhcp>`__:
The last line will then print out the IP address assigned to the ESP module by `DHCP <https://whatismyipaddress.com/dhcp>`__:
.. code:: cpp
Serial.println(WiFi.localIP());
If you don't see the last line but just more and more dots ``.........``, then likely name or password to the Wi-Fi network in sketch is entered incorrectly. Verify name and password by connecting from scratch to this Wi-Fi a PC or a mobile phone.
If you don't see the last line but just more and more dots ``.........``, then likely name or password to the Wi-Fi network is entered incorrectl in the sketchy. Verify the name and password by connecting from scratch to this Wi-Fi network with a PC or a mobile phone.
*Note:* if connection is established, and then lost for some reason, ESP will automatically reconnect to last used access point once it is again back on-line. This will be done automatically by Wi-Fi library, without any user intervention.
*Note:* if connection is established, and then lost for some reason, ESP will automatically reconnect to the last used access point once it is again back on-line. This will be done automatically by Wi-Fi library, without any user intervention.
That's all you need to connect ESP8266 to Wi-Fi. In the following chapters we will explain what cool things can be done by ESP once connected.
That's all you need to connect ESP8266 to Wi-Fi. In the following chapters we will explain what cool things can be done by the ESP once it's connected.
Who is Who
~~~~~~~~~~
Devices that connect to Wi-Fi network are called stations (STA). Connection to Wi-Fi is provided by an access point (AP), that acts as a hub for one or more stations. The access point on the other end is connected to a wired network. An access point is usually integrated with a router to provide access from Wi-Fi network to the internet. Each access point is recognized by a SSID (**S**\ ervice **S**\ et **ID**\ entifier), that essentially is the name of network you select when connecting a device (station) to the Wi-Fi.
Devices that connect to Wi-Fi networks are called stations (STA). Connection to Wi-Fi is provided by an access point (AP), that acts as a hub for one or more stations. The access point on the other end is connected to a wired network. An access point is usually integrated with a router to provide access from a Wi-Fi network to the internet. Each access point is recognized by a SSID (**S**\ ervice **S**\ et **ID**\ entifier), that essentially is the name of network you select when connecting a device (station) to the Wi-Fi.
ESP8266 module can operate as a station, so we can connect it to the Wi-Fi network. It can also operate as a soft access point (soft-AP), to establish its own Wi-Fi network. Therefore we can connect other stations to such ESP module. ESP8266 is also able to operate both in station and soft access point mode. This provides possibility of building e.g. `mesh networks <https://en.wikipedia.org/wiki/Mesh_networking>`__.
ESP8266 modules can operate as a station, so we can connect it to the Wi-Fi network. It can also operate as a soft access point (soft-AP), to establish its own Wi-Fi network. When the ESP8266 module is operating as a soft access point, we can connect other stations to the ESP module. ESP8266 is also able to operate as both a station and a soft access point mode. This provides the possibility of building e.g. `mesh networks <https://en.wikipedia.org/wiki/Mesh_networking>`__.
.. figure:: pictures/esp8266-station-soft-access-point.png
:alt: ESP8266 operating in the Station + Soft Access Point mode
The `ESP8266WiFi <https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266WiFi>`__ library provides wide collection of C++
The `ESP8266WiFi <https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266WiFi>`__ library provides a wide collection of C++
`methods <https://en.wikipedia.org/wiki/Method_(computer_programming)>`__ (functions) and `properties <https://en.wikipedia.org/wiki/Property_(programming)>`__ to configure and operate an ESP8266 module in station and / or soft access point mode. They are described in the following chapters.
Class Description
-----------------
The `ESP8266WiFi <https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266WiFi>`__ library is broken up into several classes. In most of cases, when writing the code, user is not concerned with this classification. We are using it to break up description of this library into more manageable pieces.
The `ESP8266WiFi <https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266WiFi>`__ library is broken up into several classes. In most of cases, when writing the code, the user is not concerned with this classification. We are using it to break up description of this library into more manageable pieces.
.. figure:: pictures/doxygen-class-index.png
:alt: Index of classes of ESP8266WiFi library
Chapters below describe all function calls (`methods <https://en.wikipedia.org/wiki/Method_(computer_programming)>`__ and `properties <https://en.wikipedia.org/wiki/Property_(programming)>`__ in C++ terms) listed in particular classes of `ESP8266WiFi <https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266WiFi>`__. Description is illustrated with application examples and code snippets to show how to use functions in practice. Most of this information is broken up into separate documents. Please follow to access them.
Chapters below describe all function calls (`methods <https://en.wikipedia.org/wiki/Method_(computer_programming)>`__ and `properties <https://en.wikipedia.org/wiki/Property_(programming)>`__ in C++ terms) listed in particular classes of `ESP8266WiFi <https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266WiFi>`__. The description is illustrated with application examples and code snippets to show how to use functions in practice. This information is broken up into the following documents.
Station
~~~~~~~
Station (STA) mode is used to get ESP module connected to a Wi-Fi network established by an access point.
Station (STA) mode is used to get the ESP module connected to a Wi-Fi network established by an access point.
.. figure:: pictures/esp8266-station.png
:alt: ESP8266 operating in the Station mode
Station class has several features to facilitate management of Wi-Fi connection. In case the connection is lost, ESP8266 will automatically reconnect to the last used access point, once it is again available. The same happens on module reboot. This is possible since ESP is saving credentials to last used access point in flash (non-volatile) memory. Using the saved data ESP will also reconnect if sketch has been changed but code does not alter the Wi-Fi mode or credentials.
Station class has several features to facilitate the management of a Wi-Fi connection. In case the connection is lost, the ESP8266 will automatically reconnect to the last used access point, once it is available again. The same happens on module reboot. This is possible since ESP saves the credentials to the last used access point in flash (non-volatile) memory. Using the saved data ESP will also reconnect if sketch has been changed but code does not alter the Wi-Fi mode or credentials.
`Station Class documentation <station-class.rst>`__
@ -124,28 +124,27 @@ Check out separate section with `examples <station-examples.rst>`__.
Soft Access Point
~~~~~~~~~~~~~~~~~
An `access point (AP) <https://en.wikipedia.org/wiki/Wireless_access_point>`__ is a device that provides access to Wi-Fi network to other devices (stations)
and connects them further to a wired network. ESP8266 can provide similar functionality except it does not have interface to a wired network. Such mode of operation is called soft access point (soft-AP). The maximum number of stations that can simultaneously be connected to the soft-AP can be set `from 0 to 8 <https://bbs.espressif.com/viewtopic.php?f=46&t=481&p=1832&hilit=max_connection#p1832>`__, but defaults to 4.
An `access point (AP) <https://en.wikipedia.org/wiki/Wireless_access_point>`__ is a device that provides access to a Wi-Fi network to other devices (stations) and connects them to a wired network. The ESP8266 can provide similar functionality, except it does not have interface to a wired network. Such mode of operation is called soft access point (soft-AP). The maximum number of stations that can simultaneously be connected to the soft-AP can be set `from 0 to 8 <https://bbs.espressif.com/viewtopic.php?f=46&t=481&p=1832&hilit=max_connection#p1832>`__, but defaults to 4.
.. figure:: pictures/esp8266-soft-access-point.png
:alt: ESP8266 operating in the Soft Access Point mode
The soft-AP mode is often used and an intermediate step before connecting ESP to a Wi-Fi in a station mode. This is when SSID and password to such network is not known upfront. ESP first boots in soft-AP mode, so we can connect to it using a laptop or a mobile phone. Then we are able to provide credentials to the target network. Once done ESP is switched to the station mode and can connect to the target Wi-Fi.
The soft-AP mode is often used and an intermediate step before connecting ESP to a Wi-Fi in a station mode. This is when SSID and password to such network is not known upfront. ESP first boots in soft-AP mode, so we can connect to it using a laptop or a mobile phone. Then we are able to provide credentials to the target network. Then, the ESP is switched to the station mode and can connect to the target Wi-Fi.
Another handy application of soft-AP mode is to set up `mesh networks <https://en.wikipedia.org/wiki/Mesh_networking>`__. ESP can operate in both soft-AP and Station mode so it can act as a node of a mesh network.
Another handy application of soft-AP mode is to set up `mesh networks <https://en.wikipedia.org/wiki/Mesh_networking>`__. The ESP can operate in both soft-AP and Station mode so it can act as a node of a mesh network.
`Soft Access Point Class documentation <soft-access-point-class.rst>`__
Check out separate section with `examples <soft-access-point-examples.rst>`__.
Check out the separate section with `examples <soft-access-point-examples.rst>`__.
Scan
~~~~
To connect a mobile phone to a hot spot, you typically open Wi-Fi settings app, list available networks and pick the hot spot you need. Then enter a password (or not) and you are in. You can do the same with ESP. Functionality of scanning for, and listing of available networks in range is implemented by the Scan Class.
To connect a mobile phone to a hot spot, you typically open Wi-Fi settings app, list available networks and pick the hot spot you need. Then enter a password (or not) and you are in. You can do the same with the ESP. Functionality of scanning for, and listing of available networks in range is implemented by the Scan Class.
`Scan Class documentation <scan-class.rst>`__
Check out separate section with `examples <scan-examples.rst>`__.
Check out the separate section with `examples <scan-examples.rst>`__.
Client
~~~~~~
@ -155,7 +154,7 @@ The Client class creates `clients <https://en.wikipedia.org/wiki/Client_(computi
.. figure:: pictures/esp8266-client.png
:alt: ESP8266 operating as the Client
Check out separate section with `examples <client-examples.rst>`__ / `list of functions <client-class.rst>`__
Check out the separate section with `examples <client-examples.rst>`__ / `list of functions <client-class.rst>`__
axTLS Client Secure - DEPRECATED
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -164,9 +163,9 @@ The following section details axTLS, the older TLS library used by the project.
The axTLS Client Secure is an extension of `Client Class <#client>`__ where connection and data exchange with servers is done using a `secure protocol <https://en.wikipedia.org/wiki/Transport_Layer_Security>`__. It supports `TLS 1.1 <https://en.wikipedia.org/wiki/Transport_Layer_Security#TLS_1.1>`__. The `TLS 1.2 <https://en.wikipedia.org/wiki/Transport_Layer_Security#TLS_1.2>`__ is not supported.
Secure applications have additional memory (and processing) overhead due to the need to run cryptography algorithms. The stronger the certificate's key, the more overhead is needed. In practice it is not possible to run more than a single secure client at a time. The problem concerns RAM memory we can not add, the flash memory size is usually not the issue. If you like to learn how `client secure library <https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266WiFi/src/WiFiClientSecure.h>`__ has been developed, access to what servers have been tested, and how memory limitations have been overcame, read fascinating issue report `#43 <https://github.com/esp8266/Arduino/issues/43>`__.
Secure applications have additional memory (and processing) overhead due to the need to run cryptography algorithms. The stronger the certificate's key, the more overhead is needed. In practice it is not possible to run more than a single secure client at a time. The problem concerns RAM memory we can not add; the flash memory size is usually not the issue. If you would like to learn how `client secure library <https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266WiFi/src/WiFiClientSecure.h>`__ has been developed, what server access has been tested, and how memory limitations have been overcome, read this fascinating issue report `#43 <https://github.com/esp8266/Arduino/issues/43>`__.
Check out separate section with `examples <client-secure-examples.rst>`__ / `list of functions <client-secure-class.rst>`__
Check out the separate section with `examples <client-secure-examples.rst>`__ / `list of functions <client-secure-class.rst>`__
BearSSL Client Secure and Server Secure
@ -177,7 +176,7 @@ BearSSL Client Secure and Server Secure
.. figure:: pictures/esp8266-client-secure.png
:alt: ESP8266 operating as the Client Secure
Secure clients and servers require siginificant amounts of additional memory and processing to enable their cryptographic algorithms. In general only a single secure client or server connection at a time can be processed given the little RAM present on the ESP8266, but there are methods of reducing this RAM requirement detailed in the relevant sections.
Secure clients and servers require siginificant amounts of additional memory and processing to enable their cryptographic algorithms. In general, only a single secure client or server connection at a time can be processed given the little RAM present on the ESP8266, but there are methods of reducing this RAM requirement detailed in the relevant sections.
`BearSSL::WiFiClientSecure <bearssl-client-secure-class.rst>`__ contains more information on using and configuring TLS connections.

View File

@ -330,7 +330,7 @@ void ArduinoOTAClass::_runUpdate() {
if (Update.end()) {
client.print("OK");
client.stop();
delay(10);
delay(1000);
#ifdef OTA_DEBUG
OTA_DEBUG.printf("Update Success\n");
#endif

View File

@ -558,7 +558,7 @@ void HTTPClient::setRedirectLimit(uint16_t limit)
/**
* use HTTP1.0
* @param timeout
* @param useHTTP10 bool
*/
void HTTPClient::useHTTP10(bool useHTTP10)
{

View File

@ -819,7 +819,7 @@ extern "C" {
BR_TLS_RSA_WITH_3DES_EDE_CBC_SHA
#endif
};
#ifndef BEARSSL_BASIC
#ifndef BEARSSL_SSL_BASIC
// Server w/EC has one set, not possible with basic SSL config
static const uint16_t suites_server_ec_P [] PROGMEM = {
BR_TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,
@ -852,7 +852,7 @@ extern "C" {
#endif
static const uint16_t suites_server_rsa_P[] PROGMEM = {
#ifndef BEARSSL_BASIC
#ifndef BEARSSL_SSL_BASIC
BR_TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
BR_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
BR_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
@ -871,7 +871,7 @@ extern "C" {
BR_TLS_RSA_WITH_AES_256_CBC_SHA256,
BR_TLS_RSA_WITH_AES_128_CBC_SHA,
BR_TLS_RSA_WITH_AES_256_CBC_SHA,
#ifndef BEARSSL_BASIC
#ifndef BEARSSL_SSL_BASIC
BR_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA,
BR_TLS_RSA_WITH_3DES_EDE_CBC_SHA
#endif

View File

@ -5,6 +5,7 @@
#include <stdint.h>
#include <stddef.h>
#include <gdb_hooks.h>
#include "internal/gdbstub-cfg.h"
#ifdef __cplusplus

View File

@ -44,13 +44,14 @@ import json
# or by user command line
speeds = collections.OrderedDict([
( '57', [ 's57', 's115', 's230', 's256', 's460', 's512', 's921' ]),
( '115', [ 's115', 's57', 's230', 's256', 's460', 's512', 's921' ]),
( '230', [ 's230', 's57', 's115', 's256', 's460', 's512', 's921' ]),
( '256', [ 's256', 's57', 's115', 's230', 's460', 's512', 's921' ]),
( '460', [ 's460', 's57', 's115', 's230', 's256', 's512', 's921' ]),
( '512', [ 's512', 's57', 's115', 's230', 's256', 's460', 's921' ]),
( '921', [ 's921', 's57', 's115', 's230', 's256', 's460', 's512' ]),
( '57', [ 's57', 's115', 's230', 's256', 's460', 's512', 's921', 's3000' ]),
( '115', [ 's115', 's57', 's230', 's256', 's460', 's512', 's921', 's3000' ]),
( '230', [ 's230', 's57', 's115', 's256', 's460', 's512', 's921', 's3000' ]),
( '256', [ 's256', 's57', 's115', 's230', 's460', 's512', 's921', 's3000' ]),
( '460', [ 's460', 's57', 's115', 's230', 's256', 's512', 's921', 's3000' ]),
( '512', [ 's512', 's57', 's115', 's230', 's256', 's460', 's921', 's3000' ]),
( '921', [ 's921', 's57', 's115', 's230', 's256', 's460', 's512', 's3000' ]),
( '3000', [ 's3000','s57', 's115', 's230', 's256', 's460', 's512', 's921' ]),
])
# boards list
@ -1061,6 +1062,10 @@ macros = {
( '.menu.baud.921600', '921600' ),
( '.menu.baud.921600.upload.speed', '921600' ),
]),
's3000': collections.OrderedDict([
( '.menu.baud.3000000', '3000000' ),
( '.menu.baud.3000000.upload.speed', '3000000' ),
]),
####################### flash erase