1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-22 21:23:07 +03:00

3610 Commits

Author SHA1 Message Date
david gauchard
4f27ce16b3
Fix TCP send to IPv6 link local addresses (#7207)
credit: Simon Arlott @nomis - similar to #6541 for TCP (#7207)
2020-04-11 12:46:07 +02:00
Simon Arlott
ee619d367f
Fix UDP send to IPv6 link local addresses (#6541)
lwIP's tcp/udp_connect() and tcp/udp_bind() functions automatically
set the zone if it is required but missing, but udp_connect() is not
used so this doesn't happen.

Explicitly set the zone to the default network interface if it is
required for the type of address being used. Otherwise there is no
zone set and packets to a link local destination don't go anywhere.
2020-04-11 12:05:23 +02:00
Dirk O. Kaar
5511180cd1
EspSoftwareSerial release 6.8.1 (#7205)
- Updates to latest Delegate class.
- Minor update to example code.
2020-04-10 10:54:21 -07:00
Luigi Rodorigo
41d271d972
Fix for MD5 leak bug, issue #7195 (#7197)
Co-authored-by: Luiss <luiss@mind.cc>
Co-authored-by: david gauchard <gauchard@laas.fr>
Co-authored-by: Develo <deveyes@gmail.com>
Co-authored-by: Earle F. Philhower, III <earlephilhower@yahoo.com>
2020-04-09 10:36:57 -07:00
david gauchard
1a9988ecf1
fix memleak (#7203) 2020-04-09 09:59:12 -07:00
Heiko Krupp
fad056442d
Make DNS resolution order selectable during runtime or compile time (#6865)
* Make DNS resolution order selectable during runtime or compile time (only in dual stack mode).

* Extend IPv6 example to show usage of new hostByName function with selectable resolving order

* Fix function definition of fqdn_rt in IPv6.ino.

* Fix function call.

* Fix missing bracket...

* Only run if built with dual stack support

* Make DNS resolution order selectable during runtime or compile time (only in dual stack mode).

* Extend IPv6 example to show usage of new hostByName function with selectable resolving order

* Fix function definition of fqdn_rt in IPv6 example.

* Implement enum class for resolve type

* Fix example IPv6.ino

* Fix typedef in ESP8266WiFiGeneric.h function call

* Change enum class definition to not depend on lwip/dns.h

* Move err_t err definition outside switch. Fix typecast.

* Always define DNSResolveType as pio test otherwise failes even if the enum class isn't used.

Co-authored-by: altelch <heiko.krupp@rhrk.uni-kl.de>
Co-authored-by: david gauchard <gauchard@laas.fr>
2020-04-09 18:17:54 +02:00
david gauchard
bc170e6d63
WiFi: ARP gratuitous API for wifi station mode (#6889)
* wifi: ARP gratuitous API for wifi station mode

* fix with lwip1

* update comment

* update API to allow changing interval on the fly

* update API

* remove debug lines

* mock lwIP's etharp_request()

* unsigned interval

* use scheduled ticker

* ticker: +attach_ms_scheduled_accurate
ticker: +comment
gratuitous: use attach_ms_scheduled_accurate

* move to experimental namespace

* fix for lwIP-v1.4

* attempt to make pio happy

* use directly ETSTimer instead of Ticker
2020-04-09 16:19:15 +02:00
david gauchard
d600cc7fa6
Expose webserver's chunk api (#7134)
* expose hidden WebServer's chunked API
2020-04-06 20:49:34 -04:00
s-hadinger
3db610f6d0
Ability to define -DFP_IN_IROM when generating ld script (#7188)
Co-authored-by: Stephan Hadinger <stephan.hadinger@gmail.com>
Co-authored-by: david gauchard <gauchard@laas.fr>
2020-04-06 13:54:19 -07:00
StanJ
c548958f6e
Tone limit 20KHz (#7179)
Set Tone maximum frequency to 20KHz (was 5KHz)
2020-04-04 09:47:54 -07:00
s-hadinger
483bfde885
Move floating point from libgcc out of IRAM (#7180) 2020-04-03 10:05:28 +02:00
david gauchard
a04c3244d5
esp8285: properly initialize free gpio as input (#7165) 2020-03-27 11:39:12 +01:00
Takayuki 'January June' Suwa
631f66bd08
Attribute __real_system_restart_local() as (noreturn) (#7167)
* Attribute `__real_system_restart_local()` as `(noreturn)`
* As well as `abort()`.
* Aggragate two decls into `coredecls.h`.
2020-03-26 22:28:09 +01:00
Valerii Koval
726df6967c
Switch espressif8266 platform to development branch in PlatformIO build (#7170) 2020-03-26 18:20:43 +02:00
Patryk (PsychoX) Ludwikowski
d91f1dac36
Better follow redirection for HTTPClient (#7157)
* Add way to force follow redirections in `HTTPClient`

* Follow other client implementations about `HTTP_CODE_FOUND`; Small rewrite of `sendRequest` function of `HTTPClient`

* Better names for follow redirection modes in `HTTPClient`

Also changed a bit order of the enums (0 element to be DISABLED)

* Rewrite `sendRequest` to remove recursion

Also got rid of unnecessary `redirectCount` field. Now redirect counting and limiting is handled in `sendRequest` directly.

* Use new `setFollowRedirects` of `HTTPClient` instead deprecated one.

* More explanatory comment for `followRedirects_t` in HTTPClient
2020-03-25 23:33:54 +01:00
Earle F. Philhower, III
1127a090ad
Add 2MB obtion to 8285 generic board (#7163)
The ESP8285H16 is reported to have 2MB of flash, so add an option the
the Generic 8285 board for 2MB.

Fixes #7161
2020-03-22 22:38:38 +01:00
Clemens Kirchgatterer
e64cb619f7
Pull GPIO initialization into its own 'weak' function. (#7044)
* Pull GPIO initialization into its own 'weak' function.

By pulling GPIO init into its own weak function, it can be overridden by the user. This is important in cases when GPIOs should not toggle during reboot, exceptions or other crashes. Fixes #7041.

* Add prototype for resetPins()
2020-03-22 13:16:39 +01:00
Earle F. Philhower, III
db75d2c448
Abort if BearSSL stack allocation fails (#7152)
As found by @d-a-v, if the malloc() used to get the BearSSL stack does
not succeed, abort() immediately.
2020-03-15 11:56:23 -07:00
Earle F. Philhower, III
e252873263
Use 2nd stack for update signature verification (#7149)
* Use 2nd stack for update signature verification

Fixes #7145

When doing a signed update, the signature calculation can use a lot of
stack, so move it silently to the BearSSL second stack.

Also fix a memory leak of signature-bytes found by @JiriBilek

* Reset state on any error condition in Updater::end
2020-03-14 16:10:40 -07:00
david gauchard
afb9921d38
avoid printing nullptr string (#7144) 2020-03-14 11:34:04 -03:00
Ivan Kravets
845241b72c
Fix RST links for PlatformIO (#7143)
* Fix RST links

* Update links to PlatformIO
2020-03-09 17:08:07 +02:00
Ivan Kravets
01a4d292e1
Installation guide for PlatformIO (#7142) 2020-03-09 15:51:32 +02:00
Dirk O. Kaar
252240326f
EspSoftwareSerial 6.8.0 adds ESP8285 support (#7139)
* EspSoftwareSerial: Use compile-time flash pin deduction, enables ESP8285.

* EspSoftwareSerial release 6.8.0 for ESP8285 support.
2020-03-08 10:20:53 -07:00
david gauchard
372a3ec297
EspSoftwareSerial release 6.7.2 fixes warnings with gcc 9.2 (#7133)
* MultiDelegate breaking change and improvements.

The event-multiplexer specialization no longer removes items based on invoke return value.
This is mitigated by new iterators and erase(iterator). Check the documentation comments for
details.

* MultiDelegate: constness on return type warning fix.

* EspSoftwareSerial: Conform to C++ 17 and later.

* EspSoftwareSerial: Resolve g++ 9's c++17 deprecation warnings.

* EspSoftwareSerial, Delegate.h: gcc 9.2 is very strict about template inheritance of ctor and assignment operators, needing a lot

of code duplication, this commit provides that.

* Delegate.h, fix both ambiguous operator= and infinite ctor recursion.

* EspSoftwareSerial release 6.7.2
2020-03-05 12:24:27 +01:00
david gauchard
b8e4ca48a4
udp: fix again pbuf management (#7132)
* udp: fix again pbuf management
* Process rx buffer size, cache it, because _rx_buf->tot_len is *not* the total size
2020-03-04 21:40:50 +01:00
Martijn Scheepers
b64e8da2e2
Set a value for SSDP notify interval (#7110)
* Set a value for SSDP notify interval, default to 1200 seconds.

* Changed uint8_t to uint32_t

Co-authored-by: david gauchard <gauchard@laas.fr>
2020-03-03 19:00:38 -03:00
david gauchard
e39cbe6328
rebuild lwip2 1.2-30 (#7131) 2020-03-03 21:58:57 +01:00
david gauchard
c61b70de86
unblobbing commit 2c435b1f42 (commitcomment-37529995) (#7121) 2020-02-28 00:30:36 -03:00
david gauchard
2c435b1f42
lwip2 update: stop dhcp when interface goes down (#7114) 2020-02-27 08:21:33 +01:00
schirmilabs
0554d39c6c
Add support for my new board eduino wifi (#6554)
* ^#

* Fix merge conflict

* Fix merge conflict

Co-authored-by: Earle F. Philhower, III <earlephilhower@yahoo.com>
2020-02-26 08:15:57 -08:00
david gauchard
abdd2bdbb6
simple TZ api: bypass sprintf/sscanf: + 7KB (#7109)
* simple TZ api: bypass sprintf/sscanf: + 7KB
2020-02-25 11:16:10 +01:00
LaborEtArs
4b2bf45933
Additions to UdpContext needed for LEAmDNS2 (#7048)
* Addition to UdpContext needed for LEAmDNS2
2020-02-24 14:56:00 +01:00
david gauchard
2d58be744b
TCP: fixes backlog limit handling, and allows ephemeral TCP connections (#7096)
* fix backlog limit handling, and allow ephemeral TCP connections
* do not retain empty connections
2020-02-24 07:16:55 +01:00
Develo
2b640c0189
Add flash helper constructor to Uri (#7105)
* Update Uri.h

* Add a simple test for the new constructor

Convert a c-str to a FPSTR in the example to have a section
of code in our CI that will catch any future breaks of this specific
kind.

Co-authored-by: Earle F. Philhower, III <earlephilhower@yahoo.com>
2020-02-23 11:29:47 -08:00
JasperHorn
d990ff9547
Improve LittleFS support (#7071)
Previously, when the path was a directory, but didn't have a slash at
the end, a 0 byte response would be sent when using LittleFS. Now, it
will return a 404, like was always the case when using SPIFFS.
2020-02-23 09:38:40 +01:00
Tim Stableford
16319da63d
Resolved issue #3359 (#6969)
* Resolved issue #3359

Made severing connections optional as per the patch
in the issue.
Also fixed a minor spacing issue.

* Renamed sever to close and added information to readme

Also my editor automatically removed some odd whitespace at the
end of a few lines.
2020-02-22 16:30:17 -08:00
Earle F. Philhower, III
bea64dfa69
Add fileCreation/getCreation create-time accessors (#7000)
* Add fileCreation/getCreation create-time accessors

For SDFS and LittleFS, enable a creation time accessor for files and Dir
iterators, similar to the existing fileTime/getLastWrite calls.

Remove spurious Dir::getLastWrite method (the proper and only documented
way is really Dir::fileTime).

Update json to point to new mklittlefs which copies the creation date of
files to the image.

Fixes #6992

* Remove malloc(), use stack vars for temp names

LFS filenames are limited in size and generally very small.  Use a stack
variable instead of a dynamic allocation when performing full-path
computations.

* Replace "Creation" w/"CreationTime" in FS accessor

Per review, `getCreation` -> `getCreationTime`, `fileCreation` ->
`fileCreationTime`.

The names `fileTime()` and `getLastWrite()` are inherited from ESP32
implementation and unchanged.

* Add creation time to listfiles SD example

* Enable SdFat's sateTime callback for timestamping

SdFat requries the dateTimeCallback call (global for everything) to
update dates and times on created files.

Because the callback signature doesn't have space for us to provide
any parameters, we cannot get the the File, Dir, or FS object's
dateTimeCB member.  Instead, just go with `time(null)` as the callback
function which is right in all but the most esoteric cases.

* Correct DOS year/month offset in dateTime callback

* Fix docs to match new xxxCreationTime() API names

Co-authored-by: Develo <deveyes@gmail.com>
2020-02-22 12:49:08 -08:00
Bob
4eca62cb53
Add Uri with support for regexUri and globUri (#6696)
* Add path args

* Add example

* Update code format

* Add missing include

* Fix codestyle and unsigned int

* fix unsigned int

* Remove tabs

* use vector<>.resize

* rename j to requestUriIndex

* using assert checking the path argument index

* Add missing include "assert.h"

* The order no longer matters.
Path arguments may not contain the value '/'
Updated the example

* make pathArg return a const

* Update PathArgServer.ino

fix trailing space

* const String&

* Add regex support

* Fix to match templating

* Add Uri with support for staticUri, regexUri and globUri

* Update example

* Add deconstructor to remove _uri pointer

* Add newline to end of files

* Suppress gcc warnings (unused params)

* Replace regex with regex.h

* Use the standard STASSID/PSK settings for example

Make the example match the existing examples which allow setting
the SSID/PSK in the local platform.txt file.

* Use 115.2Kbaud for example, match others

Co-authored-by: david gauchard <gauchard@laas.fr>
Co-authored-by: Earle F. Philhower, III <earlephilhower@yahoo.com>
2020-02-22 16:51:47 -03:00
Earle F. Philhower, III
a40663b65f
Update to latest BearSSL (#7098)
Minor changes which should not affect us, but keeping in sync with
upstream nevertheless.
2020-02-22 12:42:46 +01:00
david gauchard
f69e404c87
SNTP: backport espressif sntp api for lwip2 (#7097) 2020-02-22 11:55:01 +01:00
Szabolcs Székelyi
e6decacd0a
Fix/enable UDP packet reassembly (#7036)
* Fix/enable UDP packet reassembly

UdpContext didn't care about pbuf chaining when receiving datagrams, leading
to fragments delivered to the application as individual packets.

* Provide pbuf_get_contiguous for backwards compatibility with LwIP 1.4

Implementation copied verbatim from LwIP 2.1.2

* Cosmetic changes to meet coding style

Co-authored-by: david gauchard <gauchard@laas.fr>
Co-authored-by: Develo <deveyes@gmail.com>
2020-02-22 07:38:14 +01:00
david gauchard
cd56dc0901
restore dtostrf when floats are disabled in printf/scanf + round fix (#7093)
* restore dtostrf+fix when float printing is disabled at link time

* fix include file

* fix with proposal per review

* always use dtostrf
2020-02-21 22:34:09 -03:00
Earle F. Philhower, III
0a58172c6a
Merge pull request #6804 from dok-net/optimistic_yield_recurrency
Fix optimistic_yield to not yield on each call after x µs
2020-02-20 14:11:45 -08:00
Earle F. Philhower, III
5100beec2c
Merge branch 'master' into optimistic_yield_recurrency 2020-02-20 12:30:05 -08:00
Dirk O. Kaar
afe40211ef Corrections after review remarks; thanks @earlephilhower 2020-02-20 19:41:08 +01:00
david gauchard
f066ed2495
configTime(tzsec,dstsec,): fix UTC/local management (#6993)
* configTime(tzsec,dstsec,): fix UTC/local management
This PR also remove dead code since probably newlib updates
The NTP-TZ-DST example is also updated
* restore sntp_set_timezone_in_seconds()
fixes #6678
* +configTzTime()
2020-02-18 16:39:38 +01:00
david gauchard
e752e96e9f
lwip2 updates: no more git sub-sub-module deps, faster checksum, backlog limitation and other fixes (#6887)
* upstream lwIP is now downloaded by a makefile, not subsubmoduled

* lwip2: upstream lwIP not sub-sub-modules anymore
lwip2: Allow IPv4 and IPv6 DNS and SNTP server configured via DHCP to co-exist (patch against upstream)

* lwip2: enable tcp-listen-with-backlog feature

* lwip2 submodule update:
- enable more efficient chksum algorithm thanks to Richard Allen
- enable tcp listener with backlog

* more comments, fix backlog management, fix API
* move default value definition in .cpp
because one must not believe it can be redefined before including WiFiServer.h

* improved backlog handling, it is no more a breaking change
2020-02-18 06:54:50 +01:00
david gauchard
bc4f000c48
package builder: updates for alpha releases (#7088)
allow versions 0.0.* to be special
2020-02-17 17:40:50 +01:00
Earle F. Philhower, III
321d256c8b
Merge pull request #7085 from mhightower83/pr-bear-stack-dump
Corrected stack start and end in stack_thunk_dump_stack().
2020-02-16 09:17:39 -08:00
M Hightower
c07a1fd1b7 Corrected stack start and end in stack_thunk_dump_stack(). 2020-02-14 11:05:04 -08:00