1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-25 20:02:37 +03:00

1772 Commits

Author SHA1 Message Date
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
Max Prokhorov
badb407bbb
Update SdFat fork (#8844)
SdFat 2.0.2+ doesn't call yield(), make sure we don't trigger SWDT

fix #8822
2023-02-02 18:21:11 -08:00
GrzegorzWo
1beca6f4da
Fix LowPowerDemo.ino (#8841)
CRC checking of data read from RTC was always true
2023-02-01 18:31:20 +03:00
Max Prokhorov
6dfebec8c5
SdFat -> FS HAL mode fixes & test (#8833)
* re-use SdFat access mode through static const, no need to hard-code our own value w/ cast in the macro
* separate read-modes from flags; read, write and rw are distinct numbers
* simple compile-time tests in .cpp

resolve #8831
2023-01-31 22:28:37 +03:00
david gauchard
d7da591ed8
Revert ESPSoftwareSerial from v7 to v6
7.0.0 includes a breaking change to onReceive callback
https://github.com/plerup/espsoftwareserial/releases/tag/7.0.0
2023-01-30 18:23:57 +03:00
Max Prokhorov
e25f9e9578
Safeguard for Ticker internal storage that may be changed during callback execution (#8820)
Temporarily move callback into the function scope and execute it from there.
Detaching would no longer destroy it, and re-scheduling would no longer be almost immediately cancelled by our code.
2023-01-26 15:50:14 +03:00
koliwbr
bed2fa339d
HTTPClient example: Fix typo (#8819)
fix from [HTTP} to [HTTP]
2023-01-20 15:47:42 +01:00
Max Prokhorov
0e5d358c3c
Version 3.1.1 (#8806) 2023-01-15 02:01:02 +03:00
david gauchard
39080e317e
delay / esp_delay: transparently manage recurrent scheduled functions (#8802)
Recurrent scheduled functions will always be running in background.

esp_delay()'s interval (intvl_ms) is internally kept to its highest value allowing to honor recurrent scheduled functions requirements.

It transparently allows to keep with the arduino and nonos-sdk trivial programming way and still use background services or drivers running regularly.
2023-01-14 22:25:57 +01:00
Earle F. Philhower, III
c8dcdede34
Remove 400b stack allocation from AdvWeb example (#8793)
The AdvancedWebServer.ino example allocated a 400 byte char array on the
stack which, in the case of the example, will work but in general is a
dangerous thing to show new users to try.

Instead, use a StreamString to generate the string on the heap.
2023-01-07 10:01:56 -08:00
david gauchard
8ae300d476
release 3.1.0 (#8788) 2023-01-06 22:06:06 +01:00
Max Prokhorov
f06710eb6e
hostByName timeout fixes (#8787)
* single impl
2023-01-05 14:29:14 +01:00
piotrcurious
3e357f32b1
Allow passing beacon interval to SoftAP config (#8695)
allow passing beacon_interval to the softAP
2023-01-05 09:54:05 +01:00
BackLogers
3f394616a6
Passing custom HTTPClient to HTTPUpdate (#8773)
This enables passing additional headers to HTTP query.
Based on ESP32 HTTPUpdate functionalities.
2023-01-05 09:38:12 +01:00