1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-29 16:03:14 +03:00
Commit Graph

1481 Commits

Author SHA1 Message Date
ee1481aa7c Parsed with restyle.sh. Compile with all errors. 2020-11-07 19:24:31 +00:00
745db9ab55 Oops. Need to pass layout by reference in order to capture the correct address. Took a while to find that. There maybe a better way to store all these configs 2020-11-06 22:33:01 +00:00
0fb1ebc3c0 Add FSTools with examples of how to convert between SPIFFS and LITTLEFS. 2020-11-06 20:31:43 +00:00
5d2563eee9 Fixed bug in parsing POST file uploads (#7543)
The boundary parsing in the webserver could end up missing boundaries if the
uploaded file had `--` at the start of the line because it read in the entire boundary
length worth of bytes.  Fix by only reading up to either the boundary length or
a newline, avoiding the issue.

Fixes #7542
2020-11-01 18:31:59 -08:00
1bb0815fed Hook up custom timestamp proc for SD/SDFS (#7686)
The SDFS implementation didn't include plumbing to support user-supplied
timestamp generators (for file create/write times) because the SDFat
library doesn't support a callback parameter.

Work around it by using a single, global (inside sdfs namespace) that
the static timestamp callback member can see and use.

Add a test of the feature in CI.

Fixes #7682
2020-10-31 08:05:34 -07:00
996211f132 Compile failure fix with FS_NO_GLOBALS flag (#7685) 2020-10-29 17:11:57 -07:00
77bd71ec29 Add Stream loaders for BearSSL (#7675)
Fixes #7671

Allows for code to do things like read certs from LittleFS or even HTTP
connections with code like:

  File cert = LittleFS.open("/client-crt.pem", "r");
  clientCert = new X509List(cert, cert.size());
  cert.close();
2020-10-28 07:22:41 -07:00
cfdcff1028 Catch and display SSL errors for fatal alerts (#7681)
Partial fix to #7678
2020-10-27 22:18:26 -07:00
7f38e141c7 BREAKING: Add Print::availableForWrite method (#7658)
* Add Print::availableForWrite method

Adds an availableForWrite() method to the Print class, matching current
ArduinoCore-API commit 398e70f188e2b861c10d9ffe5e2bfcb6a4a4f489 .

Hook availableForWrite into the SDFS filesystem (other FSes don't have
this capability built-in).

Fixes #7650

* WiFiClient::availableForWrite proto matching Print

* Fix Netdump signedness warning

* Clean up Serial availableForWrite

This is evidently a breaking change due to the type difference.
Arduino's `availableForWrite` returns an `int`, while the
(multiply-implemented, non-virtual) core `availableForWrite` returned
`size_t`.
2020-10-27 11:55:42 +01:00
95de525af9 Refactor WiFi scan example (#7655) 2020-10-27 11:20:07 +01:00
c65626622a Fix long password validation in WebServer (#7676)
Use a base64 encode that doesn't add CRs to the output when comparing
username:password values for authentication.

Fixes #7664
2020-10-25 04:03:02 -07:00
95fb104562 settimeofday_cb: distinguish from user or sntp (#7637)
* settimeofday_cb: distinguish from user or sntp
2020-10-23 10:43:45 +02:00
e920564b8d Fix Netdump library architecture (#7659)
When building with the Netdump library, the IDE generates the following warning:
> WARNING: library Netdump claims to run on (esp8266 lwip) architecture(s) and may be incompatible with your current board which runs on (esp8266) architecture(s).

Fix the library.properties to call the architecture just "esp8266"
2020-10-17 11:21:40 -07:00
e79eb1174d BREAKING: Change return EEPROM.end() to bool (#7630) 2020-10-15 15:03:28 -07:00
81a10a48af BREAKING: Change return type of channel() (#7656) 2020-10-15 14:48:00 -07:00
0452f4728f BREAKING: Change return type of RSSI() (#7657) 2020-10-15 14:00:30 -07:00
9003b02889 MDNS MultiInterface (#7636)
* MDNS MultiInterface
* Move strlcat & strlcpy to __cplusplus
* Add LwipIntfCB.cpp to Makefile
2020-10-15 10:39:55 -07:00
1c624dd76a BREAKING: Add Wrong Password wifi status case (#7652)
* Add Wrong Password wifi status case
* Add wrong password case for status return
* Add wrong password case for debug
* Add Wrong password case to interactive example
* Add case for wrong password to station doc
* Add case for wrong password to resumeFromShutdown
* Add wrong password case to wifi readme
* Update ESP8266WiFiGeneric.cpp
2020-10-15 09:52:17 -07:00
200e47fc7b Fix error when debug enabled but no port chosen (#7648)
When the debug level for the device includes SSL but the debug port is
chosen as "None," don't attempt to write debug messages.

Fixes #7638
2020-10-09 15:54:39 -07:00
bc2b13ae16 LEAmDNSv2: change a macro name to be independant from LEAmDNS1 (#7640) 2020-10-07 12:31:56 +02:00
4aeb0f5cca Use direct member initialization instead of ctr initialisation (#7558)
* Use direct member initialization instead of ctr initialisation

This removes a bit of code repetition.

* Add symbolic names for member initializers
2020-10-05 13:56:08 -07:00
85ba53a249 Remove stray axtls refs, deprecated compat funcs (#7626)
Remove the axTLS compatability functions from WiFiClient/ServerSecure,
device tests for axTLS, and any document refs to axTLS.
2020-10-02 21:39:36 -07:00
1e54cb25b0 Merge branch 'master' into redesign-wifi-multi 2020-10-02 18:14:28 +02:00
fceb390a1a Redesign ESP8266WiFiMulti.[cpp|h]
Fixed critical issues WiFiMulti library:
- WiFi scan timeout implemented to prevent endless connect loop
- Fallback implemented on WiFi connect failure to prevent endless loop
- Fast WiFi connection at startup
- Improved debug prints
- Doxygen added
- Code maturing
- Example update

Make functions not related to ESP8266WiFiMulti class static
Revert static functions startScan and printWiFiScan()
Use PolledTimeout.h to protect while loops
Move static functions beginning of the file
Add connect timeout to example
2020-10-02 17:37:32 +02:00
f542175009 httpclient: remove deprecated API (#7617) 2020-09-30 09:59:46 -07:00
37ef41ceb0 mdns: #ifndef/#define/#endif (#7615) 2020-09-30 11:03:59 +02:00
a3281fe2f3 LEA mDNS v2 (#7540)
* LEAmDNSv2
2020-09-25 11:12:39 +02:00
4a24d3cc16 FIX MIME-Type for txt-suffix (#7608)
correct mime is text/plain instead of .txt
2020-09-22 08:41:31 -07:00
3cbf3039bd FIX StaticRequestHandler crashes when cache_header is null and DEBUG_ESP_CORE is enabled (#7609) 2020-09-22 13:01:01 +02:00
32470fbfab Avoid #includes with a surrounding namespace (#7560)
untangle the namespace/double inclusions in webserver library.
This is a followup of the discussion in
https://github.com/esp8266/Arduino/pull/6946#discussion_r361582525
2020-09-17 15:35:27 +02:00
c883605bd5 EspSoftwareSerial 6.9.0: data/strings in flash alignment handling fix. Yielding during write() improvement. (#7604) 2020-09-17 11:11:39 +02:00
40eb5747e4 sntp: use one time source and fix unsynchronized sntp time stamp (#7595)
* sntp: use one time source and fix unsynchronized sntp time stamp
* show subsecond synchro between time() and gettimeofday()
2020-09-12 18:22:38 +02:00
8258db53da Fix error message typo (#7581)
Sorry, I know it's little.  But it eats at me...
2020-09-07 10:46:13 -07:00
88be34e2dc Update certs-from-mozilla.py (#7578)
* Update certs-from-mozilla.py

Check if ar exists, if not tell the user what to get to prevent issue #7300 also dynamically get certs instead of hardcoded row item https://github.com/esp8266/Arduino/pull/7573#issuecomment-686192353
changed comment for missing ar exception
updated path and check for openssl
2020-09-07 15:06:36 +02:00
bfecdb0e39 Update DigestAuthorization.ino (Simple example update) (#7579)
Simple example update to pass the method as a parameter to getDigestAuth(), so it is more easily used for POST.
Add setting the ransom seed to RANDOM_REG32 in setup() for better getCNonce() values.
2020-09-04 12:03:55 -07:00
e636a6587c Update certs-from-mozilla.py (#7573)
Looks like Mozilla changed the csv, certs are now at row 32
2020-09-02 19:53:54 -07:00
df01d19d29 Reduce codesize of setOutputPower (#7572)
The logic can be simplified by using integer logic without a functional
change. Reduces code size by 40% (78 bytes -> 46 bytes) and silences
a Warith-conversion warning.
2020-09-02 08:47:48 -07:00
ef92ab28e1 Merge branch 'master' into stdnothrow 2020-08-30 23:27:08 -04:00
be812d2a8d Netump Initial commit (#7527) 2020-08-30 13:07:52 -07:00
247d5f1218 Merge branch 'master' into stdnothrow 2020-08-30 12:39:55 -07:00
953dfd945f Avoid float-double-conversion (#7559)
Converting floats to doubles is very expensive on esp8266, so prefer
calculations or comparisons as float. This saves 10% (20 bytes) of the
String::parseFloat() code size and probably quite a bit of runtime
overhead.
2020-08-28 17:09:44 -04:00
59873908c4 Use direct member initialization instead of ctr initialisation (#7556)
This removes a bit of code repetition.
2020-08-28 10:23:05 -04:00
11f7d1766e remove (std::nothrow) where nullptr case is not handled
remove legacy new management
2020-08-24 09:51:58 +02:00
a16e1e5b8a fixes 2020-08-23 19:43:32 +02:00
385bfd7635 deleted: arduino_new/arduino_new.ino 2020-08-17 18:23:44 +02:00
6925982284 replace new by new (std::nothrow), remove arduino_new 2020-08-17 18:15:45 +02:00
777323709b webserver: add define WEBSERVER_HAS_HOOK when ::addHook() is present (#7515)
This allows conditional compilation for external libraries
2020-08-11 02:15:46 +02:00
9afb084159 Clean up minor warnings from LGTM.com (#7500)
* Clean up minor warnings from LGTM.com

LGTM (Semmie) is a tool, bought by GitHub last year, that conducts basic
linting tasks on code and HTML.

Clean up the warnings identified in the latest report:
https://lgtm.com/projects/g/esp8266/Arduino/?mode=list

No functionality should change, however this may fix some issues with
the perl utilities not exiting properly on a Ctrl-C from the command
line.

* Back out HTML changes and rerun boards.txt.py
2020-08-03 19:19:04 -07:00
a8e35a579c Add valgrind mocked test to CI (#7501)
Run valgrind on host mock example runs to catch more bugs in CI.  These
tests would have caught the problem in #7464 before users did.

Add a list of some randomly picked examples to run, and add an option to
run the loop exactly once in the host mock routine, so the test will
actually exit under valgrind.
2020-08-03 19:00:51 -07:00
d92e1edac8 Basic authentication with ESP8266httpUpdate (#7190)
Add ability to use basic access authentication with ESP8266httpUpdate
2020-07-30 08:55:29 -07:00