* Add information about the max_connection constructor argument.
* Correct information about max soft-AP connections.
* Add information about what happens when max_connection is reached.
* Correct terminology
* - Correct the valid range of max_connection to 1 - 8.
- Include reference.
According to the GCC man page, __section__ attributes should only be used
for global variables. However, the PROGMEM and ICACHE_RODATA macros use
this variable decorator even for local variables. Most of the time it works,
but when a static or inlined function tries to use a PROGMEM/PSTR/etc.
variable the compiler can throw an error like:
error: XXX causes a section type conflict with YYY
Change the PROGMEM macro to emit a section name that is unique (a combo
of the file, line, and counter variables to ensure uniqueness). The
standard linker script will place them properly in .IROM without
any changes.
Fixes#5036 and others.
* Implementation of Functional and Scheduled option in Ticker lib
* Update example formatting
* More example updates
* More updates to example
* More updates to example
* Function added to detect baudrate
* Added uart_start_detect_baudrate, detectBaudrate() wrappers for HardwareSerial and an example usage SerialDetectBaudrate.ino
* Some layout changes to pass Travis tests
* Some more nitty-gritty layout changes to pass Travis tests
* Some even more nitty-gritty layout changes to pass Travis tests
* renamed one function to testBaudrate() and updated doc/reference.rst
* Minor updates to doc/reference.rst
* New lines added
* Make mesh network actually usable. Make mesh network use static IP during initial connection to speed up connection time. Add separate handlers for requests and responses. Add network password. Provide more detailed code example. Add optional verbose mode. Improve comments. Add readme file.
* Fix compiler warnings. Fix code style of HelloMesh.ino to avoid upsetting Travis.
* Remove stray spaces.
* Make mesh network WiFi password settable via the ESP8266WiFiMesh constructor. Make use of static IP optional by moving static IP initialization code to setStaticIP method. Increase scanning interval from one to two seconds in the HelloMesh.ino example to increase chances of successful connections. Update comments. Update README.rst.
* Increase specificity in the conditions of the waitForClientTransmission method (renamed from waitForClient) to avoid issues related to #4626 , #4728 and #4754 in the future.
* Improve most parts of the library to achieve better performance and greatly increase flexibility.
Changes:
* Make WiFi-connection related variables static to allow for the use of multiple ESP8266WiFiMesh instances on a single node (useful e.g. when communicating with several different mesh networks).
* Make it possible to choose AP port, which is helpful when using multiple ESP8266WiFiMesh AP:s on a single node.
* Add user-customizable network filter.
* Make activation of own AP optional for each mesh node.
* Add ways to change mesh network name and node id for existing ESP8266WiFiMesh instances.
* Add verboseModePrint method to clean up the code.
* Add reactivation of static IP after successful data transfers to speed up re-connection attempts.
* Add empty_IP constant which can be used to check if static IP is disabled for a ESP8266WiFiMesh instance.
* Remove the WiFiClient _client class variable in ESP8266WiFiMesh since there is no need to save _client in the class instance.
* Add transmission status as a return value from attemptTransmission.
* Pass calling ESP8266WiFiMesh instance pointer to callback functions to allow for greater range of actions in callbacks.
* Make transmission message a class variable to allow it to be stored in the class and accessed from callbacks.
* Add getters for mesh name and node id to ESP8266WiFiMesh.
* Add getter and setter for networkFilter to ESP8266WiFiMesh.
* Increase range of available node_id:s by changing the type to String and adding functions to convert between String and uint64_t using a customizable radix between 2 and 36.
* Make it possible to connect to several nodes during each attemptTransmission call.
* Add static connection_queue and latest_transmission_outcomes vectors to the ESP8266WiFiMesh class, a NetworkInfo class and a TransmissionResult class to aid in bookkeeping when connecting to several AP:s during one attemptTransmission call.
* Make wifi_channel and BSSID optional when connecting to an AP (though excluding them will slow down the connection process).
* Add optional scan and static ip optimizations available in Arduino core for ESP8266 version 2.4.2.
* Add functions to check lwIP version in order to enable WiFi optimizations only available with lwIP2.
* Add concluding_disconnect, initial_disconnect and no_scan options to the attemptTransmission method.
* Update documentation.
* Improve README.rst formatting.
* Further improve README.rst.
* Even further improve README.rst.
* Make source code comments Doxygen compatible. Improve README file and change its file format to .md.
* Add temporary compatibility layer to ensure backwards compatibility with the old mesh network library API until the next major core release (2.5.0).
* Polish documentation slightly.
* Add scan_all_wifi_channels option to attemptTransmission method.
* - Add getter and setter for the WiFi channel of a ESP8266WiFiMesh instance.
- Separate methods for changing mesh name and node id from AP control methods.
- Add methods getAPController and isAPController to better handle situations when multiple ESP8266WiFiMesh instances take turns to be in control of the AP.
- Create separate UtilityMethods.cpp file for utility methods.
- Improve code efficiency and robustness, e.g. by passing arguments by reference instead of by value for non-POD types and employing typedefs.
- Update README.md.
* Make the code more stylish.
* Update README.md with the new ESP8266WiFiMesh constructor documentation.
* Make attemptScan method in CompatibilityLayer use reference as argument.
* Make it possible to use const String as argument to attemptScan.
* - Make code use camelCase instead of snake_case.
- Improve documentation.
* Rename Uint64ToString to uint64ToString and StringToUint64 to stringToUint64, since they are methods.
Fixes#4882 and updates GitHub certificate fingerprint to the current one
in BearSSL_Validation example.
When setting a authentication mode or stopping, clear all others out in case
the object is being re-used.
Add in a yield during the SSL handshake to allow a graceful timeout and not
a WDT error when the remote server hiccups. Thanks to @Jeroen88 for
finding and testing this.
Several users have been worried that they need to generate the IDX file,
but don't know how. The CertStore code actually writes this file on object
creation, and the user never needs to explicitly generate or upload it.
Add a comment to the example explicitly noting this.
Due to popular demand, remove the hardcoded dependency on SPIFFS
or SD from the CertStore by factoring out the file interface into
a new class (CertStoreFile) that the user will need to implement
as a thin wrapper around either a SPIFFS.file or a SD.file
Combine the downloaded certificates into a UNIX "ar" archive
and parse that on-the-fly to allow easy inspection and creation
of the Cert Store database.
Examples updated with a new certificate downloader that creates
the certs.ar archive and with a single sample that can be built
for either SPIFFS or SD with a #define. Users can copy the
implementation of the CertStoreFile they need to their own code
as it is self-contained.
Also move the CertStore to the BearSSL namespace and remove the
suffix and separate SPIFFS/SD sources.
Remove the "deep+" change from the CI build as well (no special
options needed on any PIO or makefile build).
We'll revisit the filesystem wrapper for 2.5.0, hopefully having a
unified template for both filesystem usage at a global level. For
current users, be aware the interface may change (simplify!) in
release 2.5.0.
Fixes#4740
When a message is sent by the app that is larger than the SSL buffer,
it will take multiple TLS fragments to transfer. Writes will loop
through and not return until either all data is transferred or there
is an error.
Remove and rewrite all the parts of the core/libraries using TIMER1
and consolidate into a single, shared waveform generation interrupt
structure. Tone, analogWrite(), Servo all now just call into this
shared resource to perform their tasks so are all compatible
and can be used simultaneously.
This setup enables multiple tones, analogWrites, servos, and stepper
motors to be controlled with reasonable accuracy. It uses both TIMER1
and the internal ESP cycle counter to handle timing of waveform edges.
TIMER1 is used in non-reload mode and only edges cause interrupts. The
interrupt is started and stopped as required, minimizing overhead when
these features are not being used.
A generic "startWaveform(pin, high-US, low-US, runtime-US)" and
"stopWaveform(pin)" allow for further types of interfaces. Minimum
high or low period is ~1 us.
Add a tone(float) method, useful when working with lower frequencies.
Fixes#4321. Fixes 4349.
* interactive example: update with option for using DHCP again after using static IP
* lwip2: avoid crash when IP address is set to 0(any) by dhcp not getting its lease renewal in due time
* lwip2: automatically remove oldest PCBs in time-wait state, limit their number
thanks to @me-no-dev 07f4d4c241 (diff-f8258e71e25fb9985ca3799e3d8b88ecR399)
* faq: update about tcpCleanup()
* lwip2: add a macro HAS_PHY_CAPTURE=1 indicating capture facility is available
When the TCP socket is closed there may be some data left in the
BearSSL internal buffers which can be read by the application.
The BearSSL pump, however, would always return no data available
in the case the socket was disconnected before checking if the
SSL was in a state where the app could possibly read.
Fix by returning if the state is available, even if the connection
is gone. Eventually no more data will become available to read
and the original -1 will be returned.
This should match the existing axTLS ::connected() behavior.
The SSL pipeline is multi-stage, and the TCP connection can go down
even though there is still data waiting to be decrypted or in the
decryption buffer.
Explicitly check that there if there can be any data made available
to the app, and if so report that we are still connected(). When
there is no data and there is no TCP connection, report disconnected.
BearSSL (https://www.bearssl.org) is a TLS(SSL) library written by
Thomas Pornin that is optimized for lower-memory embedded systems
like the ESP8266. It supports a wide variety of modern ciphers and
is unique in that it doesn't perform any memory allocations during
operation (which is the unfortunate bane of the current axTLS).
BearSSL is also absolutely focused on security and by default performs
all its security checks on x.509 certificates during the connection
phase (but if you want to be insecure and dangerous, that's possible
too).
While it does support unidirectional SSL buffers, like axTLS,
as implemented the ESP8266 wrappers only support bidirectional
buffers. These bidirectional buffers avoid deadlocks in protocols
which don't have well separated receive and transmit periods.
This patch adds several classes which allow connecting to TLS servers
using this library in almost the same way as axTLS:
BearSSL::WiFiClientSecure - WiFiClient that supports TLS
BearSSL::WiFiServerSecure - WiFiServer supporting TLS and client certs
It also introduces objects for PEM/DER encoded keys and certificates:
BearSSLX509List - x.509 Certificate (list) for general use
BearSSLPrivateKey - RSA or EC private key
BearSSLPublicKey - RSA or EC public key (i.e. from a public website)
Finally, it adds a Certificate Authority store object which lets
BearSSL access a set of trusted CA certificates on SPIFFS to allow it
to verify the identity of any remote site on the Internet, without
requiring RAM except for the single matching certificate.
CertStoreSPIFFSBearSSL - Certificate store utility
Client certificates are supported for the BearSSL::WiFiClientSecure, and
what's more the BearSSL::WiFiServerSecure can also *require* remote clients
to have a trusted certificate signed by a specific CA (or yourself with
self-signing CAs).
Maximum Fragment Length Negotiation probing and usage are supported, but
be aware that most sites on the Internet don't support it yet. When
available, you can reduce the memory footprint of the SSL client or server
dramatically (i.e. down to 2-8KB vs. the ~22KB required for a full 16K
receive fragment and 512b send fragment). You can also manually set a
smaller fragment size and guarantee at your protocol level all data will
fit within it.
Examples are included to show the usage of these new features.
axTLS has been moved to its own namespace, "axtls". A default "using"
clause allows existing apps to run using axTLS without any changes.
The BearSSL::WiFi{client,server}Secure implements the axTLS
client/server API which lets many end user applications take advantage
of BearSSL with few or no changes.
The BearSSL static library used presently is stored at
https://github.com/earlephilhower/bearssl-esp8266 and can be built
using the standard ESP8266 toolchain.
* Added channel, ssid scan
Overloaded scanNetworks so scan can occur on a single channel and/or for a particular ssid.
* Added parameters to scanNetworks
channel number and ssid have been added as optional parameters to the orginal scanNetworks()
* fix connection reset by peer case where pcb is set to null in ClientContext::_error but not reported to WiFiClient
* ClientContext: rename functions *_sent to *_acked (:sent to :ack in debug)
* use nullptr instead of 0
Enables I2S stereo input via DMA using new API calls:
. i2s_rxtx_begin(bool rx, rool tx);
. i2s_read_sample(uint32_t *l, uint32_t *r);
Original API calls will only enable TX, so this is backwards compatible.
Add simple I2S input example code using Arduino serial plotter.
Add UDP transmit of I2S microphone data to a PC (remote microphone).
Clean up and reorganize code to share RX and TX logic as much as
possible. Fix a potential WDT error while in blocking sample read
and write.
* Fix WebServerSecure streamFile()
ESP8266WebServerSecure's streamFile was using the base class' method
which did not use SSL encrypt before transmitting, leading to failure.
Add a new template method and required support for
WiFiClientSecure::write(Stream&) (using a local temp buffer since the
SSL libs do not grok Arduino Streams at all).
Fixes#4544
* Match ClientContext buffer and yield() behavior
ClientContext sends out 256 bytes at a time and gives a yield after
each chunk to ensure the WDT doesn't fire. Mimic that behavior in
WiFiClientSecure::write(Stream&).
* Change argument to Esp.deepSleep from uint32 to uint64 to match SDK, add deepSleepMax based on the cali_proc function per SDK
* SPISlave.end() added
* Nameoftherose patch for Issue #2435 (#4256)
* WiFiTelnetToSerial Example - Minor Issues #2435
* WiFiTelnetToSerial Example - Minor Issues #2435
Patch to rectify issue #2435
* Check that pins needed by Wire are defined at compile-time (#4261)
Provides a simple interface to attach/detach pins to the sigma-delta generator, and get/set the 2 parameters prescaler & target. Working example that fades the onboard LED is provided. Code and sample by @stefaandesmet2003.
- Move GDB stub hooks into a separate file, provide header for it
- Use syscall instruction raise user mode exception
- Remove unused code in postmortem.c
fixup
fixup
Reported in https://github.com/esp8266/Arduino/issues/4078.
WiFiClient::stopAll, called from a WiFi disconnected event handler,
could be called while WiFiClient::connect was in progress. This issue
was initially fixed in #4194, by testing `this` pointer for being
non-null in ClientContext::connect.
This change delegates deletion of ClientContext to WiFiClient
destructor. WiFiClient::stop only calls ClientContext::stop, which
closes/aborts the connection.