Commit Graph

1019 Commits

Author SHA1 Message Date
ziggurat29 62789da0bb added MSVC project configuration for host-side tools (#2665)
Added MSVC project configuration (@ziggurat29) and support of MinGW (@TerryE) for host-side`luac.cross` tool
2019-02-23 14:09:29 +00:00
Nathaniel Wesley Filardo 30ff0a1620 Raise MQTT_CONNECT_TIMEOUT (#2674)
Should fix https://github.com/nodemcu/nodemcu-firmware/issues/2576
2019-02-19 22:33:25 +01:00
sergio d77666c0e8 trailing spaces cleanup (#2659) 2019-02-17 18:26:29 +00:00
Philip Gladstone d75830407e Initial version of code to support multiple hardware timers (#2497)
* Initial version of code to support multiple hardware timers
* MAde the time sinca last tick work again
* Add some documentation to the code
2019-02-16 13:57:59 +01:00
Arnim Läuger d7da14d69e MQTT: print deprecation message regardless of autoreconnect value (#2668) 2019-02-14 23:32:16 +01:00
ziggurat29 0c7758a555 Fix occasional luac.cross crash (#2661)
A block of memory is accessed after having been freed. This was obscured by the fact that 'oBuf' is a pointer into the middle of the block 'dynamicTables', so when dynamicTables is freed, oBuf is pointing to freed memory. Occasionally, luac.cross would crash because of this.
2019-02-12 22:30:54 +01:00
Mark Schlögel 83cb35da52 Patch 1 (#2646)
Increase http timeout 10s -> 60s
2019-02-05 20:59:35 +01:00
Nathaniel Wesley Filardo 06367cb71c Tell the truth about DNS in TLS module (#2643)
Purge the never-functional :dns() method, but document the DNS callback
in :on().

Fixes #2640
2019-02-02 22:08:21 +01:00
Nathaniel Wesley Filardo e87aef8328 Wrap CC invocations in uzlib (#2642) 2019-02-01 21:32:22 +00:00
Arnim Läuger 09533fdf23 set default value for summary var to unbreak standalone builds (#2618) 2019-01-24 21:29:32 +01:00
Nathaniel Wesley Filardo 0e89fb24ba Expunge integer timers (#2603) 2019-01-22 22:59:41 +01:00
Javier Peletier 386867e2fd ESP8266: fix memory leak in encoder.fromHex and avoid use luaM_free (#2617) 2019-01-20 12:45:30 +01:00
galjonsfigur 5d2bb87ceb Updated FatFS from 0.12a to 0.13c (#2608)
Files changed only by the author of FatFS (only updated to new version):

- 00history.txt
- 00readme.txt
- ff.c
- ff.h
- ffunicode.c
- diskio.h
- integer.h
- files in `option` folder except `syscall.c`

Changes:
- removed option folder (now everything is in ffunicode.c)
- modified Makefile to support new version of FatFS
- removed syscall.c and modified ffsystem.c from FatFS author instead
- modified files: diskio.c, ffconf.h to mimic changes from new version
- modified files: fatfs_config.h, myfatfs.c
because of changes of configuration keywords in 0.13 version
- removed empty lines from beginning of files:
fatfs_prefix_lib.h, myfatfs.c, sdcard.c
- changed version number in documentation
2019-01-16 22:30:42 +01:00
Nathaniel Wesley Filardo 6e95d74fbd Update TLS protocol support (#2587)
* Update TLS protocol support

TLS1.0 is past PCI's EOL; BEAST is no more
Enable elliptic curve key exchanges
	Do not enable the smallest ECs for security
	Do not enable the largest ECs for computational time
	Do not enable 25519 (sad) because it doesn't go across the wire
Drop non-PFS key exchanges
Drop ARC4, Blowfish, DES, genprime, XTEA code
Drop renegotiation support completely
	It takes so much heap that it's not likely to work out well

Tidy handling of SSL_BUFFER_SIZE

Update docs
Drop mention of startcom, since they are no more, for letsencrypt

* Update mbedtls to 2.7.7

Preserve our vsnprintf and platform hacks

* Introduce TLS maximum fragment size knob

Reduce buffer size to 4Ki by default and advertize that.  That's the
largest we can advertize with the TLS MFL extension, so there's no
point in making them larger.  The truly adventurous can re-raise
SSL_BUFFER_SIZE and undefine the SSL_MAX_FRAGMENT_LENGTH_CODE and get
back to the earlier behavior.

* Default to mbedTLS debug with DEVELOP_VERSION
2019-01-15 17:02:32 +01:00
Javier Peletier c6653b5921 fix number2integer conversion in ESP8266 for floating-point builds (#2609) 2019-01-15 13:00:37 +00:00
andyleap 0a500eb95d Add set clock div (#2572)
* Add spi.set_clock_div

This will allow the SPI clock divider to be changed relatively simply,
to better support multiple devices with varying SPI clock rate support

* Add documentation
2018-12-16 12:07:20 +01:00
Arnim Läuger 031fd0a913 Reduce default make verbosity (#2583) 2018-12-09 21:39:43 +01:00
Nathaniel Wesley Filardo 61433c448e Deprecate C ds18b20 module (#2581) 2018-12-05 21:38:11 +01:00
Terry Ellison 401fa56b86
Minor Luac fixes (#2579) 2018-12-03 21:41:50 +00:00
Johan Ström 2d958750b5 Handle large/chunked/fragmented MQTT messages properly (#2571)
* MQTT: handle large/chunked/fragmented messages properly

If a message spans multiple TCP packets it must be buffered before
delivered to LUA. Prior code did not do this at all, so this "patch"
really adds proper handling of fragmented MQTT packets.
This could also occur if multiple small messages was sent in a
single TCP packet, and the last message did not completely fit in that
packet.

Introduces a new option to the mqtt.Client constructor:
max_publish_length which defaults to 1024

Introduces a new 'overflow' callback.

Fixes issue #2308 and proper fix for PR #2544.

* mqtt.md: clarified heap allocation

* mqtt: ensure ack is sent for overflowed publish

If QoS is used we should still acknowledge that we received it, or server might retransmit it later.
2018-11-30 22:12:46 +01:00
Natalia b77033f920 Always compile `app/crypto` folder (#2573) 2018-11-28 14:03:33 +01:00
galjonsfigur d5aca39f48 Fix build problem with luac.cross when DEVELOPMENT_USE_GDB is used (#2569) 2018-11-23 18:02:07 +00:00
Carsten Elton Sørensen bb9a5977d3 Calling vol:umount() would fail (#2558)
The volume returned by file.mount() could not be unmounted, because vol:umount() would fail with a cryptic error about the uncallable nature of the volume userdata object. This was due to the wrong metatable name being used for setting up the volume structure. The correct name, as registered elsewhere in file.c, is now used, and vol:umount() is callable.
2018-11-16 21:37:18 +01:00
Johan Ström 33613be550 Increase MQTT recv buffer size to support MTU 1500 (#2308) (#2544)
Any TCP packet with more than 1024 bytes of payload was silently
dropped. With MTU of 1500 the TCP payload can be up to 1460 bytes
(1500 - 20(IP hdr) - 20(TCP hdr))
2018-11-13 23:43:24 +01:00
Arnim Läuger 46671928c0 establish delay as event to trigger flushing of spi buffer (#2517) 2018-11-13 13:18:03 +01:00
Arnim Läuger 5767475766 re-rename ENABLE_TIMER_SUSPEND to TIMER_SUSPEND_ENABLE in user_config.h (#2520) 2018-10-28 23:07:59 +01:00
Arnim Läuger cbd19f895f
u8g2: include "large" fonts (#2531) 2018-10-24 22:48:50 +02:00
Natalia 0bdcb81526 u8g2 i2c multibus support (#2526)
* u8g2 support for more than only one i2c bus

* Removed unnecessary #include
2018-10-20 10:29:29 +02:00
Arnim Läuger 67567af959 Submodulify ucg and update to v1.5.2 (#2503)
* turn ucg into submodule
* update ucg to 1.5.2
* add license note to doc
* align docs with esp32
* move ucg hal into platform folder
adapt examples
2018-10-19 21:18:50 +01:00
Terry Ellison 5f67de8d48
Optimise ROTable accesses and interface (#2505)
-  Optimise ROTable accesses and interface

This includes some refinements to the ROTable cache which remove the linker cludges on the CROSS_COMPILE builds.  Also keyhole tweaks to some of the Lua VM code to implrove runtimes.

I also noticed some compile time warnings during the build; the change to uz_unzip.c doesn't impact the compiled code, but does remove the compiler warnings.
2018-10-13 17:14:33 +03:00
Nathaniel Wesley Filardo 3c824d7a81 Cron fixes, part 2 (+) (#2515)
* Restore WRAPCC when building Lua
* Fix several parsing bugs
2018-10-10 17:36:00 +01:00
Nathaniel Wesley Filardo 8790924c31 Check os_realloc calls (#2513) 2018-10-09 21:58:03 +01:00
Arnim Läuger 509be837a8 Update u8g2 to v2.23.18 (#2500)
* Update u8g2 to v2.23.18
* serve wdt for long delays
2018-10-07 21:46:56 +01:00
Terry Ellison 172fb276ca
Add compression to LFS images (#2448)
* Merge of LFS compress, optimize against current dev
* Fixes to LFS compress patch
2018-09-29 16:57:51 +03:00
Nathaniel Wesley Filardo 0e103a39dd Better fix for HTTP header decode (#2491)
See https://github.com/nodemcu/nodemcu-firmware/issues/2482
2018-09-21 11:57:52 +02:00
Nate Clark 0abb26170b Decode chunked responses case insensitve headers (#2483) 2018-09-12 16:28:46 +02:00
Terry Ellison 94abbe70cb
Fix #2430 node.input() not working (#2469) 2018-08-27 12:46:51 +01:00
Gregor Hartmann 91656c3d76 create luac.cross.{integer|float} (#2450)
Use separate names for the integer and float  `luac.cross` binaries.  Also adds local/lua directory which is already supported by tools makefile to build LFS image.
2018-08-11 18:28:01 +01:00
Nathaniel Wesley Filardo a57fe552e8 app/lua/luac_cross: WRAPCC CC here, too (#2453)
Not that Lua takes very long to compile, but allowing for ccache here
should still help the builder(s) consume a little less time and power.
2018-08-11 13:50:12 +02:00
Nathaniel Wesley Filardo fd12be9966 file: list now takes optional pattern for filtering (#2452)
Thanks to @TerryE for many useful suggestions
2018-08-10 16:38:48 +01:00
Marcel Stör cddefbcae9 Add comment for font list 2018-07-30 23:25:55 +02:00
devsaurus 62f48fe170 unbreak firmware build without u8g2 submodule 2018-07-29 12:43:42 +02:00
devsaurus c03df2b4bd adapt to new optional build strategy 2018-07-22 15:17:58 +02:00
devsaurus eba5d57db7 allow definition of font and display tables in an external file 2018-07-22 13:51:12 +02:00
devsaurus 5f3e210f98 doc clarifications, code alignment with esp32 2018-07-22 13:51:12 +02:00
devsaurus adc08d17c3 fix malloc/free from stdlib 2018-07-22 13:51:12 +02:00
devsaurus 15d4311f40 add docs 2018-07-22 13:51:12 +02:00
devsaurus 87bb96dfbe port u8g2 module from esp32 platform 2018-07-22 13:51:10 +02:00
devsaurus 7d04636689 submodule u8g2 2.19.8 2018-07-22 13:51:03 +02:00
devsaurus 1f7593538f remove u8g 2018-07-22 13:51:00 +02:00