1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-12 01:53:07 +03:00
Commit Graph

4267 Commits

Author SHA1 Message Date
448486a4c9 emulation on host: lwIP always receive multicast packets, enable and fix multicast udp server (#7386) 2020-06-16 23:03:22 +02:00
64f1f7b727 doc fixes for LittleFS (#7385) 2020-06-16 17:31:19 +02:00
1bfb29395f Update readme.rst (#7379)
ESP9266 to ESP8266
2020-06-14 23:05:42 -04:00
599492ec43 libraries/SPI: abs -> std::abs and cast fixes (#7362)
* libraries/SPI: remove pointless abs(...) call

SPI library code erroneously assumed that:
- abs() is a C function, so include stdlib.h is required.
  what happens instead is Arduino.h shadows `abs()` with it's own macro
- uint32_t() - int32_t() promotes to int32_t, thus needing abs()

Fix both issues, leaving existing calculations as-is.

* additional changes for freq and constants

- restore abs call, cast freq to correctly display the intent
- update magic numbers comments
- move some spiclk_t magic numbers to func consts
2020-06-13 11:17:06 -07:00
89d0c78703 emulation on host: fix binding from a particular interface (#7372)
allows to effectively use virtual interfaces (ifconfig eth0:1) with a different IP address
2020-06-13 14:04:28 +02:00
a70e834d1e Add a "-- CUT HERE --" marker to exception output (#7369)
Users aren't reporting/seeing the actual PC of failures because they
are only copying the >>stack<< into the decoder and not the Exception
line.  Add an ALL CAPS "CUT HERE FOR EXCEPTION DECODER" line to the
output to make it blindingly obvious to include the full crashdump
both in bug reports as well as exception decodes.
2020-06-11 15:24:21 -07:00
fe673cc16a User requested fix: be less restrictive in the use of GPIOs. (#7367) 2020-06-11 09:48:31 -07:00
ab03add8d0 Fix oversight for ap gw (#7366) 2020-06-10 15:18:19 -04:00
48281fb1f1 - Correct terminology in README.md. 2020-06-09 22:40:24 +02:00
5473656eac Update ESP8266WiFiAP.cpp (#7363)
Fix the bad adress of the the AP if the settings are wrong
2020-06-08 16:41:25 -04:00
7346754c09 API change to faciliate executer to know the number of active callbacks (#7361) 2020-06-08 14:19:18 -04:00
83523c0259 umm_malloc manual merge with upstream (#7337)
* umm_malloc manual merge with upstream

* Fix divide by zero, case when heap is 100% allocated.

* Removed extra line.

* Fixed block count for debug build. This resolves OOM events for debug build.
Correct overstepping array when freeing.

* Handle another corner case in example HeapMetric.ino.
Comment corrections.

* Revert - ESP.getMaxFreeBlockSize() is back to indicating the size of a
contiguous block of memory before the umm_malloc overhead is removed.

* Stale code cleanup and comment improvements
2020-06-07 20:00:15 -07:00
0d04124b94 EspSoftwareSerial service release 6.8.2. (#7354) 2020-06-07 12:46:53 -07:00
8693ad4d8b Use a prebuild, portable Python3 for OSX (#7348)
It seems like Macs don't have a consistent version or way of installing
Python3.  Use a prebuild binary instead of attempting to use the OS X
Python3 interpreter.
2020-06-07 12:12:43 -07:00
e70092ca3e Recognize MSYS(MINGW) as Windows for toolchain get (#7358)
Add the ID string reported by MSYS's latest tools under Windows with
the string "MINGW..." as "Windows" for toolchain selection in get.py
2020-06-07 10:53:48 -07:00
45feadcb4a emulation on host: various fixes (#7355)
(trying to compile LEAmDNS2)
2020-06-07 10:12:04 -07:00
23febc189b elf2bin.py objcopy cleanup (#7351)
* elf2bin: clean-up after objcopy, use kwargs interfaces

* unique names for segments

* names

* run with python2, just os.remove file after use
2020-06-06 16:08:16 -07:00
66138a67cc - Add protected getters for _forwardingBacklog and _macIgnoreList in FloodingMesh. 2020-06-06 14:16:02 +02:00
1d2b6b5c52 - Make HelloMesh.ino stylish. 2020-06-06 01:18:28 +02:00
40b39f32ef - Polish README.md. 2020-06-06 00:34:29 +02:00
5661ec07b1 Merge branch 'master' into wifi_mesh_update_2.2 2020-06-05 23:23:57 +02:00
fba4ac15f6 - Make most type definitions public instead of protected, to facilitate use in composition.
- Call ResponseTransmittedHook after every response transmission attempt, instead of after every successful response transmission attempt.

- Improve documentation.

- Finalize README.md.

- Update keywords.txt.
2020-06-05 21:56:33 +02:00
c3796a4de5 Graph example (#7299)
* New Graph Example

* Now using isFlashInterfacePin() no define default GPIO mask.

* Added info about zooming.

* Adressed requested changes (boolean > bool,
using esp8266::polledTimeout::periodicMs, reducing complexity)
2020-06-02 20:59:16 -04:00
8ee67ab2b5 Return FALSE on seek past EOF (#7324)
Fixes #7323

While I'm not a fan, the Arduino FileSeek API online shows that a seek()
past EOF should return FALSE.
https://www.arduino.cc/en/Reference/FileSeek

SPIFFS and SDFS obey this, but LittleFS followed the POSIX standard or
allowing seeks past EOF.

Update LittleFS::seek() to follow the Arduino API and add tests for it.
2020-05-30 21:47:53 -07:00
27ef03fc05 Add documentation on recovering from deep sleep with WAKE_RF_DISABLED (#7338)
* Clarify how to enable WiFi after DeepSleep

* Add FAQ item for recovering from DeepSleep

* Reference issue

* Update issue URL
2020-05-29 14:14:45 -04:00
0d43338a37 Add FTP client/server lib link (#7336) 2020-05-29 10:12:46 -04:00
51daecc236 Xmc flash 2 (#7317)
* Remove unnecessary XMC support from eboot

eboot is always run with the flash access speed set to 20MHz, so
there is no need for special treatment of XMC chips.

* After eboot copies the new firmware into place, verify the copy.

If the data written to flash is as expected, the line cmp:0 will be displayed
after the usual @cp:0 from eboot.

* Disable interrupts during the precached part of _SPICommand()

For some reason this was an issue during the reboot after an OTA update.
2020-05-26 20:04:49 -04:00
0deb87483e Document ESP.getMaxFreeBlockSize() != max malloc size (#7328)
Fixes #7322.  Because of UMM internals, the largest `malloc()`able block
will be smaller than the largest contiguous free RAM block.  Note in the docs.
2020-05-26 14:00:41 -07:00
52b3e5b7b3 rotate right (#7320) 2020-05-20 22:18:59 +02:00
5762712277 Bring SPIFFS up to latest version (#7276)
Manually merged the PATCH files from upstream up until Jan 26, 2020.

Looks to only fix a single bug related to reading past the end of a file
in certain cases.  Other new features (secure erase) are included to
make it easier to merge any future releases, but are not enabled in the
core.

Merges included:
20fc6df0ab2bee391961b5f823a327887abc96b4
da1cf494796d68bb5c02ba70cf78a904db08a170
13935985cdde6d6b4ec77f2685264242ee55e7ac
ec68ba8208d7550860e4e78299d58a529b88bf85
f59d958e0b2f169b549e5cdc293a70bc6873cd45
f7d3e9f2b207958dfc2c01cf3fc42f98a4b9b239
554b59c147d96223ccce18374989f191f7222b45
07e013056dd976d12ae36db5c54a275e1497f6c8
d0d44c4908efff7a443ed9b1174d9173fb784a72
3cb24dbfd32a396dca46a7ca56a8e75bdcb97078
8172b40813ff36aa0df4c88a6e9c76e5300d7e32
2020-05-18 20:48:18 -07:00
7c008e31bb Flash size reduction for mime-type (#7312)
* Flash size reduction for mime-type
* moving from fixed size strings to standard PROGMEM strings
* adding `#define MIMETYPE_MINIMAL` to reduce the footprint to
  mime-types that are strictly necessary

* Added MIMETYPE_MINIMAL conditionals
2020-05-18 20:16:11 -07:00
0516b30655 - Fix Readme links. 2020-05-18 22:29:07 +02:00
f059e57322 - Use the new Crypto, TypeConversion and random() functionality added to the Arduino core, instead of the versions local to the mesh library.
- Rearrange class variables to minimize storage padding.

- Add protected getters for EspnowMeshBackend and MeshBackendBase components.

- Partially update README.md
2020-05-18 22:09:34 +02:00
3e4d7c76c4 Allow non-aligned PSTR() (#7275)
* Allow non-aligned PSTR()

* Add PSTR4() macro to first 4-bytes aligned PSTR
2020-05-18 15:21:50 -04:00
595fb23128 Merge branch 'master' into wifi_mesh_update_2.2 2020-05-18 21:05:27 +02:00
1b20cd6263 - Add required BearSSL include in header. (#7310)
Co-authored-by: Anders <andlo151@student.liu.se>
2020-05-18 13:54:25 -04:00
4519db85e9 Server Sent Events example - issue #7008 (#7012)
* Server Sent Events example - issue #7008

Illustrates the use of SSE using ESP8266WebServer

* Update ServerSentEvents.ino

* Create ServerSentEventsMultiClient.ino

* sync

* Update ServerSentEvents.ino

* Update ServerSentEvents.ino

Fix  missing variables in printf statments
Fix subscriptioncount not decreasing
Fix SSEBroadcastState (argument sequence wrong)

* Undo the library additions, move to current master

* Fix compiler warning

* Address review and fix multi-sensor updates

Address points of @devyte's code review:
* Use IPAddress vs. uint32_t
* Refactor the URL parsing logic to use strlen vs. sizeof, since there
  was some confusion in the original (correct) version
* Minimize copies of WiFiClients while in use
* Use byref access for sensor updates

Fix multi-sensor updates
* Create an update Ticker for each sensor, because the original code
  only had one whose callback was overridden by sensorB, meaning sensorA
  never changed

* Fix IPv6 build errors

* Remove WiFiClient extraneous copy

Avoid duplicating WiFiClient by using the WiFiClient object embedded in
the subscriber[] array instead.

Co-authored-by: Earle F. Philhower, III <earlephilhower@yahoo.com>
2020-05-16 12:22:04 -07:00
c5f60e31cd Allocate BSSL stack for SigningVerifier (#7291)
The BearSSL SigningVerifier was moved to the 2nd stack because some uses
required much more stack than available on the normal stack.

Add a reference to the second stack on object creation (which will
allocate it, if there is no BSSL stack already allocated), and delete
that reference on exit.

Fixes #7288
2020-05-15 20:21:50 -07:00
157ce57996 bugfix2/ESP8266HTTPClient (#6476)
* Because of git problems, start from a new fork and create a new PR. This was PR #6457

* Style update to pass Travis

* Update ReuseConnectionV2.ino

* fix + enforce testing http code

per @earlephilhower review

* Close connection before ::connecting on HTTP/1.0

HTTPClient never actually closes the TCP connection on its own. It will leave the TCP connection open unless you explicitly do a getString which makes a StreamString and stuffs it with the HTTP server response, at which point the HTTP server itself will close the connection.

If you check the HTTP error code and find failure, unless you do a getString and throw it away, it won't disconnect.  Even in HTTP/1.0 or in cases when you haven't enabled _reuse.

Change the logic in ::connect to only reuse the connection when it is specifically allowed.  Otherwise, fall back to re-connection.

* Adjust example per request

Do single URL get in each loop, avoid infinite for loop at end.

* Fix astyle

* Clean up final pass notice

* Fix example syntax error

Editing code in a web textbox without running it is a painful process.


Co-authored-by: Earle F. Philhower, III <earlephilhower@yahoo.com>
2020-05-15 17:12:49 -04:00
40e1f02ffb - Split most of the EspnowMeshBackend code into utility files and the new ConditionalPrinter, EspnowDatabase, EspnowConnectionManager, EspnowTransmitter and EspnowEncryptionBroker classes.
- Improve mutex handling.

- Move verifyEncryptionRequestHmac function from JsonTranslator to EspnowEncryptionBroker.

- Remove UtilityMethods.cpp.
2020-05-15 20:33:08 +02:00
3f5495bb3d Merge branch 'master' into wifi_mesh_update_2.2 2020-05-15 20:08:59 +02:00
d01e6391bb - Fix build error. 2020-05-11 16:18:38 +02:00
ed8add50fe Update README.md (#7295)
Fix forgotten text edit for the latest version
2020-05-10 23:47:01 -04:00
9cf2186af1 Update version links (#7294) 2020-05-10 23:01:09 -04:00
7f3d837e57 Update release instructions (#7292)
* Update release instructions to reflect reality, add copy-paste checklist to ease issue.
2020-05-10 21:48:38 -04:00
2ec2679d6e - Move all serialization code to separate Serializer namespace and files.
- Generalize and improve JSON processing code.

- Prevent mesh passwords from containing " characters to avoid messing up the JSON processing.

- Improve documentation.
2020-05-10 16:42:57 +02:00
56bbb99e6f Back to 3.0.0-dev (#7279) 2020-05-07 14:37:44 -07:00
a5432625d9 Release 2.7.1 (#7278) 2.7.1 2020-05-07 13:06:41 -07:00
ea879b6ef6 XMC in eboot: hotfix: disabling (#7277) 2020-05-07 15:32:16 +02:00
e64125a53c - Move globals to anonymous namespaces.
- Move private static variables to anonymous namespaces.

- Remove espnow prefix from names where it is not required.
2020-05-05 16:10:37 +02:00