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

13 Commits

Author SHA1 Message Date
david gauchard
ffe5476fc4 time: import IANA timezone definitions, expose SNTP API (#6373)
* time: import IANA timezone definitions
- `configTime("timezone", "ntp servers...")` added
- timezone definitions by country/cities (TZ.h)
- script to update timezone definitions
- updated example

* fix former configTime non-matching signature

* +include

* example: add scheduled function in callback

* crlf fix

* +missing license for napt

* SNTP: expose configuration helpers

* update submodule

* update precompiled libraries

* optional: change SNTP startup delay

* makes SNTP_UPDATE_DELAY a weak function
update example
fix for lwip1.4

* on the proper use of polledTimeout api... thanks @mcspr :]

* improve update script (per review)

* update lwIP submodule

* update submodule

* hide harmless shell message

* update the release process by asking first to update TZ.h
[ci skip]

* minor update in release documentation

* update in release documentation

* update in release documentation

* clarify release documentation

* fix release documentation - sorry for the noise :(

* fixes per review

* example style

* useless variable in example

* update lwip2 submodule reference, to include espressif missing declaration fixes
2019-09-29 00:25:01 -03:00
david gauchard
06f1865628
new network feature: NAPT (widely known as NAT) (#6360)
* lwIP: napt patches (enabled with lwip2 w/o IPv6 w/ features)
2019-08-28 17:51:14 +02:00
Earle F. Philhower, III
ac25f3276f
Upgrade to 2.5.0-4 toolchain w/improved pgm_read_x, C++ exceptions (#6273)
* Upgrade to 2.5.0-4 toolchain w/improved pgm_read_x

Rebuild the entire toolchain (including standard libraries) with the
latest pgm_read_xxx headers included (which fix unaligned dword reads
from progmem and run faster/smaller, and a pgm_read_byte change which
removes an instruction on each read saving flash).

Pull in latest bearssl while we're at it, too, which speeds up EC
handshakes and reduced ROM usage, too.

* Fix C++ exceptions

Exception code now only does 32b aligned reads from progmem to access
the eh_table (some via -mforce-l32, some via hand-inserted pgm_read_x
macros).

Fixes #6151
Fixes #6305
Fixes #6198
2019-07-21 10:46:29 -07:00
david gauchard
96cfdb3ec7
reenable ARP queuing in lwIP2 by courtesy of @aboulfad (#5978)
https://github.com/esp8266/Arduino/issues/3481#issuecomment-482293996
https://github.com/d-a-v/esp82xx-nonos-linklayer/pull/33
it was removed by error on 9 oct 2018 a1e59e9c01 (diff-8a46852651388faec204ec21c86b8098L586)
2019-04-12 12:14:02 +02:00
david gauchard
a1796f455a
lwIP-v2: new patch to randomize tcp source ports (#5906)
ref: d-a-v/esp82xx-nonos-linklayer#31
origin: #5902
me-no-dev/ESPAsyncTCP#108

Following the links above is instructive.
To summarize:

    * currently and from a long time lwIP tcp client connections always uses the same tcp source port number right after boot
    * this port number is increased everytime a new one is needed (= new tcp client connection)
      (to be noted, linux has the same increasing behavior)
    * when connecting to the same server (right after boot), the triplet (esp-ip-address, source port, destination port) are the same, and may hit remote server list of sockets in time-wait-state (previous connection unproperly closed from the same esp). Consequently the new connection fails when it happens.
    * this is happening only when debugging (esp reboots often, in less time than time-wait expiration), so the nasty effect is amplified especially when bugs are being chased
    * efforts had been done when espressif's lwIP implementation wasn't open source, with WiFiClient::setLocalPortStart() #632 but it must be explicitely called with a different random number at every reboot. Efficient but not ideal.

This PR uses espressif firmware's r_rand() everytime a new local source port is needed. A different source port number is now showed by tcpdump right after boot. Source port range and duplication is verified everytime in lwIP's src/core/tcp.c:tcp_new_port(). It is implemented as a local patch for upstream lwIP so it is valid not only with WiFiClient but also with @me-no-dev's Async libraries (they don't use WiFiClient).

WiFiClient::setLocalPortStart() is still usable with the same effects as before.
2019-04-05 17:26:51 +02:00
david gauchard
5f68e61b26
lwip2: ipv6: fix udp_new() #5744 (#5752)
From: @oddstr13
(https://github.com/d-a-v/esp82xx-nonos-linklayer/pull/28)

Initialize pcb->local_ip.type depending on whether we have IPv4, IPv4+IPv6 or IPv6 networking stack.

Fixes esp8266/Arduino#5744
Closes esp8266/Arduino#5745
2019-02-11 11:03:09 +01:00
david gauchard
7d512c4c7c
IPv6: DHCP6 & NTP fix (lwIP fix from David J. Fiddes D.J@fiddes.net) (#5649)
* +dhcp6_set_ntp_servers (lwIP patch from David J. Fiddes D.J@fiddes.net)
2019-01-30 09:33:22 +01:00
david gauchard
7ee503d353
lwip2: dhcp-server addon from @SmartBlug #5594 (#5613) 2019-01-16 01:26:20 +01:00
david gauchard
b26c19e82e lwip2 fixes: turn off random delay before sntp request (#5567)
+update dhcp6 patch: update ip_addr_set_zero_ip6 to use IP_SET_TYPE_VAL, avoiding compilation warning
2018-12-29 18:40:39 -03:00
david gauchard
95a5c5e60a let lwIP route packets, do not let SDK teaching how to do so (#5526) 2018-12-21 19:38:22 -03:00
david gauchard
0db6ec4ba8 lwip2: 3 sntp servers, autoip (169.254), esp-ping, espconn (#5444)
* lwip2: better handling of ipv4_addr/t type + 3 sntp servers

* bump lwip2 version

* Only with FEATURES=1: 3 sntp servers and AutoIP enabled (169.254 when dhcp server fails)

* Only with FEATURES=1: 3 sntp servers and AutoIP enabled (169.254 when dhcp server fails)

* local CI runner: select build type

* new ipv4_addr/t definition makes things easier for IPAddress

* update local CI runner

* lwip2 changes

* lwip2: port esp-ping and espconn
2018-12-07 21:24:38 -03:00
david gauchard
5c4db3acf4
IPv6 on esp8266-nonos-sdk and arduino (#5136) 2018-11-27 23:07:47 +01:00
david gauchard
a1e59e9c01 update to lwIP-2.1.0: partial SACK support by default (de-selectable in menu) (#5126)
* update to lwIP-2.1.0rc1: partial SACK support
fix #4176

* hash fix

* get some flash back due to mistake in conf (fragmentation & reassembly was incorrectly enabled)
(ahah I scared you)

* add missing include files

* update to lwip-2.1.0(release) + remove unused lwIP's include files

* lwIP release 2.1.0, SACK is now default, bigger, no-SACK is selectable

* fix ldscript

* pio

* rename 'sack' option to 'feat'ure option, + IP fragmentation/reassembly

* merge, fix pio

* change internal/hidden string

* pio: more lwip2 configuration: + without sack for no change in flash footprint
2018-10-09 16:27:27 -03:00