1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-18 12:24:04 +03:00

1785 Commits

Author SHA1 Message Date
Max Prokhorov
be3035c853
CI - clang-format-18 (#9225)
* Fix shell variable comparison without $CI present

+ '[' = true ']'
./tests/restyle.sh: line 16: [: =: unary operator expected

vs.

+ '[' '' = true ']'

* Update to clang-format-18

new opt to skip overly eager macro formatting
https://clang.llvm.org/docs/ClangFormatStyleOptions.html#skipmacrodefinitionbody

minor changes between 15 and 18 for ide examples

reference arduino-ide format is still stuck with 15, though
https://github.com/arduino/clang-static-binaries/releases

* Pin clang-format in CI recipe not the script itself

* style
2025-01-24 09:40:22 +03:00
Hasenradball
9e3ba26258
SD - examples/listfilesEnhanced (#9206)
* add new example for enhanced file listing

* adapt Pin

* adapt due to clanf format check in line 14

* Adapt further clang findings

* additional intention corrections

* last clang format issues corrected

* case-sensitive, eof line break
2024-11-20 19:32:38 +03:00
Max Prokhorov
ccea72823a
ESP8266WebServer - UriRegex runtime logic within assert() (#9185) 2024-08-01 03:46:51 +03:00
Max Prokhorov
07feacec46
Update certs.h (#9182)
* Update certs.h

not_valid_{after,before} -> not_valid_{after,before}_utc

https://cryptography.io/en/latest/x509/reference/#cryptography.x509.Certificate.not_valid_before
> This property is deprecated and will be removed in a future version. Please switch to the timezone-aware variant not_valid_before_utc().

* fixup! Update certs.h
2024-07-31 03:58:18 +03:00
Max Prokhorov
05f05d0dab
ESP8266HTTPClient - prefer trust anchors to fingerprinting in examples (#9181) 2024-07-31 02:00:47 +03:00
Earle F. Philhower, III
7e0d20e2b9
Update to SDFat upstream 2.2.2 (#9126)
* Update to SDFat upstream 2.2.2

Pull in reformatted/slightly refactored SDFat 2.2.2 upstream.

Very minor changes, simple testing on other architectures passed w/o
incident.

* Fix SdFat to build for ESP8266

2.2.2 removed a define from the configuration header which is needed to
compile on the ESP8266.  Restore the default values there previously.

* SDFat Debug tests not compatible, skip

---------

Co-authored-by: Max Prokhorov <prokhorov.max@outlook.com>
2024-06-20 00:32:06 +03:00
Earle F. Philhower, III
96ee7dfb8e
Add creation timestamp to LittleFS directories (#9127)
* Add creation timestamp to LittleFS directories

Partial fix #9120.  This is simple enough to include and does not increase
the amount of flash writes on file updates significantly (which a
modified-time 't' attribute would).

* Fix typo in debug message on error
2024-06-15 22:31:24 +03:00
Juraj Andrássy
f741521abc
LwipIntfDev - legacy Ethernet API methods moved to EthernetCompat (#9133) 2024-06-15 22:06:29 +03:00
Vic-Y
338b62577e
Fix spelling errors in WebServer source (#9146) 2024-06-15 21:55:27 +03:00
Matthias Hertel
754324e56e
Example WebServer WebServer.ino does not redirect when index.htm does not exist (#9142) 2024-06-15 21:32:27 +03:00
Ayush Sharma
9afeaf5694
Implemented support for filters and removable routes in ESP8266WebServer (#9152)
* feat: added filters and removeable routes

* Update Filters.ino

* fix: clang-format

* chore: updated docs

* chore: updated doc

* fix: use new implementation

* fix: filters.ino example

* fix: filters.ino

* fix: formatting

* fix: formatting (2)
2024-06-15 21:20:13 +03:00
David Refoua
75cd58f647
fix minor typo (#9111) 2024-03-27 22:58:51 +01:00
david gauchard
41ecd65c6a
Stream: +helpers to stream regular String (#9043)
This allows to use a String as a destination Stream by using a temporary with streaming helpers.
2024-03-25 00:35:19 +01:00
Holger Müller
877d44059e
Add url redirect (#8970)
* added getAvailableVersion(), moved _httpClientTimeout and _followRedirects to protected, added enum HTTPUpdateError

* auto numbering of HTTPUpdateError enum

* added getAvailableVersion(), debug output current current Sketch MD5

* Revert "added getAvailableVersion(), debug output current current Sketch MD5"

This reverts commit 60d2c7762e7fb1fed7fae37fa99be149e12f125c.

* Revert "auto numbering of HTTPUpdateError enum"

This reverts commit 61785b27da3f2d42f8f95316d78ce22e5b00103a.

* Revert "added getAvailableVersion(), moved _httpClientTimeout and _followRedirects to protected, added enum HTTPUpdateError"

This reverts commit cec84ed17ab149d3e48082293f9e2723246b7d0b.

* add redirect function

* enhanced redirect() by cache control and client stop

* updated redirect() comment

* replaced redirect() API calls in examples

* server.client().stop() not needed, redirect() does this
2024-03-24 23:52:28 +01:00
Holger Lembke
dc9abed8b9
ESP8266WiFiMulti - get number of APs in the list (#9082)
When having some more complex setups it might be helpful to know the number of APs already added to the list.
2024-03-18 00:04:44 +03:00
Max Prokhorov
2064d437a3
ESP8266WiFi - document event handler lifetime, add [[nodiscard]] (#9087)
* disallow not assigning wifieventhandler somewhere

* fix markdown syntax in rst

* mention lifetime in example and docs
2024-03-17 21:11:32 +03:00
Clemens Kirchgatterer
9217458353
Free memory for _currentArgs after request has been handled in WebServer. (#9077)
This can reduce permanent RAM consumption significantly, if the last request had lots of arguments, but it assumes, that we do not need the arguments after we have handled a request.
2024-02-11 12:27:18 +01:00
Max Prokhorov
d7d50ffc6f
Prefer Serial1 logging in examples (#9079) 2024-02-09 20:22:49 +03:00
Max Prokhorov
e6df345584
CI - clang-format-15 (#9085)
Stop CI from pulling LLVM repos and using GNUPG keyservers,
ubuntu-latest already has clang-format-{13,14,15}

Fixes long-standing issue with -style=file:...
2024-02-09 17:39:38 +03:00
Clemens Kirchgatterer
16e19181b9
ESP8266WebServer - fix possible memory leak in request argument handling (#9076)
* fix possible leak of _postArgs array in case of returning early from _parseForm().
* don't use _postArgs member, but instead use a new local variable postArgs instead.
* same for _postArgsLen member vs.local postArgsLen.
* remove useless NULL pointer check before delete().
* Remove _postArgs member from ESP8266WebServer.h
* Remove searching through always empty _postArgs array in ESP8266WebServer-impl.h
2024-02-09 17:28:14 +03:00
Adriano Cunha
b3b9276bf9
Avoid NPE and "multi-deinitialization" of ArduinoOTA (#9058)
Avoid a null pointer exception when ArduinoOTA.end() is called more than once and thus the UDP socket is already freed.

Also avoid unnecessary teardown if the class is not initialized yet (for example, begin() wasn't called yet, or end() is called multiple times).
2024-01-18 23:26:18 +03:00
david gauchard
d5eb265f78
WiFi config(): warning for legacy idioms (#9050) 2023-12-12 00:57:57 +01:00
Juraj Andrássy
cb9734c97d
WiFi.h as alias to ESP8266WiFi.h (#9044) 2023-12-08 10:50:54 +01:00
David Buchmann
089fe8fca7
use uriglob to catch all android captive portal requests (#9041) 2023-12-04 16:01:57 +01:00
Juraj Andrássy
9e73cf0021
LwipIntfDev - config static IP auto gw,mask,dns as in Arduino libraries (#9040)
for 'modern' Ethernet libraries W5100lwIP, W5500lwIP and ENC28J60lwIP
used without EthernetCompat
2023-12-01 10:36:35 +01:00
Juraj Andrássy
9a4e17876e
WiFi - static IP auto gw,mask,dns as in Arduino libraries (#9031) 2023-11-24 10:10:27 +01:00
Juraj Andrássy
5e0ed3a38b
Revert "WiFiSTA - allow using DHCP again after disconnecting static IP (#9020)" (#9028)
This reverts commit 0c599ee0dcdd9b04f4f3082697992fe79b1e9ac6.
2023-11-13 00:26:16 +01:00
Juraj Andrássy
ee953737dd
WiFiServer - allow constructor without parameters (#9026) 2023-11-13 00:10:26 +01:00
Juraj Andrássy
7fc2caa72f
WiFiSTA - method setDNS as in WiFi libraries by Arduino (#9021)
https://www.arduino.cc/reference/en/libraries/wifi/wifi.setdns/
2023-11-10 15:30:31 +01:00
Juraj Andrássy
5bd52d4f86
EthernetCompat - static IP auto gw,mask,dns as in Arduino libraries (#9024) 2023-11-10 15:00:56 +01:00
Juraj Andrássy
0c599ee0dc
WiFiSTA - allow using DHCP again after disconnecting static IP (#9020) 2023-11-10 10:54:17 +01:00
Holger Müller
fb8d6d668d
ESP8266HTTPUpdate: Get available firmware version from update server (#8968)
* added getAvailableVersion(), moved _httpClientTimeout and _followRedirects to protected, added enum HTTPUpdateError

* auto numbering of HTTPUpdateError enum

* added getAvailableVersion(), debug output current current Sketch MD5

* updated advanced updater php script

* switch case indention corrected

* Revert "added getAvailableVersion(), debug output current current Sketch MD5"

This reverts commit 60d2c7762e7fb1fed7fae37fa99be149e12f125c.

* Revert "auto numbering of HTTPUpdateError enum"

This reverts commit 61785b27da3f2d42f8f95316d78ce22e5b00103a.

* Revert "added getAvailableVersion(), moved _httpClientTimeout and _followRedirects to protected, added enum HTTPUpdateError"

This reverts commit cec84ed17ab149d3e48082293f9e2723246b7d0b.

* corrected incorrect merge with master
2023-11-05 00:01:49 +01:00
Juraj Andrássy
30c6df4639
WiFiServer - operator bool() and method end() (#8995) 2023-11-04 23:39:46 +01:00
Juraj Andrássy
497dacc78f
WiFi.BSSID and scan result BSSID with parameter as other WiFi libraries (#9008) 2023-11-04 23:29:06 +01:00
M Hightower
a348833a81
A new approach for erasing WiFi Settings (#8828)
* A new approach for erasing WiFi Settings

Add support for hardware reset function call - simulates EXT_RST via HWDT.

Add reset selection to `ESP.eraseConfig()` for calling hardware reset
after erasing the WiFi Settings.

Update ArduinoOTA to use `ESP.eraseConfig(true)`

Externalized `ArduinoOTA.eraseConfigAndReset()`

Add OTA examples to illustrate using erase config changes.

* style
fixed confused example

* improve wording

* Add new state to retry eraseConfigAndReset

* Removed unreachable error test from examples.

Removed continuous retry of "eraseConfig" and allow the script to
assign an error handling option for "eraseConfig" failure.

Update example to use error handling option.

* In eboot for function ets_wdt_enable() added missing arguments

* Update comments and example

* Wording

* Rebuilt eboot.elf with current tools from ./get.py

* Requested changes.

* cleanup comments

* Update hardware_reset

Avoid using "[[noreturn]]" - not accepted for a .c file function
Updated to use __attribute__((noreturn)) to handle both .cpp and .c
file functions.
2023-08-29 17:24:07 +02:00
Luciano Martorella
1a4663fbe8
Add virtual beginMulticast(...) stub to UDP class (#8969)
* - Same UDP API of ESP32 core

* - PR review
2023-08-15 19:25:58 +03:00
reyfel
f2da54d3a2
Add softAPbroadcastIP (#8963) 2023-07-27 00:52:59 +02:00
Ahmed El-Sharnoby
90c4e3afc1
Change host from tls.mbed.org to api.my-ip.io (#8931)
https://tls.mbed.org/ host does not support MFLN and Also Redirects the Client.
https://api.my-ip.io/ip is a better alternative, supporting MFLN and allowing the user to get a simple text with a useful information.
2023-07-24 01:32:06 +02:00
supersjellie
8b33e2e250
Fix for occasional WebServer timeout issues (#8944)
Fixes #8941
2023-06-14 08:22:27 -07:00
Suwatchai K
e05656bd78
Add support WiFiClientSecure TCP KeepAlive (#8940)
* Add support WiFiClientSecure TCP KeepAlive
* Make TCP keepalive and related functions virtual.
* Make TCP keepalive and related functions override.

Fixes #8939
2023-06-11 11:11:38 -07:00
ilmanowar
ad9aaef8c8
Fix removing first certificate in certs-from-mozilla.py (#8907)
.pem list has no headers, that operation removes a real certificate.
2023-04-22 17:33:27 +03:00
Dirk O. Kaar
c3f36316bf
EspSoftwareSerial 8.0.2: possibly uninitialized inverted mode flag fix (#8911) 2023-04-22 16:57:12 +03:00
david gauchard
97018a5bbf
various minor web fixes (#8885)
* httpclient: use refs - httpserver: add chunks in examples

* basic https client: update cert

* debug log: read() returning -1 is usual and means "nothing to read"

* emulation on host: SSL server has never been and is now working

* style

* move SSL server certs from examples into a single place with appropriate warnings

* web-hello-servers: make chunks bigger

* factorize template declaration

* http-client: add getString(pre-reservation)

* mock: add umm_info()

* style

* comment API in example

* style

* fix per review
2023-03-30 19:39:35 +02:00
M Hightower
d3c102e717
Update documentation and arduino debug options (#8837)
* Update documentation

Describe how to improve Exception Decoder results.

Updated build option details.

* Added d-a-v's code. And updated description and debug macro.

* Update doc

Updated platform.txt - positioned -Os such that it can be overridden by `build.opt`.

Add suggestion of using `-Og` which may improve the Decoder's line number correlation
with the problem in the source code.

Untested adjustments to platformio-build.py

* Fixed code formatting

* Fixed example

Previously `-O3` in the example had no effect. It was overridden by later flags.
Reording the `-Os` allowed changing optimization to  work. Somehow this triggered
a new warning "Stream.h:50:7: warning: 'f.Stream::_startMillis' may be used
uninitialized in this function". Replaced `-O3` with `-Og`.

* Proposed "Debug port" menu change
Preserves a pathway for `build.opt` override.

* Update boards.txt.py and docs - WIP

* Improve organization of optimization content.
Use "Debug Optimization" for menu name.
The menu item defines the initial optimization.
platform.txt - optimization parameter can be overridden by build.opt.

* Add fallback value for build.debug_optim to platform.txt

* update text and undo changes to platformio-build.py

* tweak text

* Added ':orphan:' mark to a06-global-build-options.rst

* Update doc. Added link in page index to 'Improving Exception Decoder Results'

* Update text to reference PR#8868 improvements for leaf function.
2023-03-29 11:16:33 +02:00
david gauchard
a5d31a7187
deprecate and update Stream::send*(Print -> Stream) (#8874)
* deprecate and update Stream::send(Print -> Stream) in order to benefit from and use output's timeout value
2023-03-28 11:21:05 +02:00
david gauchard
210897ef83
Release 3.1.2 (#8893)
* release 3.1.2
2023-03-20 23:14:05 +01:00
Dirk O. Kaar
23036328a5
EspSoftwareSerial 8.0.1: onReceive bug fix and new namespace (#8869)
* Upcoming EspSoftwareSerial 7.0.1

* EspSoftwareSerial example: higher bitrates due to forcing half-duplex

* Adapt to SoftwareSerial's latest use of namespace.

* In EspSoftwareSerial, some renaming after review feedback.

* EspSoftwareSerial's use of a template class in order to permit users their own GPIO capabilities definitions.

* CI caught some warning.

* Stick to non-namespace EspSoftwareSerial class name for the moment.

* Delegate operator() is now nullptr-safe, good for use in ISRs.

* Pushed EspSoftwareSerial 8.0.1: Platformio picks up versions that aren't published in Github
2023-03-11 18:02:04 +03:00
david gauchard
32323e55b5
fix library name in library.properties (#8880) 2023-03-06 16:03:45 +01:00
david gauchard
74e02d1a6f
basichttpsclient example: fingerprint handled by update scripts (#8311)
* basichttpsclient example: fingerprint handled by update scripts
2023-03-06 15:05:36 +01:00
david gauchard
d7cd4bef6c
make http-server less verbose in debug mode (#8850)
* make http-server less verbose in debug mode
2023-02-05 18:17:28 +01:00