- 20 Jul, 2019 1 commit
-
-
Arnim Läuger authored
Ethernet module added.
-
- 19 Jul, 2019 1 commit
-
-
Johny Mattsson authored
* Move task_post() into IRAM so it can be used by IRAM'd ISRs. * Don't leave crud on stack on pcall error.
-
- 14 Jul, 2019 1 commit
-
-
Johny Mattsson authored
To avoid races between the lwIP callbacks (lwIP RTOS task) and the Lua handlers (LVM RTOS task), the data flow and ownership has been simplified and cleaned up. lwIP callbacks now have no visibility of the userdata struct. They are limited to creating small event objects and task_post()ing them over to the LVM "thread", passing ownership in doing so. The shared identifier then becomes the struct netconn*. On the LVM side, we keep a linked list of active userdata objects. This allows us to retrieve the correct userdata when we get an event with a netconn pointer. Because this list is only ever used within the LVM task, no locking is necessary. The old approach of stashing a userdata pointer into the 'socket' field on the netconn has been removed entirely, as this was both not thread/RTOS-task safe, and also interfered with the IDFs internal use of the socket field (even when using only the netconn layer). As an added benefit, this removed the need for all the SYS_ARCH_PROTECT() locking stuff. The need to track receive events before the corresponding userdata object has been established has been removed by virtue of not reordering the "accept" and the "recv" events any more (previously accepts were posted with medium priority, while the receives where high priority, leading to the observed reordering and associated headaches). The workaround for IDF issue 784 has been removed as it is now not needed and is in fact directly harmful as it results in a double-free. Yay for getting rid of old workarounds! DNS resolution code paths were merged for the two instances of "socket" initiated resolves (connect/dns functions). Also fixed an instance of using a stack variable for receiving the resolved IP address, with said variable going out of scope before the DNS resolution necessarily completed (hello, memory corruption!). Where possible, moved to use the Lua allocator rather than plain malloc. Finally, the NodeMCU task posting mechanism got a polish and an adjustment. Given all the Bad(tm) that tends to happen if something fails task posting, I went through a couple of iterations on how to avoid that. Alas, the preferred solution of blocking non-LVM RTOS tasks until a slot is free turned out to not be viable, as this easily resulted in deadlocks with the lwIP stack. After much deliberation I settled on increasing the number of available queue slots for the task_post() mechanism, but in the interest of user control also now made it user configurable via Kconfig.
-
- 11 Jul, 2019 1 commit
-
-
Johny Mattsson authored
The netbuf_data() function only returns data from the first pbuf in the chain. We need to use netbuf_first() and netbuf_next() to walk the pbuf chain and act on each in turn.
-
- 06 Jul, 2019 1 commit
-
-
Johny Mattsson authored
* Implemented otaupgrade module. * Added partition table example for otaupgrade. * Copy-paste omission. Whoops. * Updated otaupgrade docs after review.
-
- 04 Jul, 2019 1 commit
-
-
Johny Mattsson authored
* Leaner, meaner crypto module; now with HMAC Based on my testing, mbedtls pulls in all its algorithm regardless of whether the NodeMCU crypto module was using them or not. As such, the space savings from omitting algorithms were only in the tens of bytes. By switching to using the mbedtls generic message digest interface, the crypto module itself could be shrunk in size and complexity. Despite adding support for HMAC on all algorithms (plus including RIPEMD160), this version is 330 bytes smaller. * Updated crypto module docs. * Removed superfluous brackets in crypto docs. Copy-paste considered harmful... >.>
-
- 03 Jul, 2019 1 commit
-
-
devsaurus authored
-
- 22 Jun, 2019 1 commit
-
-
Johny Mattsson authored
With the IDF asserting full control over the linker scripts and insisting on the application description being the first entry in the .flash.rodata section, or previous method of doing link-time arrays stopped working. Why? Because the build patched in a SHA256 digest straight into our arrays. With the limited language of the gcc linker scripts I could find no other way of getting it in cleanly. The IDF "linker fragments" support can not be made to work for our needs: - no support for setting alignment before including objects - no support for declaring symbols - no support for adding our terminating zeros - insists on grouping objects by lib rather than by declared grouping, which means we could at most have a single link-time-array using the IDF mechanism - also does not like underscores in section names, but that's just an annoyance So, the least bad option that I could come up with was to use a project-wide makefile snippet to add a target in-between the IDF's generation of the esp32.project.ld file, and the linking of our NodeMCU.elf. In this target we read in the esp32.project.ld linker script, check whether we have our arrays in there, and if not rewrites the linker script. Oh, and the esp32.project.ld file only came into existence on the IDF 3.3 branch, so I had to change up the IDF to the latest release/3.3 as well. I would've preferred a stable tag, but the v3.3-beta3 had a really nasty regression for us (can't add partition entry), so that was a no-go.
-
- 21 Jun, 2019 1 commit
-
-
devsaurus authored
-
- 12 Jun, 2019 1 commit
-
-
John Lauer authored
* ESP32: Added pulsecnt module The pulsecnt module let's you use the ESP32's pulse counter capabilities from Lua. * ESP32: Pulsecnt module. Better/faster callback. Reduced the amount of callback variables to speed things up and shift more logic to Lua than in the C code. * ESP32: Completed docs for pulsecnt * ESP32: Final release of pulsecnt * ESP32: Production release of pulsecnt * ESP32: Release (tweaked docs) * ESP32: Pulse Counter Release. Cleaned up .gitignore * ESP32: Pulse counter release (changed ch1 gpio to int to match ch0)
-
- 10 Jun, 2019 1 commit
-
-
Skirmantas Lauzikas authored
* ESP32: Add option to set IP/dns config This commit adds support for setting: * Hostname * Static IP / Dns server (Sta mode) * Changing AP network ip config * Setting DNS server IP for DHCP * ESP32: Documentation for setting IP/dns/hostname config * Documented new functions * sethostname() now returns true if success
-
- 31 May, 2019 1 commit
-
-
devsaurus authored
remove ESP_INTR_FLAG_IRAM to fix #2564
-
- 28 Apr, 2019 2 commits
- 20 Feb, 2019 1 commit
-
-
Javier Peletier authored
* file: remove use of luaM_free * added safe pushlstring function
-
- 12 Feb, 2019 1 commit
-
-
Arnim Läuger authored
* mqtt: add ceritificate handling to support server verification and mutual authentication * remove superfluous include
-
- 10 Feb, 2019 1 commit
-
-
Arnim Läuger authored
-
- 31 Jan, 2019 2 commits
-
-
Javier Peletier authored
-
Javier Peletier authored
-
- 29 Jan, 2019 2 commits
-
-
Javier Peletier authored
* mqtt: first pass * mqtt: correct gc during callback bug * mqtt: document and cleanup * mqtt: separate lnodeaux due to copyright * mqtt: rename lnodeaux methods * mqtt: update docs * mqtt: fix copyright in lnodeaux.c * mqtt: refactor and cleanup * mqtt: use ESP logging
-
Javier Peletier authored
-
- 22 Jan, 2019 1 commit
-
-
Kevin Leung authored
-
- 18 Jan, 2019 1 commit
-
-
Javier Peletier authored
-
- 17 Jan, 2019 2 commits
-
-
devsaurus authored
-
Javier Peletier authored
-
- 16 Jan, 2019 1 commit
-
-
Javier Peletier authored
-
- 15 Jan, 2019 1 commit
-
-
Javier Peletier authored
-
- 02 Dec, 2018 2 commits
-
-
devsaurus authored
-
Arnim Läuger authored
* opt_checkint_range: extend range check to default value * opt_checklstring added * i2s: rework luaM_ and option table handling * spi_master: rework option tables handling * ledc: rework option tables handling
-
- 30 Nov, 2018 1 commit
-
-
Skirmantas Lauzikas authored
* ESP32: add support for RS485 This commit adds support for switching UART mode to RS485/IRDA. Also included are patches for memory leaks then handling UART events other than data. * ESP32: Documentation for uart.setmode()
-
- 26 Nov, 2018 1 commit
-
-
Skirmantas Lauzikas authored
* ESP32: Add time modules New time module for manipulating system time/ calendar and controlling SNTP server * ESP32: Time module documentation & style fixes * added documentation for time modules * style fixes as pointed out by @devsaurus * ESP32: Time module small fixes * Couple small fixes
-
- 23 Nov, 2018 1 commit
-
-
Arnim Läuger authored
-
- 22 Nov, 2018 1 commit
-
-
Skirmantas Lauzikas authored
* Esp32: Add SJSON module This adds SJSON module taken directly from master * ESP32: Fixes for sjson lib Fixed compilation not including config header, thus braking some of libs functionality * ESP32: Upgraded SJSON to master
-
- 15 Nov, 2018 2 commits
-
-
tomsci authored
* Adding qrcodegen module for generating QR Codes * Added LUA_MODULE_QRCODEGEN KConfig * Changed qrcodegen.encodeText() to use an options table Created common.h with new option table helper fns. * Reworked http.c to use new common.h options table APIs
-
tomsci authored
* Add Sodium module * Split sodium API into subtables; updated docs * Fixed refactored names of crypto_box fns
-
- 10 Nov, 2018 1 commit
-
-
tomsci authored
* esp32: Reinstate tmr.now() function using esp_timer_get_time() Also added larger limit before wrapping if Lua's number type supports it. * Renamed tmr.now() to node.uptime() Added second return value to indicate timer wrap
-
- 08 Nov, 2018 2 commits
-
-
tomsci authored
-
tomsci authored
* ESP32: Added http module * add asynchronous flavor for context:request() (cherry picked from commit e65b90cc8fc5296f7fe6cae1978835e06a9f44bb) * http: More asynchronous support, more options * Fix docs typo * Code review comments from @devsaurus Fixes some cleanup issues with asynchronous mode * Added http.md to mkdocs.yml * Align connection:close() to template
-
- 04 Nov, 2018 2 commits