- 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.
* enable by default latest 2.2.x firmware, including fixed espnow
* LittleFS: avoid crash when FS size is 0
* flash size defaults: 1M for generic board, not empty FS for all
* Make SPIFFS be an integer number of blocks
boards.txt.py simply calculated the end and start using flash sizes, but
in cases where an 8K page was used (>512KB SPIFFS), this could leave a
4K half-block left at the end of SPIFFS.
mkspiffs and the SPIFFS code uses integer division to calculate the
maximum block number, so it worked fine in practice and the code simply
ignored the extra, fractional block.
Now actually take block size into account when calculating the end of
SPIFFS, ensuring no fractional blocks are passed in. Does not result in
data loss on pre-existing SPIFFS filesystems.
* Fix the 1m512 case and clean up code
Ensure that no SPIFFS_block in the LD files is modified from the
original to endure correct backwards compatibility
* Factor out common if, clean code
* Make boards.py vars "fs_xx" instead of "spiffs_xx"
* Add support for newer mobile OS changes.
Took me quite a while to figure this out, but according to this issue (https://github.com/espressif/arduino-esp32/issues/1037), in order to get a captive notification to show or the popup to open, the DNS server must resolve to a public IP. It will not work with a pivate one (e.g. 192.168.4.1).
On Android, a notification ("Register with Network") is displayed in top left notification bar.
On IOS, the login popup is displayed.
* Add support for newer mobile OS changes.
Took me quite a while to figure this out, but according to this issue (espressif/arduino-esp32#1037), in order to get a captive notification to show or the popup to open, the DNS server must resolve to a public IP. It will not work with a pivate one (e.g. 192.168.4.1).
On Android, a notification ("Register with Network") is displayed in top left notification bar.
On IOS, the login popup is displayed.
Apply most compatible changes needed to get the core compiling under GCC
7.2 to the main gcc 4.8 tree to ease porting for 3.0.0.
Update pgmspace.h with corrected and optimized unaligned pgm_read
macros. Now pgm_read_dword in the unaligned case gives proper results
even if optimization is enabled and is also written in assembly and only
1 instruction longer than the pgm_read_byte macro (which also has been
optimized to reduce 1 instruction). These changes should marginally
shrink code and speed up flash reads accordingly.
The toolchain should/will be rebuilt at a later time with this
optimization to ensure it's used in the libc.a/etc. files.
After verifying that they really were spurious, clean up the warnings
that gcc -wextra reports, except for LeaMDNS.
Upgrade GCC to gcc-7 for host builds
* TCP connect and send delay fix
Implement early exit as connection established or data already sent.
(Previous implementation was exiting only on timeout expired)
* Convert ESP8266WebServer* into templatized model
Supercedes #4912
Refactor the three versions of ESP8266WebServer and *WebServerSecure to a
single templated class. Use "using" to enable old, non-templated names to b
used (so no user changes required to compile or run).
Fixes#4908 and clean up the code base a lot.
Basic tests run (the ones in the example code).
No code changes are required in userland except for setting the SSL
certificates which now use a cleaner "getServer()" accessor and lets the
app use the native BearSSL calls on the WiFiClientSecure object.
@devyte should be proud, it removes virtuals and even has template specialization...
* Fix HTTPUpdate templates and examples
* Fix HTTPUpdateServer library build
Need to remove dot-a linkage since there are no .cpp files in the
directory anymore due to templates.
* Provide backward-compat names for updt template
Allow existing code to use the same well known names for
HTTPUpdateSecure.
* Remove ClientType from all templates, auto-infer
Remove the ClientType template parameter from all objects. Simplifies
the code and makes it more foolproof.
Add a "using" in each server to define the type of connection returned
by all servers, which is then used in the above templates automatically.
* Can safely include FS.h now that SD/SPIFFS unified
* Move the templates/objects to their own namespaces
* Fix merge issues with untemplated methods
* Address review comments
* Fix mock test, remove warnings inside test dir
Make the simple mock test CI job pass and clean up
any spurious warnings in the test directory.
There still are warnings in the libraries and core, but they
should be addressed in a separate PR.
Default interface is STA (or AP if available and STA is unavailable).
An interface can also be specified in ::begin() by its IP address.
MDNS will not cross interfaces (there is currently no notion of "bridged interfaces")
Multiple instances should be working, this is not tested in this commit.
* Fix device test environment variables
Device tests were not connecting properly to WiFi because the
environment variables were not set when WiFi.connect was called.
This would result in tests sometimes working *if* the prior sketch run
on the ESP saved WiFi connection information and auto-connect was
enabled. But, in most cases, the tests would simply never connect to
any WiFi and fail.
getenv() works only after BS_RUN is called (because BS_RUN handles the
actual parsing of environment variables sent from the host).
Add a "pretest" function to all tests which is called by the host test
controller only after all environment variables are set. Move all
WiFi/etc. operations that were in each separate test's setup() into it.
So the order of operations for tests now is:
ESP: setup()
-> Set serial baud
-> Call BS_RUN()
HOST: Send environment
Send "do pretest"
ESP: pretest()
-> Set Wifi using env. ariables, etc. return "true" on success
HOST: Send "run test 1"
ESP: Run 1st test, return result
HOST: Send "run test 2"
ESP: Run 2nd test, return result
<and so forth>
If nothing is needed to be set up, just return true from the pretest
function.
All tests now run and at least connect to WiFi. There still seem to be
some actual test errors, but not because of the WiFi/environment
variables anymore.
* Remove unneeded debug prints
* Silence esptool.py output when not in V=1 mode
Esptool-ck.exe had an option to be silent, but esptool.py doesn't so the
output is very chatty and makes looking a the run logs hard (60 lines
of esptool.py output, 3 lines of actual test reports).
Redirect esptool.py STDOUT to /dev/null unless V=1 to clear this up.
* Speed up builds massively by removing old JSON
arduino-builder checks the build.options.json file and then goes off and
pegs my CPU at 100% for over a minute on each test compile checking if
files have been modified.
Simply deleting any pre-existing options.json file causes this step to
be skipped and a quick, clean recompile is done in siginificantly less
time.
* Enable compile warnings, fix any that show up
Enable all GCC warnings when building the tests and fix any that came up
(mostly signed/unsigned, unused, and deprecated ones).
* Fix UMM_MALLOC printf crash, umm_test
Printf can now handle PROGMEM addresses, so simplify and correct the
debug printouts in umm_info and elsewhere.
* scheduled function: replacing new by malloc needs to initialize complex members
Functional was not initialized because of malloc() instead of new.
First assignment calls destructor on initial value which was not constructed (->frozen,wdt).
Fixes#6220
MklittleFS had different configuration options which affected small
files and could result in crashes or corruption on upload.
Update mklittlefs tool to one that matches the config of the current
library.
You will need to re-run tools/get.py to get the new tool version if you
are running from Git.
* Track breaking API chance in EspSoftwareSerial.
* Revert "Track breaking API chance in EspSoftwareSerial."
This reverts commit 78aa3e84321935dcc3cfb7ebe8c293ccb0c06a79.
* Track breaking API chance in EspSoftwareSerial.
* Bug fix in EspSoftwareSerial
* EspSoftwareSerial: improved memory fences
* Refactoring upstream
* EspSoftwareSerial fixed a high-bitrate error source, probably caused by end-bit detection
without checking for same-level timestamps from the IRQ
* EspSoftwareSerial examples updates
* Fix to stop bit detection in EspSoftwareSerial
* Latest bit timings fix in EspSoftwareSerial.
* EspSoftwareSerial examples
* EspSoftwareSerial latest throughput results in comments of loopback.ino
* Lastest EspSoftwareSerial, dependent on a few as yet unmerged PRs, tho
* Submodule EspSoftwareSerial release 5.2.0 with workaround for as yet missing attachInterruptArg in Arduino.h
* EspSoftwareSerial release 5.2.0, includes workaround for missing attachInterruptArg in ESP8266 Arduino
* EspSoftwareSerial: CI failed on examples - defines for Wemos board GPIOs.
* Updated Example to use ArduinoJson6
* Updated save method to Serialize and not Deserialize
* Updated References to ArduinoJson 6.11.0
* Style Fix
* another line missed
* Added the file extension to the new version
1. The current version is ~at~ on the Arduino website
2. Start Arduino and open _the_ Preferences window
3. Enter ```https://arduino.esp8266.com/stable/package_esp8266com_index.json``` into _the_ *Additional Board Manager URLs* field
4. The current version is ~at~ on the Arduino website
5. [PlatformIO](https://platformio.org?utm_source=github&utm_medium=arduino-esp8266) is an open source ecosystem for IoT
development with _a_ ~cross platform~ cross-platform build system, library manager and full support
6. [ESP8266 Community Forum](https://www.esp8266.com/u/arduinoanswers) is a ~well established~ well-established community
7. or just want to discuss how to approach a problem, (removed extra space after 'problem')
8. when encountering an issue ~which~ that happens at run time
9. attach _the_ serial output
10. Check out the list of issues ~which~ that are easy to fix
11. It is distributed under _the_ MIT license.
12. It is distributed under _the_ MIT license.
When in basic SSL mode, don't include ciphers for EC for the server by
replacinf the BearSSL "support everything" init call with our own
version which obeys the requested BASIC_SSL.
Saves ~46KB on TLS servers, about the same as basic SSL saves for
clients.
Undo the BearSSL RODATA->PROGMEM changes because there are some bad
performance regressions in EC server operations which can result in
timeouts and WDTs.
Keep the shrunked bearssl.a library as that is orthogonal to the PROGMEM
changes.
Rewrite all the integer math operations with const input parameters to
use PROGMEM properly (pgm_read_xx or memcpy_P), and move all the EC
order and generators and SHA OIDs to PROGMEM.
This frees around 1.2KB of heap for any SSL applications.
Also delete unneeded objects from the bearssl.a library to shrink the
GIT repo size.
Supercedes #6027
Make SSO more generic by keeping track of its length explicitly,
allowing for embedded \0s to exist in the String (just like the non-SSO
ones).
Use memmove/memcpy_P when we know the length of a string to save CPU
time.
Add tests to inject \0s in a String to ensure it is still working as
designed.
* Use placement new for ETSTimer - no heap fragmentation, new/delete semantics unchanged.
* Make change completely invisible to derived classes at compile-time.
* Fix "sizeof() incomplete type ETSTimer" error.
* C++ reinterpret_cast<> instead of C-style cast.
void* instead of uint32_t - fixes x86_64 server compiles.
* Simplify casts.
* Revert to complete placement new treatment of ETSTimer member.
* Cleanup includes
* Fix omitted casts
* Change per review https://github.com/esp8266/Arduino/pull/6164#pullrequestreview-243583458
* wtf - local compile didn't catch this sloppy mistake
* Resolves review https://github.com/esp8266/Arduino/pull/6164#discussion_r290388119
* Reviewer stated that floating point operations are inlined, software operations -
reduce number of code spots to one.
__This is a breaking change, but the header and example did warn
everyone that this API was in flux due to the incompatible SD and SPIFFS
File implementations.__
BearSSL CertStores now simply need a filesystem and the names of the
data (generated on-chip) and archive (uploaded by user) files on it.
No more need to roll your own virtual CertStoreFile class.
Update the library, examples, and device test.
Fixes#6082
Add an info64() call which returns used and total sizes as 64 bit
quantities. A default wrapper that just copies the 32-bit values is
included for LittleFS/SPIFFS which can't hit those capacities.