1. 09 Jun, 2020 5 commits
    • Nathaniel Wesley Filardo's avatar
      e1a81aa1
    • Nathaniel Wesley Filardo's avatar
      Networking rampage and accumulated fixes (#3060) · af426d03
      Nathaniel Wesley Filardo authored
      * espconn: remove unused espconn code, take 1
      
      This is the easiest part of https://github.com/nodemcu/nodemcu-firmware/issues/3004 .
      It removes a bunch of functions that were never called in our tree.
      
      * espconn: De-orbit espconn_gethostbyname
      
      Further work on https://github.com/nodemcu/nodemcu-firmware/issues/3004
      
      While here, remove `mqtt`'s charming DNS-retry logic (which is neither
      shared with nor duplicated in other modules) and update its :connect()
      return value behavior and documentation.
      
      * espconn: remove scary global pktinfo
      
      A write-only global!  How about that.
      
      * net: remove deprecated methods
      
      All the TLS stuff moved over there a long time ago, and
      net_createUDPSocket should just do what it says on the tin.
      
      * espconn_secure: remove ESPCONN_SERVER support
      
      We can barely function as a TLS client; being a TLS server seems like a
      real stretch.  This code was never called from Lua anyway.
      
      * espconn_secure: more code removal
      
      * espconn_secure: simplify ssl options structure
      
      There is nothing "ssl_packet" about this structure.  Get rid of the
      terrifying "pbuffer" pointer.
      
      Squash two structure types together and eliminate an unused field.
      
      * espconn_secure: refactor mbedtls_msg_info_load
      
      Split out espconn_mbedtls_parse, which we can use as part of our effort
      towards addressing https://github.com/nodemcu/nodemcu-firmware/issues/3032
      
      * espconn_secure: introduce TLS cert/key callbacks
      
      The new feature part of https://github.com/nodemcu/nodemcu-firmware/issues/3032
      Subsequent work will remove the old mechanism.
      
      * tls: add deprecation warnings
      
      * luacheck: net.ifinfo is a thing now
      
      * tls: remove use of espconn->reverse
      
      * mqtt: stop using espconn->reverse
      
      Instead, just place the espconn structure itself at the top of the user
      data.  This enlarges the structure somewhat but removes one more layer
      of dynamic heap usage and NULL checks.
      
      While here, simplify the code a bit.
      
      * mqtt: remove redundant pointer to connect_info
      
      Everywhere we have the mqtt_state_t we also have the lmqtt_userdata.
      
      * mqtt: doc fixes
      
      * mqtt: note bug
      
      * tls: allow :on(...,nil) to unregister a callback
      af426d03
    • Nathaniel Wesley Filardo's avatar
      net: rename net.if.info to net.ifinfo (#3033) · 446c058f
      Nathaniel Wesley Filardo authored
      Reserved words are always reserved in Lua, so let's not have people
      typing net["if"]...
      446c058f
    • Nathaniel Wesley Filardo's avatar
      New `net.if.info` call to show LwIP information (#2862) · 948325a9
      Nathaniel Wesley Filardo authored
      * Remove app/include/netif/wlan_lwip_if.h
      
      This file appears to be unused in our tree.
      
      * New `net.if.info` call to show LwIP information
      
      This is a generalization of `wifi.sta`'s and `wifi.ap`'s `getip` and
      `getmac` calls.  I don't propose to deprecate those, but perhaps we
      should, in the documentation, point users at this function instead.
      
      The direct motivation is to permit continued use of DHCP-provided NTP
      servers in a future where
      https://github.com/nodemcu/nodemcu-firmware/pull/2819 has landed, now
      that https://github.com/nodemcu/nodemcu-firmware/pull/2709 is in the
      tree.  But rather than exposing just that information, a more general
      interface seems useful.
      948325a9
    • Terry Ellison's avatar
      Lua 5.1 to 5.3 realignement phase 1 · e7c29fe3
      Terry Ellison authored
      e7c29fe3
  2. 23 Jul, 2019 1 commit
  3. 21 Jul, 2019 1 commit
    • Johny Mattsson's avatar
      Major cleanup - c_whatever is finally history. (#2838) · 526d21da
      Johny Mattsson authored
      The PR removed the bulk of non-newlib headers from the NodeMCU source base.  
      app/libc has now been cut down to the bare minimum overrides to shadow the 
      corresponding functions in the SDK's libc. The old c_xyz.h headerfiles have been 
      nuked in favour of the standard <xyz.h> headers, with a few exceptions over in 
      sdk-overrides. Again, shipping a libc.a without headers is a terrible thing to do. We're 
      still living on a prayer that libc was configured the same was as a default-configured
      xtensa gcc toolchain assumes it is. That part I cannot do anything about, unfortunately, 
      but it's no worse than it has been before.
      
      This enables our source files to compile successfully using the standard header files, 
      and use the typical malloc()/calloc()/realloc()/free(), the strwhatever()s and 
      memwhatever()s. These end up, through macro and linker magic, mapped to the 
      appropriate SDK or ROM functions.
      526d21da
  4. 08 May, 2019 1 commit
  5. 17 Feb, 2019 1 commit
  6. 28 Sep, 2017 1 commit
  7. 17 Mar, 2017 1 commit
    • Yury Popov's avatar
      TIME_WAIT sockets fixes (#1838) · 2f00c1d8
      Yury Popov authored
      * Enable SO_REUSEADDR for server TCP sockets
      
      * Reduce TCP_MSL to 5 sec
      
      * Add changes notice for future updates
      
      * Move MSL change to lwipiots.h
      2f00c1d8
  8. 07 Mar, 2017 1 commit
  9. 06 Feb, 2017 1 commit
  10. 31 Dec, 2016 1 commit
    • Yury Popov's avatar
      Net functionality rewrite on top of LWIP (#1379) · 3adba91b
      Yury Popov authored
      * Rewrite net.dns.resolve on LWIP
      
      * Move IGMP (net multicast) to LWIP
      
      * Cleanup net module
      
      * Move secure connection operations to tls module
      
      * Net module on LWIP
      
      * Server timeout parameter
      
      * TCP hold
      
      * Fixes in documentation
      
      * Documentation fixes
      
      * Note TLS module depends on net
      
      * Add TLS module to user_modules.h
      
      * Callback on connect event
      
      * Fix depends net module on tls module
      
      * Fix unhold exponential time issue
      3adba91b
  11. 04 Sep, 2016 1 commit
  12. 02 Aug, 2016 1 commit
  13. 10 Mar, 2016 1 commit
    • philip's avatar
      Adds support for verifying the certificate offered by an SSL server. · 501bd1fb
      philip authored
      Squashed commit of the following:
      
      commit 4439b8c45192f6dee1222df78bbb59f74509e0ee
      Author: philip <philip@gladstonefamily.net>
      Date:   Sun Mar 6 20:23:21 2016 -0500
      
          Fix the ignore
      
      commit a07ee5acdf91286607c3e2dce128c9b8bfd7bd80
      Author: philip <philip@gladstonefamily.net>
      Date:   Sun Mar 6 20:20:41 2016 -0500
      
          Remove uneeded stuff
      
      commit b3604ace92fc13b30161d385c354b0f1c5fe4046
      Author: philip <philip@gladstonefamily.net>
      Date:   Sun Mar 6 20:15:26 2016 -0500
      
          Remove client cert auth
      
      commit 6e48c633569630736a986cd07a59a12de954391e
      Author: philip <philip@gladstonefamily.net>
      Date:   Sun Mar 6 20:11:42 2016 -0500
      
          More cleanup
      
      commit d40eade405ef071d0d1b60d038566b5b8f2cafa3
      Author: philip <philip@gladstonefamily.net>
      Date:   Sat Mar 5 10:56:56 2016 -0500
      
          Move to almost working version
      
      commit 1860a2d90afa94461c53bd41251d4870d6527f9d
      Author: philip <philip@gladstonefamily.net>
      Date:   Fri Mar 4 08:04:09 2016 -0500
      
          Changed the naem to server-ca.crt
      
      commit e7a315660843273fe62943b7fe8ee6c0541dada2
      Author: philip <philip@gladstonefamily.net>
      Date:   Thu Mar 3 21:16:26 2016 -0500
      
          Update gitignores
      
      commit 2b037d185c396209b64381399c40821c15e1840e
      Author: philip <philip@gladstonefamily.net>
      Date:   Thu Mar 3 08:56:17 2016 -0500
      
          Getting better
      
      commit 763255cffba8e279158cd7f43391a3573efdeca8
      Author: philip <philip@gladstonefamily.net>
      Date:   Wed Mar 2 22:28:21 2016 -0500
      
          Works a bit better
      
      commit a38325d1a47dbad255cb3e681da8415e8cf699ea
      Author: philip <philip@gladstonefamily.net>
      Date:   Wed Mar 2 09:11:04 2016 -0500
      
          First building version
      
      commit 4aef13da33470ed954f2eaf5f7ac0ac3dcdf3774
      Merge: 180e147 ebb0c333
      Author: philip <philip@gladstonefamily.net>
      Date:   Tue Mar 1 22:03:06 2016 -0500
      
          Merge remote-tracking branch 'upstream/dev' into ssl-client
      
      commit 180e147c1abdcf4046ad9be9b3c1a48f4a875312
      Author: philip <philip@gladstonefamily.net>
      Date:   Sun Feb 28 21:34:21 2016 -0500
      
          Missing files from espressif
      
      Try to imporve layout
      
      Align the file names with the contents
      
      Missing file
      
      Review comments
      
      More review coments
      501bd1fb
  14. 06 Feb, 2016 1 commit
    • Uri Shaked's avatar
      Fix secure TCP connections · ce498462
      Uri Shaked authored
      Call `espconn_secure_set_size()` before calling `esp_secure_connect()`, should fix issues like #710 and #520
      ce498462
  15. 20 Jan, 2016 1 commit
  16. 16 Dec, 2015 2 commits
    • Johny Mattsson's avatar
      Reworked module registration, removed modules.h · 4e8ef87d
      Johny Mattsson authored
      Module creation & registration now made a lot simpler. In essence,
      each module file is now self-contained and only needs a
      
        NODEMCU_MODULE(MYNAME, "myname", myname_map, luaopen_myname);
      
      line to both be automatically recognised by the Lua initialization
      as well as honor the LUA_USE_MODULES_MYNAME #define.
      4e8ef87d
    • TerryE's avatar
      Major cleanup of module registration pass 2. · b773290b
      TerryE authored
      carrying on Johny's edits as per my comments on #810
      b773290b
  17. 12 Dec, 2015 1 commit
    • Johny Mattsson's avatar
      Major cleanup of module registration. · 6b6456be
      Johny Mattsson authored
      As per #810 & #796, only LUA_OPTIMIZE_MEMORY=2 & MIN_OPT_LEVEL=2 are
      supported when building. This commit effects that limitation.
      
      With this change modules/auxmods.h no longer needs to be updated for
      every new module, nor do module writers need to cater for a hypothetical
      LUA_OPTIMIZE_MEMORY < 2 scenario.
      6b6456be
  18. 18 Nov, 2015 2 commits
  19. 15 Oct, 2015 1 commit
  20. 12 Oct, 2015 1 commit
  21. 27 Jun, 2015 1 commit
  22. 24 Jun, 2015 1 commit
  23. 20 Jun, 2015 1 commit
  24. 17 May, 2015 1 commit
  25. 15 Apr, 2015 1 commit
    • Kevin Uhlir's avatar
      Add multicastJoin and multicastLeave to net module · f68d4160
      Kevin Uhlir authored
      net.multicastJoin(if_ip, multicast_ip)
      net.multicastLeave(if_ip, multicast_ip)
      
      if_ip is a string containing the interface ip to join/leave the
      multicast group.  multicast_ip is the multicast ip of the group to
      join/leave. if_ip can be "" or "any" to affect all interfaces.
      f68d4160
  26. 11 Mar, 2015 1 commit
  27. 13 Feb, 2015 1 commit
  28. 09 Feb, 2015 1 commit
  29. 07 Feb, 2015 1 commit
  30. 18 Jan, 2015 1 commit
  31. 05 Jan, 2015 1 commit
  32. 22 Dec, 2014 1 commit