Commit Graph

1121 Commits

Author SHA1 Message Date
Bernd Meyer cf05c9cd08 Don't try to handle uart input until we have set up the buffer for it 2016-03-10 12:46:56 +11:00
Terry Ellison 1b3d8d4815 Merge pull request #1127 from marcelstoer/dev-new-default-config
Change a number of default values
2016-03-09 22:24:14 +00:00
Marcel Stör bcbf49f275 Change a number of default values 2016-03-09 23:16:43 +01:00
TerryE 5595ca35cb Small bugfix to GPIO.c -- Oops! 2016-03-09 00:06:09 +00:00
Johny Mattsson d3bfdf3ac8 Fixed race-crash in SNTP module. 2016-03-07 12:40:14 +11:00
jfollas aa50eca4f6 Refactoring of MQTT module to consolidate duplicate code into a function
- per @pjsg's suggestion
2016-03-06 20:11:16 -05:00
jfollas 0abe2fe964 MQTT Client - CONNACK processing
- Process the CONNACK message received from the broker after Connect
- Provide feedback to Lua via failure callback on client:connect()
- Also provide failure information for other situations not covered by CONNACK
2016-03-06 16:33:57 -05:00
Terry Ellison 76f2654f82 Merge pull request #1105 from TerryE/dev-node-task
Extend the node library to include a Lua implementation of task posting
2016-03-06 17:17:55 +00:00
TerryE acddf29fb0 Address Philip's review comments 2016-03-06 17:11:18 +00:00
TerryE 1e49d03dbc Limit file.open() names to 31 char max C string format. See #1112 2016-03-04 01:46:35 +00:00
TerryE 9977b13bcd Update to address review comments in PR #1105 2016-03-03 15:48:09 +00:00
Johny Mattsson 5684392911 Merge pull request #1111 from TerryE/dev-fix-luac-compile
Fix break in luac.cross build and add some documentation
2016-03-04 01:22:41 +11:00
TerryE f2ea3df8a4 Fix break in luac.cross build and add some documentation 2016-03-03 02:03:23 +00:00
philip 6efbf13eae Omit all the PWM code if the PWM module is not included 2016-03-01 21:55:21 -05:00
Terry Ellison ebb0c33364 Merge pull request #1040 from pjsg/struct
Direct port of the struct module
2016-03-02 01:57:17 +00:00
TerryE 4f8f192cbe Extend the node library to include a Lua implementation of task posting 2016-03-01 23:37:41 +00:00
Marcel Stör f087908d62 Disable SmartConfig by default 2016-03-01 21:32:24 +01:00
Terry Ellison 00cc4b42dc Merge pull request #1067 from pjsg/rotarymod
Module to handle rotary decoders
2016-03-01 16:36:24 +00:00
Terry Ellison d883f2c4be Merge pull request #1088 from TerryE/dev-dis-smart-wifi
Make the wifi.smart functions options and remove wofs and upgrade
2016-03-01 16:34:00 +00:00
Terry Ellison 128177acd4 Merge pull request #1102 from DiUS/enduser_setup-less_crash
Crash-fixes for enduser_setup module
2016-03-01 16:28:18 +00:00
philip dbaad1b81c Add call to get_pin_map() in pwms_init()
Move get_pin_map() into platform_init
2016-03-01 09:18:36 -05:00
Johny Mattsson 969e9f2e90 Fix fatal crash if enduser_setup.stop() called twice. 2016-03-01 18:59:30 +11:00
Johny Mattsson a3d9d3ea47 Include the SSID in enduser_setup status message.
For more userfriendly feedback.
2016-03-01 18:59:24 +11:00
Johny Mattsson 04889813f3 Fix nasty case of memory corruption by enduser_setup.
Turns out that running wifi_station_config() from a network callback can
be a Really Really Bad Idea(tm).
2016-03-01 18:59:18 +11:00
philip d40ee50a8e Squashed commit of the following:
commit 2c7c3fc3985cc32866e8af496abea9971eaee90a
Merge: 9179dae 41022c3
Author: philip <philip@gladstonefamily.net>
Date:   Sun Feb 28 14:47:47 2016 -0500

    Merge remote-tracking branch 'upstream/dev' into rotary_2

commit 9179dae0824e6b35ad09e5113aacc26dc91692c0
Author: philip <philip@gladstonefamily.net>
Date:   Fri Feb 26 20:53:27 2016 -0500

    Review comments

commit 67741170e20ccb2b636e701f0664feff2aafbb4c
Author: philip <philip@gladstonefamily.net>
Date:   Fri Feb 26 20:59:49 2016 -0500

    Squashed commit of the following:

    commit 8c9a64731c4a8b9aedda18a399b433b173d2199f
    Merge: 085935f 19d3c1d
    Author: philip <philip@gladstonefamily.net>
    Date:   Fri Feb 26 20:58:10 2016 -0500

        Merge remote-tracking branch 'upstream/dev' into rotarymod

        Conflicts:
        	app/platform/platform.c

    commit 085935fc56986d607ff5e05d1663970331959c34
    Author: philip <philip@gladstonefamily.net>
    Date:   Fri Feb 26 20:53:27 2016 -0500

        Review comment

    commit 7732fd2d1044f28b8fcf5b0aa0f76d76fe80f449
    Author: philip <philip@gladstonefamily.net>
    Date:   Sat Feb 20 12:10:38 2016 -0500

        Module to handle rotary decoders

        Eliminate ROTARY_DEBUG

        Remove unused file

Eliminate a malloc call

Cleaned up the register code. Now 0x114 bytes

Fix bug with clearing bits in one case

Fix the type in the #define name
2016-02-29 08:21:12 -05:00
vsky fac579fbb8 BME280 - fixing 2 issues
1) Signal incorect reading when the sensor is disconnected.
2) Reset humidity oversampling settings when calling `bme280.startreadout()` - if the sensor is reconnected and readouts are in forced mode there is no need to re-initialize the sensor (`bme280.init()`).
2016-02-27 15:44:15 +01:00
Arnim Läuger 19d3c1d581 Merge pull request #1041 from pjsg/performance
Simple low level performance monitoring tool as a module
2016-02-26 22:20:25 +01:00
TerryE 46ea2aa42e Make the wifi.smart functions options and remove wofs and upgrade
AFAIK no one uses the wifi.startsmart() and wifi.stopsmart().  Removing
them frees up an extra 20-25K of Flash to use as filesystem.  So I have
added a new config define WIFI_SMART_ENABLE which is enabled by default
so the default functionality is the same, but if this is commented out
then this code is omitted.

I have also removed wofs and upgrade from this build as we no longer
support these.
2016-02-26 17:23:38 +00:00
Terry Ellison ef5eed307c Merge pull request #1082 from pjsg/gpio-int
Made level triggers work better than before
2016-02-26 14:18:14 +00:00
philip ad3f267da6 Fix review comments 2016-02-26 09:07:06 -05:00
Johny Mattsson c2bd582c36 Merge pull request #1083 from dnc40085/dev_tmr_lua_state_fix
Fix coroutine incompatibility in tmr module
2016-02-26 18:16:15 +11:00
Johny Mattsson 88369a5bd3 Merge pull request #1072 from TerryE/dev-encoder
Addition of encoder module with base64 and hex encode/decode as per #925
2016-02-26 12:35:02 +11:00
TerryE 8353991722 Update encoder files after #925 & #1072 review comments 2016-02-26 00:44:33 +00:00
philip 72d8c73763 Made level triggers work better than before
Move the level trigger to be after the callback
2016-02-25 08:38:25 -05:00
dnc40085 8e88612276 Fixed issue where timer callback wasn't using the proper lua_state.
This made the timer module incompatible with the lua coroutining module.
2016-02-24 17:56:16 -08:00
Terry Ellison 323d302829 Merge pull request #1068 from TerryE/dev-node-egc
Add node.egc.setmode() + constants as per #609
2016-02-24 23:53:20 +00:00
Arnim Läuger 78e9873d33 Merge pull request #988 from pjsg/mdns
Simple mdns implementation using the Espressif code
2016-02-24 22:54:39 +01:00
dnc40085 9a8edd8ae8 Fix inconsistency between flash_init_data in flash_api.c and
esp_init_data_default.bin in SDK 1.51
2016-02-23 01:22:41 -08:00
philip e516a0e9a2 Performance monitoring tool.
Squashed commit of the following:

commit f1820af82bb5467d0c79c03290fca809b0273030
Author: philip <philip@gladstonefamily.net>
Date:   Sun Feb 21 15:08:31 2016 -0500

    Now uses userdata

commit 74a2298f5f2d2b07097a9501046efb8d4061ec5e
Merge: 4ffab15 716e682
Author: philip <philip@gladstonefamily.net>
Date:   Sun Feb 21 13:54:40 2016 -0500

    Merge remote-tracking branch 'upstream/dev' into performance

    Conflicts:
    	app/platform/hw_timer.c
    	app/platform/hw_timer.h

commit 4ffab15a2a15e0c6b2d7e93611a02be47bafdc79
Author: philip <philip@gladstonefamily.net>
Date:   Fri Feb 12 17:36:12 2016 -0500

    Simple low level performance monitoring tool

    Make it work with the new hw_timer code

commit 944db2bdb8
Author: philip <philip@gladstonefamily.net>
Date:   Sun Feb 14 10:32:41 2016 -0500

    Initial version of the hw_timer as part of the platform

Addressed review comments

Add the binsize return
2016-02-22 08:50:07 -05:00
Adam Bonner 96f905bf81 Crypto-new_hash Improved code based on review in #1037 2016-02-21 21:13:06 -08:00
Adam Bonner 332b53b9db Initial implementation of a chunk capable hash function in crypto module 2016-02-21 21:13:06 -08:00
Arnim Läuger b171ca35ba Merge pull request #1008 from vsky279/bme280
BME280/BMP280 Digital Pressure Sensor module
2016-02-21 20:58:37 +01:00
vsky 6bd0ec4480 BME280/BMP280 Digital Pressure Sensor module 2016-02-21 19:51:08 +01:00
TerryE ffa7ee9b67 Addition of encoder module with bas64 and hex encode/decode as per #925 2016-02-21 04:18:27 +00:00
TerryE 0ef362472c Add node.egc.setmode() + constants as per #609 2016-02-20 19:15:52 +00:00
Arnim Läuger 8743319b02 Merge pull request #1000 from devsaurus/sigma_delta
Add sigma_delta module.
2016-02-20 20:11:42 +01:00
Arnim Läuger e82cb974a6 Merge pull request #1057 from pjsg/hwtimer
Add real hw_timer support and convert the pwm module to use it
2016-02-20 20:05:40 +01:00
Terry Ellison 68919dea65 Merge pull request #1004 from cheloftus/dev
Added crypto.fhash function for hashing files
2016-02-19 20:16:09 +00:00
devsaurus 8982650df9 Add sigma_delta module. 2016-02-18 21:35:58 +01:00
Terry Ellison dc905f080b Merge pull request #1063 from DiUS/fscfg
Add file.fscfg() command for fs location + size.
2016-02-18 08:51:03 +00:00
philip 669543bbf2 Hardware timer support and convert the PWM module to use it 2016-02-17 21:07:33 -05:00
Johny Mattsson 1fd98d9f86 Add file.fscfg() command for fs location + size. 2016-02-18 12:52:40 +11:00
Johny Mattsson 1afa72d53a Merge pull request #1061 from TerryE/dev-task-if
Add New Tasking I/F and rework GPIO, UART, etc to support it
2016-02-18 11:51:27 +11:00
Terry Ellison 16953690bb Merge pull request #902 from Alkorin/ws2812-buffer-1.5
ws2812 strip data buffer
2016-02-17 22:05:47 +00:00
Terry Ellison 4501f655f6 Merge pull request #1050 from jfollas/file-exists
Added file.exists() method
2016-02-17 22:04:09 +00:00
TerryE 49733f6f6d Add New Tasking I/F and rework GPIO, UART, etc to support it
As with the last commit this rolls up the follwowing, but include the various
review comments on the PR.

-   **Documentation changes**. I've added the taks FAQ as a stub new Extension
developer FAQ, and split the old FAQ into a Lua Developer FAQ and a Hardware
FAQ.

-   **Tasking I/F**.  New `app/task/Makefile`, `app/task/task.c`,
`app/include/task/task.h` and `app/Makefile` as per previous commit.  Cascade
changes to `app/driver/uart.c`, `app/include/driver/uart.h`,
`app/user/user_main.c` and `app/modules/node.c`

-   **GPIO Rework** to `app/modules/gpio.c` and `pin_map.[hc]`, `platform.[hc]`
in `app/platform`

-   **Other Optimisations** Move the `platform_*_exists()` from
`app/platform/common.c` to static inline declarations in `platform.h` as
this generates faster, smaller code. Move lgc.a routines out of iram0.
2016-02-17 17:13:17 +00:00
devsaurus c88f0bd3f8 Enable UART baudrate 256000 in platform layer. 2016-02-15 21:40:20 +01:00
Henk Vergonet a1c1e015ff Add i2c based module for am2320 humidity sensor
Example use:
> sda=1
> scl=2
> am2320.init(sda,scl)
> rh, t = am2320.read()
> print(string.format("Temperature: %s degrees C", t / 10))
> print(string.format("RH: %s %%", rh / 10))

signed-off-by: henk.vergonet@gmail.com
2016-02-14 15:12:42 +01:00
jfollas d4ae67d0b4 Changed filename length error handling per TerryE's suggestion 2016-02-13 18:58:04 -05:00
jfollas 44786a22ff Added file.exists() method to save the need to use file.list() for checking file existence 2016-02-13 17:37:04 -05:00
philip 0e9a0d43d4 Direct port of the struct module that provides access to
packed structures in strings. Very useful for network protocol
packing/unpacking. The docs are directly converted from the original.

Review feedback

Fix typo
2016-02-13 08:32:25 -05:00
Marcel Stör 2c687313de Merge pull request #1002 from pjsg/mqtt
Fix memory exhaustion in mqtt under circumstances from issue #975
2016-02-10 12:58:26 +01:00
Marcel Stör 2e37a52aaa Merge pull request #1030 from devsaurus/spi_pinconfig
Enable spi functionality on pins after internal config has been applied.
2016-02-10 07:06:13 +01:00
devsaurus 5d8848ecaf Enable spi functionality on pins after internal config has been applied. 2016-02-09 23:26:40 +01:00
devsaurus dc2e1efefb Extend data type for spi miso/mosi buffer offset to 16 bit. 2016-02-09 22:05:05 +01:00
Arnim Läuger 25585672ae Merge pull request #1014 from urish/patch-1
Fix secure TCP connections for `net` and `mqtt` modules.
2016-02-07 19:51:32 +01:00
Uri Shaked 31a62a9eb1 Fix secure MQTT connections
Call `espconn_secure_set_size()` before calling `espconn_secure_connect()`, similar to how the http module works
2016-02-07 18:11:30 +02:00
Arnim Läuger d760a5e29c Merge pull request #940 from devsaurus/dev-ssd1327
implement architecture dependent delay functions for u8glib
2016-02-06 21:46:01 +01:00
Uri Shaked ce498462f7 Fix secure TCP connections
Call `espconn_secure_set_size()` before calling `esp_secure_connect()`, should fix issues like #710 and #520
2016-02-06 17:12:46 +02:00
cheloftus 58dd15e1d1 Added crypto.fhash function for hashing files 2016-02-05 22:19:00 +00:00
philip c9cf02ba31 Send any queued packets when possible 2016-02-01 22:29:32 -05:00
Johny Mattsson fcb14a33b3 Merge pull request #987 from DiUS/enduser_enhanced
Enhancements to enduser_setup module
2016-02-02 00:39:47 +11:00
Johny Mattsson 86839d6e71 Fixes and enchancements for enduser_setup module.
Fixes:

* Removed spurious \0 bytes being sent to the client in many cases.

* Properly terminated 404 header.

* Now including Content-length: header for index.html (including built-in).

  Clients otherwise had to wait for their own timeout before considering
  the page load complete, which resulting in an unpleasant sluggish
  experience.

* Switched form submission to GET, as iOS sometimes does not include the
  body in the same packet as the POST header, which led to the module
  not finding the form values.

* Added redirect after form submission to avoid blank-page-in-browser.

* Moved common "enduser_setup" prefix to a lua_pushfstring() to reduce
  string literal overhead.

* Replaced cached lua_State* with calls to lua_getstate(), as in other
  modules.

* Fixed broken appending of MAC to the SSID.

* Fixed up macro definitions to not break `if` clauses unintentionally.

Enhancements:

* Support for scanning for available WiFi networks, and picking from the list.

* Support for retrieving the current WiFi station status.

* Added "manual" mode, where the module does not (re)configure the AP setup,
  nor shut down automatically. Default is still automatic, as before.

* Updated docs for new `enduser_setup.manual()` function.
2016-02-01 14:42:24 +11:00
philip 76b28c1f74 Simple mdns implementation using the Espressif code 2016-01-29 21:37:19 -05:00
devsaurus 8db93bcabf make delay optional 2016-01-29 18:52:38 +01:00
devsaurus 3a597f1698 implement architecture dependent delay functions for esp8266 port 2016-01-29 18:52:38 +01:00
devsaurus 1c32d20502 improve error checking in mqtt module
connect(), close(), subscribe(), publish()
2016-01-28 21:36:38 +01:00
Johny Mattsson 9fd215b028 Corrected sprintf() prototype & behaviour. 2016-01-28 17:56:01 +11:00
Johny Mattsson 74d27b3486 Merge pull request #968 from devsaurus/crypto_http_mqtt_lua-gnu11
Enable -std=gnu11 for crypto, http, mqtt, and lua dir
2016-01-28 17:36:27 +11:00
jfollas edbcbe1b0f Fixed issue where default ESP_xxxxxx SSID was appearing for enduser_setup 2016-01-27 10:24:10 -05:00
Johny Mattsson 9741f2c678 Merge pull request #977 from vowstar/fixed-http-1-1
Fix HTTP response bug while server only support HTTP/1.0
2016-01-27 10:51:48 +11:00
Robert Foss 6ef7ece046 Cleaned up APA102 module registration. 2016-01-26 17:14:19 -05:00
Huang Rui 1a20f2eda8 Fix HTTP response bug while server response HTTP/1.0
Signed-off-by: Huang Rui <vowstar@gmail.com>
2016-01-26 16:06:11 +08:00
Robert Foss 0f3c0ffbb0 Added support for the APA102 LED. 2016-01-25 20:54:27 -05:00
Huang Rui 5e2eb3588c Fix redefine bug on some other version SDK(such as espressif's lubuntu environment)
Signed-off-by: Huang Rui <vowstar@gmail.com>
2016-01-25 03:06:18 +08:00
devsaurus cd06905b58 include user_interface.h to avoid implicit decls 2016-01-24 00:22:11 +01:00
devsaurus f149b60c7f enable -std=gnu11 for lua dir 2016-01-24 00:02:27 +01:00
devsaurus b3b50646ef enable -std=gnu11 for mqtt dir 2016-01-23 22:42:55 +01:00
devsaurus 19fda87e33 enable -std=gnu11 for http dir 2016-01-23 22:41:41 +01:00
devsaurus 8befcf0888 enable -std=gnu11 for crypto dir 2016-01-23 22:36:35 +01:00
Johny Mattsson 91b2533aa6 Merge pull request #965 from devsaurus/platform-gnu11
Enable -std=gnu11 for platform and driver dir.
2016-01-24 01:23:27 +11:00
Terry Ellison 85bd7bbeda Merge pull request #951 from Alkorin/ws2812-uart
Rewrite ws2812 serialization code to use UART1 instead of bit-banging.
2016-01-23 10:42:56 +00:00
devsaurus 9f54c8f5d4 enable -std=gnu11 for driver dir with corrected os_printf* decls 2016-01-23 11:22:03 +01:00
devsaurus 0c3fc6cc78 enable -std=gnu11 for platform dir 2016-01-22 23:21:34 +01:00
Arnim Läuger 3b589e2177 Merge pull request #958 from DiUS/modules-gnu11
Enable -std=gnu11 for modules dir.
2016-01-22 23:20:29 +01:00
Johny Mattsson 0cd287e67b Added -Wimplicit to modules build.
Plus associated fixes.
2016-01-22 10:55:57 +11:00
Terry Ellison a4e7885a6e Merge pull request #923 from DiUS/spiffs-alignment-fix-915
Ugly workaround for broken SPIFFS GC alignment.
2016-01-20 09:48:47 +00:00
Johny Mattsson 182d45f928 Enable -std=gnu11 for modules dir.
Plus boat-load of fixes to actually make that build.
2016-01-20 19:40:47 +11:00
Johny Mattsson 5b381d2f1e Added AES support to crypto module.
Merely a wrapper around the (undocumented) internal SDK AES functions.
2016-01-19 15:19:11 +11:00
Thomas Soëte 47b44229bf ws2812 data buffer
To create a size led long buffer:
buffer = ws2812.newBuffer(size);

To fill the buffer:
buffer:fill(g, r, b)

To get a particular led color:
g, r, b = buffer:get(index)

To set a particular led color:
buffer:set(index, g, r, b);

To send the buffer:
buffer:write(pin);
2016-01-18 17:21:08 +01:00
Thomas Soëte 51bb8a50ba Rewrite code to use UART1 instead of bit-banging.
It allows keeping interrupts enabled but force to use GPIO2.
2016-01-18 17:16:18 +01:00
Marcel Stör 82b19c4c37 Merge branch 'newdocs' into dev 2016-01-17 14:23:13 +01:00
Terry Ellison 7e8c54890f Merge pull request #878 from dnc40085/dev_wifi_sta_Xethostname
Add functions: wifi.sta.sethostname and wifi.sta.gethostname
2016-01-15 08:56:37 +00:00
Johny Mattsson 52e121f469 Merge pull request #887 from vowstar/dev-all-in-one
Add HTTP client module and documents.
2016-01-15 17:44:41 +11:00
Johny Mattsson 30f8f62420 Optimized node.bootreason() for size.
Reduces the size from 179 to 102 bytes.
2016-01-15 11:42:20 +11:00
Konrad Beckmann d426976e60 BMP085: bmp085.init() should return 0 2016-01-14 22:23:03 +01:00
philip dc5cc6d9f4 Add the exccause parameter into the bootreason block 2016-01-14 08:16:26 -05:00
Johny Mattsson 2d82e622b6 Merge pull request #890 from vowstar/dev-fix-flash-api
Update flash_api due to flash size map is redefined by espressif.
2016-01-14 17:00:50 +11:00
Johny Mattsson 9772e7cdec Merge pull request #888 from dnc40085/patch-1
Fix problem in wifi.sta.getap where invidual result is lost.
2016-01-14 16:49:20 +11:00
jfollas bf74b617d0 SPI: Implemented CPOL=1
Reference: http://bbs.espressif.com/viewtopic.php?f=49&t=1570
2016-01-13 22:39:15 -05:00
philip dd5dafa99e Merge remote-tracking branch 'jmattsson/tmr-libmain-binpatch150' into sdk1.5.1
Conflicts:
	Makefile
2016-01-13 07:54:27 -05:00
Philip Gladstome 1d9336fb99 Upgrade to SDK version 1.5.1 from Espressif 2016-01-12 21:05:47 -05:00
Johny Mattsson 57917601b7 Expose extended reset info via node.bootreason(). 2016-01-12 17:29:46 +11:00
Johny Mattsson 58427563ed Ugly workaround for broken SPIFFS GC alignment.
Proper fix should be done upstream and pulled in once available.
2016-01-12 17:24:02 +11:00
Johny Mattsson 3fb0de859f Range check the tmr interval value.
Plain SDK 1.5.0 bugs out for values >6871948 or so - this commit does
not do anything to mitigate that.
2016-01-10 18:10:03 +11:00
Johny Mattsson 0b2d90300a Remove left-over cruft regarding Lua mem opt. 2016-01-06 10:38:58 +11:00
dnc40085 c2f2bbd92a Fix problem in wifi.sta.getap where invidual result is lost. 2016-01-03 20:02:50 -08:00
dnc40085 fcbf58cf0d Rewrote wifi_sta_gethostname in wifi module. 2016-01-02 19:43:40 -08:00
dnc40085 b2190e4d7b Added functions: wifi.sta.sethostname and wifi.sta.gethostname and
option to set hostname in user.config.h
2016-01-02 18:34:40 -08:00
dnc40085 cb0a982dc3 Minor change to node module
node.dsleep was using sint32 to hold sleep time when it should be using
uint32
2016-01-02 03:10:27 -08:00
Terry Ellison 2f655deeca Merge pull request #885 from jmattsson/sdk150bin
Upgrade to SDK 1.5.0 + Espressif's Open LWIP 1.5.0.
2016-01-01 22:30:22 +00:00
Huang Rui f2e6c9366b Sync flash_api.c with flash_api.h 2015-12-30 09:49:01 +08:00
Huang Rui 7737d36f24 Update flash_api.h due to flash size map is redefined by espressif. 2015-12-30 09:46:43 +08:00
Huang Rui 88bae3ed22 Remove all version data and combine 33 commits to 1.
Add http module and documention, including fix httpclient bug.
2015-12-29 19:25:37 +08:00
devsaurus 20629386ca fix parameter access for ucg.getStrWidth() 2015-12-28 15:22:09 +01:00
Johny Mattsson a6c0873a28 Upgrade to SDK 1.5.0 + Espressif's Open LWIP 1.5.0.
Removed earlier TCP port randomisation fix - the new SDK has its own fix
even though Espressif told me they wouldn't fix it. Yay?
2015-12-23 11:17:05 +11:00
devsaurus 6cbe716db0 uart: fix parity and stopbit generation 2015-12-21 17:51:43 +01:00
Robert Foss 672c396c69 Fixed compilation error when the enduser_setup module is disabled yet requires ENDUSER_SETUP_AP_SSID to be defined. 2015-12-20 22:50:36 -05:00
Terry Ellison 1462d00e9f Merge pull request #842 from jmattsson/module-ltr-cleanup
Cleanup: LTR module registration
2015-12-19 23:22:18 +00:00
Johny Mattsson 9003d3e8fb Rework NODEMCU_MODULE() to not pull in extra gunk.
Third time lucky. I hope. Hi Terry.
2015-12-18 13:10:48 +11:00
Johny Mattsson 6d82f8da9d Merge pull request #857 from devsaurus/dev-spi_cpol
SPI: cpol=high is not implemented due to insufficient hw docs
2015-12-17 12:57:25 +11:00
Johny Mattsson 7e02935a27 Deal with ld's overly eager discarding of globals. 2015-12-17 12:37:01 +11:00
devsaurus 5e9bf95ccc cpol=high is not implemented due to insufficient hw docs 2015-12-16 22:23:04 +01:00
Terry Ellison 53ee80e3aa Merge pull request #841 from jmattsson/flash-addr-cleanup
Cleanup/minor correction: Flash addr cleanup
2015-12-16 10:53:58 +00:00
Johny Mattsson fd9113124c Corrected the 4-page alignment for start of fs. 2015-12-16 18:59:55 +11:00
Johny Mattsson 4e8ef87d03 Reworked module registration, removed modules.h
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.
2015-12-16 16:09:16 +11:00
TerryE b773290b8c Major cleanup of module registration pass 2.
carrying on Johny's edits as per my comments on #810
2015-12-16 11:21:40 +11:00
Artem Pastukhov 5cb27f89ae Add ImageMagic info. 2015-12-15 09:35:20 +03:00
Artem Pastukhov 6009602382 Some polish 2015-12-14 11:41:10 +03:00
Artem Pastukhov 4b0cec1757 * Add u8glib readme. 2015-12-14 11:34:11 +03:00
Terry Ellison 0386ae6559 Merge pull request #804 from DiUS/panic
Do not allow execution to continue after a PANIC
2015-12-12 15:36:00 +00:00
Johny Mattsson 6b6456be47 Major cleanup of module registration.
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.
2015-12-12 15:03:40 +11:00
Johny Mattsson d84a24fc9a Proper cached-flash to phys address translation. 2015-12-12 13:20:22 +11:00
Johny Mattsson c4e8b04fbf Cleaned up all uses of INTERNAL_FLASH_START_ADDRESS.
There was only one genuine use of this macro, all other places were
using it only as a necessary compensation. While this was fine as long as
it was the first meg of flash which was mapped, it became incorrect and
quite dangerous whenever this assumption did not hold (such as when
running from the second slot in an OTA scenario).

The flash API now uses actual addresses, not translated/mapped
addresses, and the users of this API have been adjusted accordingly.
This makes the flash API work correctly regardless of what flash mapping
is in use.

The old macro is still available under the new name
INTERNAL_FLASH_MAPPED_ADDRESS, and this is used to detect flash writes
where the source is mapped flash (and thus has to be bounced), and to
adjust the _flash_used_end linker symbol when used with
flassh_find_sector() by the filesystem code. The latter usage is not
OTA-proof, but in an OTA scenario the filesystem needs a fixed location
anyway and thus would not use this code path.
2015-12-12 13:20:22 +11:00
Nick Andrew e9ee9a57d1 Remove the lobject.c:88 assertion failures
When lua assertions are enabled, normal operation results in many:

lobject.c:88: (((t1)->tt) == 4)
lobject.c:88: (((t2)->tt) == 4)
lobject.c:88: (((t1)->tt) == 4)
lobject.c:88: (((t2)->tt) == 4)
lobject.c:88: (((t1)->tt) == 4)
lobject.c:88: (((t2)->tt) == 4)

It comes from using the pvalue() macro for 3 pointer types, where
pvalue() also checks the type of pointer and complains through the
assertion where the type == 4 (TLIGHTUSERDATA).

Use the correct macro according to the type of data being compared
to eliminate this assertion error.

Signed-off-by: Nick Andrew <nick@nick-andrew.net>
2015-12-06 01:42:29 +11:00
TerryE e71a2dd64a Fix ECG case in concat where stack top not recalculated 2015-12-03 19:16:30 +00:00
Terry Ellison 32b2911263 Merge pull request #746 from DiUS/vdd33
Remove adc.readvdd33() limitation.
2015-12-01 23:37:53 +00:00
Johny Mattsson e9e2efc443 Merge pull request #794 from btsimonh/btsimonhdev
Added uart.alt(n) to swap to use alternate rx/tx lines.
2015-12-01 21:35:09 +11:00
Johny Mattsson 6acd91810f Merge pull request #776 from askainet/net_dns
Make net.dns.resolve and net.dns work with an IP address as the hostname
2015-12-01 21:24:05 +11:00
Johny Mattsson 0fbf442158 Do not allow execution to continue after a PANIC!
It really does not improve things...
2015-12-01 18:11:38 +11:00
btsimonh b2345857e9 Added uart.alt(n) to swap to use alternate rx/tx lines.
if n = 0 -> std pinout.
if n != 0 -> alternate pinout (gpio13 and gpio15)
2015-11-28 22:51:01 +00:00
Johny Mattsson 33e41a633e Merge pull request #787 from TerryE/dev-onewire
Merge Onewire changes from Master into Dev
2015-11-24 11:05:40 +11:00
Johny Mattsson 455f0f2166 Merge pull request #779 from askainet/sntp_dns
Make sntp.sync work with DNS hostnames
2015-11-24 11:03:37 +11:00
TerryE 583049f620 Merge Onewire changes from Master into Dev
Master contained two OW changes one of which was already reimplemented in dev using the
correct macros.  The second was from hazarkarabay (f6d0c0c) that onewire_search()
returns a device address vector even when no device is found.  I've reimplemented this
but using the correct index, rom_byte_number, rather than declaring a new temp index i.
2015-11-23 01:23:41 +00:00
devsaurus 1c2fad5330 re-add detection of CR as newline 2015-11-22 13:00:40 +01:00
Arnim Läuger b216e6a809 Merge pull request #777 from devsaurus/dev-cr
Skip CR in interactive mode
2015-11-20 22:56:12 +01:00
Terry Ellison 7460f034ea Merge pull request #780 from marcelstoer/dev-order-modules-list
Order modules list alphabetically
2015-11-19 23:47:21 +00:00
Marcel Stör 6674a7d7f9 Add reference to HX711 documentation to source 2015-11-19 22:54:06 +01:00
Marcel Stör 5b00d02bf2 Order modules list alphabetically 2015-11-19 22:48:05 +01:00
Ivan Lopez d96383691f Make sntp.sync work with DNS hostnames 2015-11-19 21:51:33 +01:00
devsaurus 69f3a6f177 skip CR in interactive mode 2015-11-18 22:07:53 +01:00
Ivan Lopez 4ff9e6cc01 Make net.dns.resolve and net.dns work with an IP address host to resolve 2015-11-18 21:22:58 +01:00
Ivan Lopez a272491502 Make net.dns.resolve and net.dns work with an IP address host to resolve 2015-11-18 20:58:33 +01:00
Johny Mattsson 98d0157283 Merge pull request #755 from robertfoss/dev
Added fix from #750, to access the IP of a sender of a UDP packet, to fix SDK 1.4.0 compability.
2015-11-17 17:51:03 +11:00
Johny Mattsson 5a199e6e63 Merge pull request #751 from lukaszo/ct
Allow to set content type in COAP (fix #658)
2015-11-17 12:17:11 +11:00
Robert Foss d19c350ead Added fix from #750, to access the IP of a sender of a UDP packet, to fix SDK 1.4.0 compability. 2015-11-11 23:46:26 -05:00
Johny Mattsson 1e3c231630 Fix esp_init_data_default inconsistencies.
Make ADC vs readvdd33 option user_config.h configurable for the init data,
and made readvdd33 the default.
2015-11-12 12:57:07 +11:00
Johny Mattsson 340edbbe2f Merge pull request #750 from lukaszo/coap-deb
Fix sending CoAP UDP response using new SDK 1.4.0
2015-11-12 10:41:37 +11:00
Łukasz Oleś 3a5e845b29 Allow to set content type in COAP (fix #658) 2015-11-11 12:52:13 +01:00
Johny Mattsson 7ef1711e9a Merge pull request #740 from Alkorin/ws2812
Better timings for WS2812 (measured 345ns/695ns, instead of 340ns/600ns)
2015-11-11 21:09:31 +11:00
Vowstar 63fad194e2 Merge pull request #731 from dnc40085/dev_wifi_sleep_update
Update function wifi.sleep
2015-11-11 17:10:10 +08:00
Łukasz Oleś 982be36aab Fix sending UDP response using new SDK 1.4.0 2015-11-11 00:53:02 +01:00
Terry Ellison ad99c016cd Merge pull request #729 from DiUS/tcp-port-rand
Fix to do TCP port number randomization at boot.
2015-11-10 21:57:01 +00:00
Thomas Soëte 4fd552fcaf Better timings for 160MHz too.
Values measured:
@80MHz:
	T0H: 337ns, Period: 1.274us
	T1H: 687ns, Period: 1.25us

@160MHz:
	T0H: 349ns, Period: 1.262us
	T1H: 700ns, Period: 1.276us
2015-11-10 22:34:44 +01:00
Johny Mattsson dabfe83a7d Unbreak build from #735 merge.
Now with more #ifdef.
2015-11-10 18:48:39 +11:00
Johny Mattsson 27eed629e7 Remove adc.readvdd33() limitation. 2015-11-10 15:30:59 +11:00
Johny Mattsson 7512e628b6 Merge pull request #742 from TerryE/dev-stripdebug
Port of strip debug patch to the SDK 1.4-baseline dev
2015-11-10 12:20:36 +11:00
Johny Mattsson cfae4cdc4e Merge pull request #735 from karrots/mqtt_close_disconnect
mqtt:close() send the DISCONNECT message (fix #673)
2015-11-10 12:08:16 +11:00
Johny Mattsson 382eea5079 Fix building with DEVKIT_0_9 defined.
This got broken in the 1.4.0 overhaul, mea culpa.
2015-11-09 12:15:40 +11:00
TerryE 83d06b667d Port of strip debug patch to the SDK 1.4-baseline dev 2015-11-08 23:46:08 +00:00
Thomas Soëte c2f12a3b05 Better timings for WS2812 (measured 345ns/695ns, instead of 340ns/600ns) 2015-11-08 22:45:12 +01:00
Antoine b2167bdf3a mqtt:close() send the DISCONNECT message (fix #673) 2015-11-06 07:32:04 -07:00
dnc40085 51046fd78b Minor change to wifi.sleep
Remove unnecessary code
2015-11-06 05:10:24 -08:00
Jens Jensen c39d317b2b Fix mqtt connection closing when not publishing (fixes #359)
should not reset keep_alive_tick when receiving as this can prevent
sending keepalive (PINGREQ), which can result in server disconnect.
2015-11-05 20:21:53 -07:00
Johny Mattsson 5d28de8595 Merge pull request #722 from TerryE/luac-cross.2
Moving luac cross from master to dev
2015-11-06 09:49:38 +11:00
dnc40085 5e95f48a55 Update function wifi.sleep to return any error codes to user 2015-11-05 13:51:42 -08:00
Johny Mattsson f82415f6b9 Fix to do TCP port number randomization at boot.
This addresses the issue where a server would otherwise reject a valid
connection attempt from a rebooted node, due to the server thinking that
packet belonged to a recently closed session. By starting off the local
TCP port numbers at random* points each boot the risk of port reuse
across a reboot is significantly reduced.

*) As random as can be had via the lower 12 bits of the ccounter.
2015-11-05 14:40:57 +11:00
Vowstar 3da57dc85c Merge pull request #725 from dnc40085/dev_wifi_toggle
Add function wifi.sleep
2015-11-05 10:07:32 +08:00
dnc40085 75849f79ab Fix compiler warning in tmr.c
Fix compiler warning: implicit declaration of function 'system_soft_wdt_feed'
2015-11-04 17:55:09 -08:00
dnc40085 91ba22a49d Minor change
Added static keyword to a variable
2015-11-04 06:37:57 -08:00
dnc40085 d6cc6d3e68 added wifi table entry for NULLMODE 2015-11-03 18:06:41 -08:00
Johny Mattsson 5c1c51642e Fix newly introduced incorrect WDT feeding. 2015-11-04 12:46:37 +11:00
dnc40085 4387f90339 Added function wifi.sleep 2015-11-03 17:23:43 -08:00
TerryE 0beee5c1ae Minor tweaks to luac.cross for SDK 1.4 support
plus Add extra logic to handle different loci path in luac.cross
for handling 32 bit or great hex integers Also add a helpfull hint in the
build tool to point out the Lua and lfs depencencies.
2015-11-03 22:45:43 +00:00
TerryE 307323d1ff Add luac.cross capability to nodeMCU 2015-11-03 21:37:14 +00:00
TerryE a08626d84f Add minimum debug library providing traceback() and getregistry() functions 2015-11-03 21:34:42 +00:00
kvakanet e2dd98ba10 Update mqtt.c fix for #679
Patch for  "mqtt LWT qos and retain parameters are parsed incorrectly #679"
2015-11-02 20:14:43 -07:00
Vowstar 95e2bbb0f0 Merge pull request #688 from karrots/mqtt-puback-fix
Fix for MQTT PUBACK loop
2015-11-01 14:34:12 +08:00
Vowstar a38fbdbf51 Merge pull request #713 from christakahashi/hx711-support
Added support for the hx711 load cell ADC.
2015-11-01 14:31:12 +08:00
Vowstar 3e0a3e992e Merge pull request #717 from karrots/feature/baudrate_define
Add #DEFINE to user_config.h to enable easier bit rate selection.
2015-11-01 14:30:57 +08:00
Jonathan karras 66e65bd3c1 Add #DEFINE to user_config.h to enable easier bit rate selection. 2015-10-31 19:47:11 -06:00
chris dffbfacd46 most users won't need this so it should be off be default 2015-10-30 23:31:45 -07:00
Jonathan karras 57c2e6eacd Fix for MQTT PUBACK loop
Conflicts:
	app/modules/mqtt.c
2015-10-29 20:02:08 -06:00
devsaurus 52d6be5299 Merge pull request #705 from devsaurus/dev-fdplx
Update full-duplex for SPI module
2015-10-28 23:36:39 +01:00
devsaurus 9444ae28df simplify spi api
duplex_mode configuration enables/disables receiving with spi.send()
spi.send_recv removed
2015-10-27 23:30:33 +01:00
Vowstar 38b494c07e Merge pull request #702 from devsaurus/dev-fdplx
Add full-duplex support to SPI module
2015-10-27 14:34:13 +08:00
Johny Mattsson b535be7ab8 Fix WDT resets during file.format().
With the new SDK soft-wdt it is no longer sufficient to tickle the hardware
watchdog, so all (found) instances have been changed to system_soft_wdt_feed().
2015-10-27 14:33:22 +11:00
devsaurus 0ba0370b87 fix construction of table 2015-10-26 22:40:11 +01:00
devsaurus d46bc5cc1f align spi_recv to platform_spi_send_recv 2015-10-26 22:39:33 +01:00
devsaurus 7d77398921 introduce full/half duplex transactions and add spi.send_recv() 2015-10-25 22:58:06 +01:00
devsaurus c223ecfe5f Merge pull request #693 from devsaurus/dev-hspi_apiext
Extend SPI module API with improved transaction handling
2015-10-21 22:33:08 +02:00
devsaurus 75488639eb make spi.send() transparent for 32 bit data
accept negative values as u32
2015-10-19 23:01:59 +02:00
devsaurus 7ac9a46c40 support secure connection based on CLIENT_SSL_ENABLE 2015-10-18 23:04:40 +02:00
devsaurus a6eb5ccb80 improved default handling of clock_div and databit length 2015-10-18 11:37:17 +02:00
devsaurus 26f4bc7957 ensure backwards compatibility of exising api functions 2015-10-18 11:13:57 +02:00
devsaurus 19092712e5 remove obsolete spi_mast_send and rename platform_spi_send 2015-10-18 11:13:56 +02:00
devsaurus 28a04cc9c1 remove obsoleted constants for databit length 2015-10-18 11:13:56 +02:00
devsaurus f238673772 rework of (H)SPI API 2015-10-18 11:13:55 +02:00
devsaurus 9cde0bbb83 add SPI transaction support 2015-10-18 11:13:55 +02:00
aeprox 5ab8de34e7 Fix adc.readvdd33
Replace undocumented readvdd33 function with SDK function system_get_vdd33
2015-10-17 15:47:17 +02:00
Vowstar 340ef8fc0a Merge pull request #636 from karrots/mqtt-clean-session
Added mqtt clean session support.
2015-10-17 20:58:06 +08:00
Johny Mattsson 8fba0f47de Make UDP server work again after 1.4.0 API changes. 2015-10-15 12:14:27 +11:00
Johny Mattsson afdd9430e0 Removed old lwip include file. 2015-10-12 15:57:24 +11:00
Johny Mattsson f54264669b Fixed includes after LWIP 1.4.0 upgrade. 2015-10-12 14:31:52 +11:00
Johny Mattsson 5d5be35633 Upgraded LWIP to 1.4.0 released from Espressif.
Plus directly provided patch for user_interface.h.
2015-10-12 14:31:04 +11:00
Johny Mattsson 711d464a2b Re-enabled open source LWIP. 2015-10-12 13:26:05 +11:00
Johny Mattsson a161f882ae Espressif-provided fix for open source LWIP on 1.4.0. 2015-10-12 13:26:05 +11:00
Johny Mattsson dec159bce1 Support for fixing the filesystem location.
To assist with testing new SDK.
2015-10-12 13:26:05 +11:00
Johny Mattsson bf8ed500bf Moved node.key() & node.led() support into node module.
It was piggybacking on the Lua readline timer which no longer exists.

Also cleaned up injection of Lua commands via CoAP & node.input().
2015-10-12 13:26:05 +11:00
Johny Mattsson fe6289a6c2 Switch Lua input to event driven instead of polled.
The Lua input timer has been the thorn in the side which prevents a lot of
potential sleeping, unnecessarily.
2015-10-12 13:26:05 +11:00
Johny Mattsson 67a711931a Switch to SDK LWIP until issues with the open one can be resolved. 2015-10-12 13:26:05 +11:00
Johny Mattsson e905c24dcc Removed unsused, now incompatible SSL code. 2015-10-12 13:26:05 +11:00
Johny Mattsson 21c4e11020 Enable dynamic build dates, plus print SDK version. 2015-10-12 13:26:05 +11:00
Johny Mattsson 30380f6cff Further cleanup of ld directory.
Renamed the main linker script to make it clear it is customised for NodeMCU
and not to be confused with the standard linker SDK linker scripts.

Changed to using the eagle.rom.addr.v6.ld file from the SDK.
2015-10-12 13:26:04 +11:00
Johny Mattsson 7d0b13df81 Bumped version string to stop confusing myself. 2015-10-12 13:26:04 +11:00
Johny Mattsson 8bdde6e28d Sorted out linker scripts & options.
Now boots to Lua prompt, but promptly reboots itself before input.
2015-10-12 13:26:04 +11:00
Johny Mattsson 91ee5c088c Wifi module update to new smartconfig API.
Needs testing.
2015-10-12 13:26:04 +11:00
Johny Mattsson 38cc84d2fc Removed gpio pulldown references.
The ESP never supported internal pulldowns, and the SDK now matches reality.
2015-10-12 13:26:04 +11:00
Johny Mattsson f1552605d9 Change os_update_cpu_freq... to ets_update_cpu_freq...
Again, the os_xxx version has been removed from the SDK.
2015-10-12 13:26:04 +11:00
Johny Mattsson d2ac5f1712 Changed os_intr_xxx to ets_intr_xxx.
The os_intr_xxx macros no longer exist in the SDK.
2015-10-12 13:26:04 +11:00
Johny Mattsson 3b9a42e254 Updated #includes to work on new SDK.
Both "c_types.h" and "lwip/ip_addr.h" don't get included indirectly anymore.
2015-10-12 13:26:04 +11:00
Johny Mattsson cc220d9201 Moved TEXT_SECTION_ATTR macro to its own header. 2015-10-12 13:26:04 +11:00
Johny Mattsson 8dff84e0a2 Missing file from the LWIP upgrade/import. 2015-10-12 13:26:04 +11:00
Johny Mattsson c674d191e4 Upgraded open-source LWIP.
From Espressif's lwip_open_src_template_proj_for_v1.3.0.zip
2015-10-12 13:26:04 +11:00
Johny Mattsson c1cd58e096 Build using 1.4.0 SDK + remove old SDK includes/libs.
Leaving the linker scripts intact for now, as they're quite customised.
2015-10-12 13:00:38 +11:00
chris 140bcee2e0 comment cleanup 2015-10-08 20:44:19 -07:00
chris cf079fa333 Basic hx711 functionality 2015-10-08 20:34:24 -07:00
devsaurus 093a895980 Merge pull request #678 from devsaurus/dev-hspi_clockdiv
Add divider for arbitrary HSPI clock frequencies, resolves #674
2015-10-06 21:05:17 +02:00
Johny Mattsson 5e19b8488f Merge pull request #644 from robertfoss/enduser_setup
Added ENDUSER_SETUP module.
2015-10-05 19:18:18 +11:00
devsaurus 4cf5f37450 address SPI_CLKDIV_PRE requirements
* respect N-1
* avoid range overflow
2015-10-04 16:57:50 +02:00
devsaurus ac50f9c6a5 add divider for arbitrary HSPI clock frequencies 2015-10-04 00:40:21 +02:00
Robert Foss 8683ea4f1b Fixed previous POST patch. Also cleaned up HTTP request handling. 2015-10-01 14:22:45 -04:00
Robert Foss 90f770412d Switched from HTTP GET to HTTP POST. 2015-09-30 14:11:43 -04:00
Robert Foss ee82b2ad12 Moved SSID define to user_config.h 2015-09-30 13:24:18 -04:00
Robert Foss 721fadfd14 Changed SSID to be suffixed by MAC. 2015-09-27 14:02:25 -04:00
Robert Foss a15097659b Disabled enduser_setup module 2015-09-19 15:22:01 -04:00
Robert Foss cd85e50e73 Added support for connected, error and debug callbacks. 2015-09-19 15:06:56 -04:00
devsaurus a6c9ba8004 disable UCG module per default 2015-09-17 22:43:59 +02:00
devsaurus 154b456f11 extend ucg example with ST7735 display 2015-09-17 22:37:31 +02:00
devsaurus db1162015d prefix local routines in ucg_polygon 2015-09-17 21:53:49 +02:00
devsaurus a2bca463a0 establish parametrization via ucg_config.h 2015-09-17 21:53:48 +02:00
devsaurus fde4843a75 implement all remaining function bindings 2015-09-17 21:53:48 +02:00
devsaurus f0d581223f UcgLogo example - fix drawGlyph and drawString 2015-09-17 21:53:48 +02:00
devsaurus 5c93ba017e finish GraphicsTest.lua 2015-09-17 21:53:48 +02:00
devsaurus ac1b5a1173 extend ucg module 2015-09-17 21:53:48 +02:00
devsaurus 75041a32b5 initial setup of ucg module
Hello World example is working
2015-09-17 21:53:48 +02:00
devsaurus 9b384b4bda fix u8g->ucg prefix 2015-09-17 21:53:48 +02:00
devsaurus 0f1a168525 add ucg module 2015-09-17 21:53:48 +02:00
devsaurus 6dc0dfc068 import ucglib v1.3.3
https://github.com/olikraus/Ucglib_Arduino
2015-09-17 21:53:47 +02:00
Robert Foss 8982d370f2 Removed #define for forcing storage on flash 2015-09-17 14:30:46 -04:00
Jonathan Karras 5161081c1c Updated comment for mqtt.client parameters. 2015-09-15 23:11:20 -06:00
Robert Foss 3d5c54cef7 Moved all debug prints into the NODE_DEBUG macro. 2015-09-14 18:43:09 -04:00
Robert Foss 3a05c3e402 Moved CONST data to occupy flash, and remove storage instructions for functions. 2015-09-12 12:07:53 -04:00
Robert Foss e2ada487f3 Added ENDUSER_SETUP module.
The module will start a SoftAP, DNS, HTTP server acting as a captive portal.
The portal will have the SSID SetupGadget and will serve a website where
credentials for the end users WLAN can be submitted.

Once valid credentials have been submitted and used to connect to the
local WLAN this module will stop.

This module requires USE_DNS to enabled in dhcpserver.h
2015-09-10 18:40:39 -04:00
Jonathan karras 524cec539f Added mqtt clean session support. 2015-09-05 12:54:13 -06:00
Jakub 52ef3c9102 Fixed bug WIFI AUTH_OPEN #623
Fixed a bug which prevented from setting unprotected AP
2015-08-31 17:53:38 +02:00
aeprox 537cd68078 Made device package and address configurable at runtime 2015-08-23 15:59:49 +02:00
aeprox 0f6a0c59a1 Documentation update 2015-08-23 14:52:15 +02:00
aeprox fd93a09a88 Code formatting fixes 2015-08-23 02:29:52 +02:00
aeprox 0caf745d8e Improve lua API interface 2015-08-23 01:42:39 +02:00
aeprox 29ee02f680 Revert version change 2015-08-22 22:34:54 +02:00
aeprox 4df5d5c166 Fix channel1 reading
Give sensor more time to integrate (400ms => 404ms)
2015-08-22 21:43:29 +02:00
aeprox 7095c42477 Attempt to fix reading of registers 2015-08-22 21:19:27 +02:00
aeprox 159e9c6ace make modulename lowercase 2015-08-22 17:55:07 +02:00
aeprox d1758aee1b return correct number of variables 2015-08-22 17:54:26 +02:00
aeprox 483dbebe24 Return error when calling functions before init
TSL2561_ERROR_NOINIT
2015-08-22 14:26:42 +02:00
aeprox 335ea87964 Glue to integrate with nodeMCU
makefiles etc
2015-08-22 14:25:47 +02:00
aeprox 223a1c8b86 Small change 2015-08-22 12:46:53 +02:00
aeprox 6cb90ea924 First commit 2015-08-22 00:15:28 +02:00
Johny Mattsson 346251dca6 1-Wire power fix, by Thomas Shaddack. 2015-08-20 11:09:12 +10:00
Konrad Beckmann 1287a8cdd6 BMP085: Fix B5 calculation
B5 was calculated with some precision loss before.
2015-08-16 11:57:12 +02:00
Vowstar 40111c1046 Merge pull request #600 from devsaurus/dev-node_compile
Add write error detection in node_compile()
2015-08-11 09:36:35 +08:00
devsaurus d0e6ab38df add write error detection in node_compile() 2015-08-11 00:08:49 +02:00
devsaurus ca1bc2cb18 clean u8g 2015-08-09 16:38:08 +02:00
devsaurus 02294955c5 Merge remote-tracking branch 'upstream/dev' into dev 2015-08-05 21:55:35 +02:00
devsaurus 9d8c3a7b82 fix u8g device destructor
don't free unallocated memory
2015-08-05 21:52:56 +02:00
Vowstar ad49c5dd3b Merge pull request #589 from kbeckmann/pr_bmp085
Implemented BMP085 module
2015-08-05 23:21:03 +08:00
Vowstar d97d7df8ec Merge pull request #588 from robertfoss/dev
Use #if instead of #ifdef.
2015-08-05 23:20:38 +08:00
Vowstar a1bb3a6ad8 Merge pull request #586 from DiUS/ram-saving
Reclaim ~1.5k RAM by tuning down SPIFFS cache, use dynamic DNS table names
2015-08-05 23:19:24 +08:00
Johny Mattsson 00527237f9 Remove now-unnecessary alignment constraints in SPIFFS.
With platform_s_flash_read() now properly handling unaligned destination
buffers, there is no need to shim SPIFFS any more.
2015-08-04 16:30:58 +10:00
Johny Mattsson 9f9b323fb5 Ensure flash write bounce buffer is used if source is also flash.
When using the flash write API, the flash is unmapped/uncached, and as
such it's not possible to source data directly from flash (e.g. string
literals).
2015-08-04 16:30:54 +10:00
Bernd Meyer 1259f8d776 Deal with unaligned destination parameter to flash read
(Occurs e.g. when SPIFFS cache is disabled.)

Implementation mirrors the existing handling in the write path.
2015-08-04 16:30:46 +10:00
Konrad Beckmann 0b28056959 Implemented BMP085 module 2015-08-03 17:07:56 +02:00
Robert Foss 579dc27ee0 Use #if instead of #ifdef. 2015-08-03 01:09:49 +02:00
zeroday c19596cae8 Merge pull request #581 from robertfoss/dev
Added USE_DNS define.
2015-08-02 23:40:37 +08:00
zeroday 53a035411e Merge pull request #584 from DiUS/cjson-lua-mem-wrap
Improvements to cjson memory handling, Note that when cjson fails a memory allocation, it leaks a bit of memory, it's possible to detect that it did fail, and schedule a restart.
2015-08-02 23:38:13 +08:00
Johny Mattsson 125db6595d Use dynamic memory for DNS table names, saving ~1k RAM. 2015-07-31 18:15:18 +10:00
Johny Mattsson 4a47813e20 Reduced SPIFFS cache, freeing ~0.5k RAM.
Also made the cache on/off configurable via user_config.h. Uncached writes
are not a very good idea, but for read-only deployments a further ~0.5k RAM
can be gained by disabling the cache.

Tweaked the file.read() workhorse to read large chunks at a time rather
than use getc(), to compensate for potential unavailability of cache.
2015-07-31 18:15:18 +10:00
Johny Mattsson b583af94a5 Fixed long key bug in HMAC calculation. 2015-07-31 14:11:09 +10:00
Johny Mattsson eae72699d0 Fixed broken linear growth allocation in cjson. 2015-07-31 13:17:05 +10:00
Bernd Meyer 595509a7f3 More sensible cjson realloc strategy. 2015-07-31 11:36:46 +10:00
Johny Mattsson 719abca418 Stop cjson from killing the node on out-of-mem. 2015-07-31 11:36:46 +10:00
Robert Foss 1b8e015f33 Removed some whitespace. 2015-07-28 16:34:25 +02:00
Robert Foss 5822d4c4ed Add define for advertising DNS in the DHCP OFFER message. 2015-07-28 16:32:38 +02:00
Vowstar 00e1e6bcbe Merge pull request #572 from devsaurus/dev
Upgrade u8g module and add display bindings
2015-07-26 22:55:52 +08:00
devsaurus f4f62fb255 fix display table construction 2015-07-21 20:37:44 +02:00
devsaurus 6fd106afac added more displays:
sh1106_128x64_i2c
    ssd1306_64x48_i2c
    ssd1309_128x64_i2c
    ssd1327_96x96_gr_i2c
    uc1611_dogm240_i2c
    uc1611_dogxl240_i2c
    ld7032_60x32_hw_spi
    pcd8544_84x48_hw_spi
    pcf8812_96x65_hw_spi
    sh1106_128x64_hw_spi
    ssd1306_64x48_hw_spi
    ssd1309_128x64_hw_spi
    ssd1322_nhd31oled_bw_hw_spi
    ssd1322_nhd31oled_gr_hw_spi
    ssd1325_nhd27oled_bw_hw_spi
    ssd1325_nhd27oled_gr_hw_spi
    ssd1327_96x96_gr_hw_spi
    ssd1351_128x128_332_hw_spi
    ssd1351_128x128gh_332_hw_spi
    ssd1351_128x128_hicolor_hw_spi
    ssd1351_128x128gh_hicolor_hw_spi
    ssd1353_160x128_332_hw_spi
    ssd1353_160x128_hicolor_hw_spi
    st7565_64128n_hw_spi
    st7565_dogm128_hw_spi
    st7565_dogm132_hw_spi
    st7565_lm6059_hw_spi
    st7565_lm6063_hw_spi
    st7565_nhd_c12832_hw_spi
    st7565_nhd_c12864_hw_spi
    uc1601_c128032_hw_spi
    uc1608_240x128_hw_spi
    uc1608_240x64_hw_spi
    uc1610_dogxl160_bw_hw_spi
    uc1610_dogxl160_gr_hw_spi
    uc1611_dogm240_hw_spi
    uc1611_dogxl240_hw_spi
    uc1701_dogs102_hw_spi
    uc1701_mini12864_hw_spi
2015-07-20 23:11:13 +02:00
devsaurus b837726013 simplify device/display macros 2015-07-20 22:07:59 +02:00
devsaurus 05e3267f24 update to u8glib 1.18.1 2015-07-19 23:22:50 +02:00
devsaurus 8bd3d7d2bf introduce lua_api_name parameter when building the display table
keeps the API as before and gets rid of hw_spi vs sw_spi topics
2015-07-19 21:57:14 +02:00
Johny Mattsson 8d68ad7e15 Updated SPIFFS to 0.3.2, plus alignment fix. 2015-07-17 13:40:55 +10:00
devsaurus 1bc156e4d1 move display constructors into template-based functions
+ uniform generaration
+ addition of further displays
- slight unneccesary heap allocation when display drivers are included but not used
2015-07-16 23:23:43 +02:00
devsaurus 02d473dab0 revert local changes to u8glib 2015-07-16 21:31:00 +02:00
Vowstar 239008d5b9 Merge pull request #553 from nodemcu/dev096
Merge Dev096 to Dev
2015-07-14 15:02:37 +08:00
dnc40085 0020c1d167 added code to check if in softap mode before continuing event monitor
callback
2015-07-13 22:12:16 -07:00
dnc40085 be79d1d3b6 added wifi station event monitor 2015-07-13 21:13:26 -07:00
Konrad Beckmann 6538d22d1f Improved ws2812 implementation
- Fixes the "first led problem" (#534 #487).
- Adds support for 160MHz mode.
- Optimized timings. Time to write pixels is reduced by about 25%
  This is useful when having a large amount of chained LEDs (>500).
2015-07-12 13:43:33 +02:00
Vowstar 98b2bffa75 Merge pull request #545 from DiUS/rtc
RTC and advanced timekeeping
2015-07-11 12:17:51 +08:00
Johny Mattsson dd38a0a0e6 Imported reworked rtctime support. 2015-07-10 16:16:25 +10:00
Johny Mattsson 09410d55c6 Added SNTP module, for easy time sync.
Integrates with the rtctime component if it's available.
2015-07-10 15:12:31 +10:00
Johny Mattsson 67e72c45df Imported RTC FIFO component + added Lua interface.
The rtcfifo module uses RTC memory to store sensor samples across deep-sleeps,
making it possible to batch up samples for less frequent uploads. This
component uses 9 RTC memory slots for control, and a variable number of
slots for sample storage (see rtcfifo.prepare() on how to control the
size/location of the latter).

When used together with the rtctime module, it also exposes the convenience
function rtcfifo.dsleep_until_sample() which can be used to easily take
readings on a regular basis without having to manually take into account
time spent awake to get an accurate sleep time.

The format used for storing samples is quite dense, and allows for 16 bits
of data in a fixed point format (per sample).
2015-07-10 15:12:31 +10:00
Johny Mattsson 2187424928 Imported RTC+sleep timekeeping from an internal DiUS project.
Added Lua module rtctime to interface with it.

This keeps as accurate time as is possible on the ESP8266, including across
deep sleeps (provided rtctime.dsleep() is used rather than node.dsleep()).
Intended to be used together with NTP for high accuracy time keeping. The
API is via rtctime.{get,set}timeofday(), working from Unix epoch.

Note that 160MHz CPU clock is not currently supported by the rtctime code,
as it is only aware of the 52MHz boot clock and the regular 80Mhz default
clock.

See rtctime.h for detailed info on how this all works.
2015-07-10 15:12:31 +10:00
Johny Mattsson 1a613effeb Imported RTC access from a DiUS internal project.
Added Lua access module named "rtcmem" for read/write of RTC user module.
2015-07-10 15:10:15 +10:00
Johny Mattsson 6ad2666182 Declare wifi.ap.getconfig() in the right map. 2015-07-10 14:01:38 +10:00
vowstar 67d785ffec Restore default data and init data before system restore. 2015-07-04 04:27:59 +08:00
vowstar b6e431ebed Merge branch 'dev' of https://github.com/nodemcu/nodemcu-firmware into dev 2015-07-04 03:55:02 +08:00
vowstar 89aaf475d0 Add node.restore().
If NodeMCU can't connect Wi-Fi, please use it.
After reboot, all will be OK.
RESTORE ITEMS:
wifi_station_set_auto_connect, wifi_set_phy_mode, wifi_softap_set_config,  wifi_station_set_config, wifi_set_opmode.
2015-07-04 03:54:22 +08:00
Vowstar f5938dfe17 Will made some modules default off.
Need discussion. And turn off some modules by default.
May our community should build more version?
2015-07-04 02:51:41 +08:00
Vowstar 5279dc9dfc Merge pull request #525 from kbeckmann/ws2801_disable_default
Disabled WS2801 module
2015-07-04 02:48:44 +08:00
vowstar 2224f24dad Merge branch 'dev096' of https://github.com/nodemcu/nodemcu-firmware into dev 2015-07-04 02:31:15 +08:00
vowstar 638bf7b023 Merge branch 'dev' of https://github.com/nodemcu/nodemcu-firmware into dev 2015-07-04 02:28:31 +08:00
vowstar fb0e4722b8 Fix and support Wi-Fi smart link (esp-touch and air-kiss).
Espressif open-source android and iOs APP,
See also https://github.com/espressifapp
Note: Must use ESP-TOUCH-V021 in espressif app history.
2015-07-04 02:27:51 +08:00
Konrad Beckmann 485e5a3140 Disabled WS2801 module 2015-07-03 12:35:47 +02:00
Konrad Beckmann 3d3c2431b3 Added WS2801 support 2015-07-02 00:50:26 +02:00
Vowstar 125d2173d6 Merge pull request #519 from md5crypt/tmr_module
rewrote the timer module from scratch
2015-06-30 15:50:08 +08:00
Luna 2691383696 added tmr.interval 2015-06-29 23:15:30 +02:00
Luna c1d2eb413b rewrote the timer module from scratch 2015-06-29 21:19:24 +02:00
Vowstar aa710d1f53 Merge pull request #513 from NodeUSB/dev096
update 433MHz transmission comment, add static ICACHE_FLASH_ATTR flag
2015-06-28 14:55:07 +08:00
Mike Wen 66ca7f6aca update 433MHz transmission comment, add static ICACHE_FLASH_ATTR flag 2015-06-27 18:14:24 -04:00
Mike Wen cf72a3203d update 433MHz transmission doc, add static ICACHE_FLASH_ATTR flag 2015-06-27 14:42:39 -04:00
vowstar dce0d2c2a8 Release build 20150627.
fixed ap/station-ap cannot connect to the device.
added wifi.ap.getconfig().
fixed net.dns.getdnsserver().
added new base64 lua example.
added node.bootreason() to inspect boot cause.
optimization of u8g.
2015-06-27 15:21:48 +08:00
vowstar 663158e4ab added wifi.ap.getconfig() by @md5crypt https://github.com/nodemcu/nodemcu-firmware/pull/500/files#diff-81824fe90d00138d98b6e9f0d7d8c7dcL1458. 2015-06-27 12:30:36 +08:00
vowstar a32df17579 Fixed net.dns.getdnsserver() by @md5crypt. 2015-06-27 12:26:24 +08:00
Vowstar 2ab4de9c09 Merge pull request #512 from jmattsson/boot-reason
Expose boot reason in Lua
2015-06-27 11:25:35 +08:00
Johny Mattsson 7bd10e8a17 Added node.bootreason() to inspect boot cause. 2015-06-27 12:34:03 +10:00
Johny Mattsson b5c6a5b1c6 Stop dhcpserver from writing to const data. 2015-06-27 12:12:21 +10:00
Vowstar d507060ecf Merge pull request #509 from devsaurus/dev-irom0
Unify memory section usage for u8g
2015-06-27 00:04:46 +08:00
vowstar dda121e5e0 Release 0.9.6-dev_20150625 2015-06-26 18:32:46 +08:00
devsaurus 277c6d0116 move u8g progmem constants to new .rodata sections
this simplifies the overall memory handling based on the irom support by @jmattsson
2015-06-25 00:38:11 +02:00
Luna 5ca807d7a1 fixed net.dns.getdnsserver() and added wifi.ap.getconfig() 2015-06-24 22:38:37 +02:00
Johny Mattsson b0f9788a6d Move constants to ROM. Frees up 16k+ of RAM.
Accessing 8bit and 16bit constants from ROM rather than RAM comes with a
performance cost, as these loads go through the load/store exception
vector. Any performance critical constants can be forced back into RAM
as RAM_CONST_ATTR.

The entry point has changed from call_user_start() to user_start_trampoline()
in order for the exception handler to be installed early enough.
2015-06-23 15:41:14 +10:00
Johny Mattsson 0c924e56c6 Support for loading sub-32 wide data from irom. 2015-06-23 15:41:14 +10:00
MarsTechHAN 04c03b00ae @jorgempy We change the API of DNS callback format back
Make the net api universe  Callback Format -> function(conn,ip)
2015-06-20 19:10:01 +08:00
vowstar 75c3cf29c2 Disable interrupts while communicating with DHTxx. 2015-06-20 02:08:20 +08:00
Vowstar 90ca92ca6e Revert "Merge dev to dev096" 2015-06-20 01:50:29 +08:00
vowstar 3430e5f826 Add __attribute__((optimize("O2"))) to ws2812 module. 2015-06-20 01:40:45 +08:00
vowstar cda7992c1a Fix DHTLIB bug of DHT22, DHT21, DHT33, DHT44. 2015-06-20 00:26:59 +08:00
vowstar c56659e84d Using __attribute__((alias("dht_read"))) reduce code size. 2015-06-19 01:05:19 +08:00
vowstar 87341547d7 Update DHTlib, supported DHT11 or DHTxx automatic detection.
Using @MarsTechHAN 's method.
New usage:
status, temp, humi, tempdec, humidec = dht.read( id )
print( dht.read( id ) )
= dht.read( id )
2015-06-18 20:53:52 +08:00
vowstar 98a2c9fdb6 Align all TAB=8 in app/Makefile, make sure it fit for github display. 2015-06-18 17:36:27 +08:00
vowstar af56aea1e8 Update dhtlib api, support both integer and float version. 2015-06-18 17:19:55 +08:00
vowstar 899935e60b Add DHT Lua Module for interfacing with the DHTxx sensors (xx = 11-21-22-33-44). 2015-06-18 16:31:40 +08:00
vowstar 515a7bf1ab Add dhtlib for DHT11/21/22/33/44, port from Arduino. 2015-06-17 16:30:12 +08:00
Orgmar b0a4e4d3e9 Changed BUILD_DATE. 2015-06-17 00:16:57 +08:00
Mike Wen d955c8815b add 433MHz transmission 2015-06-11 18:07:16 -04:00
Mike Wen 7df0a45b07 add 433MHz transmission 2015-06-11 18:05:27 -04:00
Mike Wen a8622795a7 add 433MHz transmission 2015-06-11 18:05:18 -04:00
Vowstar 8044014f96 Merge pull request #471 from nodemcu/dev
Merge dev into dev096
2015-06-08 14:04:28 +08:00
cal 9dc71cfec0 Trying to fix
Problem with multiple MQTT subscriptions #459
	https://github.com/nodemcu/nodemcu-firmware/issues/459

Fix possible wrong buffer pointer increment.
2015-06-07 12:45:55 +02:00
Vowstar ef4e6fa95f Merge pull request #467 from DiUS/newcrypto
Crypto module improvements
2015-06-05 13:01:38 +08:00
Johny Mattsson 7867fd083c Move crypto things to irom0.text segment.
This releases 1168 bytes back to the heap.
2015-06-05 13:03:08 +10:00
Johny Mattsson 223a936779 Switched crypto module to use ROM SHA1/MD5.
Also disabled MD2 support by default (see MD2_ENABLE in user_config.h).
2015-06-05 12:12:24 +10:00
cal fdcb982351 Trying to fix
Problem with multiple MQTT subscriptions #459
	https://github.com/nodemcu/nodemcu-firmware/issues/459

Fix possible wrong buffer pointer increment.
2015-06-04 11:46:20 +02:00
HuangRui 3cd5a6a1ed Merge branch 'master' of https://github.com/bruceme/nodemcu-firmware into dev
Conflicts:
	app/modules/net.c
2015-06-04 15:04:12 +08:00
Johny Mattsson d855584bae Fixed off-by-one error from refactoring. 2015-06-03 17:20:55 +10:00
Johny Mattsson 06724fbb17 Renamed SHA2 support option to SHA2_ENABLE per request. 2015-06-03 11:20:16 +10:00
Johny Mattsson 2d1e69151e Extended Lua crypto module with hash & hmac. 2015-06-02 18:17:30 +10:00
Johny Mattsson 32dd9b7b7a Crypto library with unified interface.
Uses both existing MD2/MD5/SHA1 and the Gifford SHA256-512, unless WITHOUT_SHA2
is defined.
2015-06-02 18:15:18 +10:00
Johny Mattsson 68ef22ace5 Imported Aaron Gifford's SHA{256,384,512} implementation. 2015-06-02 17:02:14 +10:00
dnc40085 353209fb4e Change comments for wifi.sta.getap 2015-05-31 22:45:43 -07:00
dnc40085 a5fe3d0146 Added option to wifi.sta.getap to allow changing output format between
new style and old style
2015-05-31 21:43:03 -07:00
Vowstar d8a8746b9e Merge pull request #447 from creationix/dev
Add crypto module.
2015-05-29 15:05:37 +08:00
dnc40085 01d90f1cb0 revert app/spifs folder to commmit 8f925e6 2015-05-28 23:54:07 -07:00
dnc40085 1f798dabf7 Revert "Update spiffs to latest." 2015-05-28 17:38:08 -07:00
= 2128c42f02 Add headers for discovered rom functions 2015-05-28 15:10:12 -05:00
= 59df376a3a Rename base64Encode to toBase64 and hexEncode to toHex 2015-05-28 09:00:13 -05:00
= c8145434c3 Add crypto.hexEncode and crypto.mask 2015-05-28 07:47:09 -05:00
= ca78b9ea2c Add crypto module initially containing sha1 and base64_encode. 2015-05-28 07:46:57 -05:00
makefu c29edf7a22 app/modules/ws2812.c: re-add ws2812.write()
Add the original ws2812.write() function which does not scramble the
buffer while preserving the 'new' ws2812.writergb.

With this everybody should be happy again
2015-05-26 23:12:38 +02:00
Vowstar f7a6183853 Merge pull request #437 from dnc40085/dev096_adc.vdd33_fix
Added fix to adc.readvdd33() to prevent crashing in station mode
2015-05-24 07:23:16 +08:00
Vowstar 2d0689142c Merge pull request #438 from dnc40085/dev096_wifi.getchannel
added wifi.getchannel
2015-05-24 07:23:07 +08:00
dnc40085 6477f5f389 added wifi.getchannel 2015-05-22 19:42:21 -07:00
dnc40085 dd00e31027 Added fix to adc.readvdd33() to prevent crashing in station mode while
connected
2015-05-22 18:01:05 -07:00
HuangRui 5261fb1948 Update spiffs to latest. 2015-05-21 15:18:35 +08:00
HuangRui c66cced7f4 Merge branch 'dev096' of https://github.com/nodemcu/nodemcu-firmware 2015-05-21 10:59:30 +08:00
HuangRui 8887085ef8 Revert file.format method. 2015-05-21 10:58:58 +08:00
HuangRui c82cc3f7c5 Testing use all modules. 2015-05-21 10:42:28 +08:00
HuangRui a1e67c5cf0 Try to use latest spiffs but not success. 2015-05-21 10:39:02 +08:00
dnc40085 7244d51b38 Fixed bug in wifi_scan_done 2015-05-20 02:21:46 -07:00
HuangRui fc8fa2cc91 Fixed readvdd33 bug. 2015-05-19 20:11:15 +08:00
HuangRui 0f3ade36d8 Merge branch 'dev' of https://github.com/nodemcu/nodemcu-firmware
Conflicts:
	app/modules/net.c
2015-05-19 20:06:03 +08:00
dnc40085 546bca00c1 changed wifi_setip() to allow setting SoftAP gateway to 0.0.0.0 2015-05-17 19:29:26 -07:00
Jorge Mesquita 70580dc4ae added net.dns.setdnsserver('ip',[index]), net.dns.getdnsserver([index]), net.dns.resolve('domain.com', function cb('ip' or nil if fail) )
modified:   app/modules/net.c
2015-05-16 20:53:31 -04:00
Vowstar 61f65fb02a Merge pull request #420 from devsaurus/dev
Add missing functions for u8g
2015-05-16 20:26:50 +08:00
devsaurus 5b588b7bd3 implement getStrWidth() and setFontLineSpacingFactor() 2015-05-15 21:32:28 +02:00
devsaurus de56cb084e sort member functions 2015-05-15 21:13:59 +02:00
HuangRui 71469dd70f Merge branch 'dev' of https://github.com/nodemcu/nodemcu-firmware
Conflicts:
	app/include/user_version.h
	app/modules/node.c
	app/modules/wifi.c
2015-05-15 08:13:46 +08:00
Vowstar 43d06459a6 Merge pull request #409 from dnc40085/dev096-wifi_scan_done
Change format of table that is output by wifi_scan_done function
2015-05-15 07:54:48 +08:00
Vowstar 60e1e8ba7d Merge pull request #408 from dnc40085/dev096-wifi.ap.config
Additions and changes to wifi module
2015-05-15 07:54:42 +08:00
Vowstar 55cff23f64 Merge pull request #405 from dnc40085/dev096-wifi.setmac_fix
Fix for inability to use standard formatted MAC address with wifi.setmac()
2015-05-15 07:54:34 +08:00
Vowstar d30fea9bd0 Merge pull request #413 from dnc40085/dev096-tmr.alarm_memory_leak_fix
Fix for issue #382
2015-05-15 07:49:49 +08:00
Vowstar a5d96f4719 Merge pull request #404 from dnc40085/dev096-wifi.sta.getconfig
Add function wifi.sta.getconfig() and more parameters to wifi.sta.config()
2015-05-15 07:45:56 +08:00
robertfoss 4c2ad0f545 Add -Os flag to release and debug builds
To fit the build on boards with 512K of flash, build using -Os flag.
2015-05-14 11:27:43 -04:00
dnc40085 894fcc4799 minor change 2015-05-14 04:59:55 -07:00
dnc40085 4f097cf063 Fixed memory leak in tmr.alarm() 2015-05-14 04:40:57 -07:00
dnc40085 cf32376467 Minor change to wifi.sta.getap() 2015-05-11 21:02:46 -07:00
dnc40085 e9081a81a5 Remove conflict 2015-05-11 20:03:02 -07:00
dnc40085 3941977550 Removed commented lines from previous commit 2015-05-11 18:45:27 -07:00
dnc40085 78cb215bb2 Changed output format of table that is output by wifi_scan_done 2015-05-11 18:26:16 -07:00
dnc40085 f31671044d Fixed error in wifi_station_listap 2015-05-11 17:59:51 -07:00
dnc40085 aca2b7724b Added description to wifi_station_listap 2015-05-11 05:38:23 -07:00
dnc40085 cf54f85549 Added ability to set scan configuration to wifi.sta.getap 2015-05-11 05:12:34 -07:00
dnc40085 5b375cfe50 Copied changes from dev branch, commit f13c5c6 from Wayne Bartnick
wifi.sta.config (wifi_station_config):

- range checking password length (8~64)

wifi.ap.config (wifi_ap_config):
- range checking ssid length (1~32)
- range checking pwd length (8~64)
- new params:
  - auth: wifi.OPEN, wifi.WPA_PSK, wifi.WPA2_PSK, wifi.WPA_WPA2_PSK
    - default WITH pwd: wifi.WPA_WPA2_PSK
    - default WITHOUT pwd: wifi.OPEN
  - channel: 1~13 (default: 6)
  - hidden: 0/1 (default: 0)
  - max: 1~4 (default: 4)
  - beacon: 100~60000ms (default: 100)

wifi.ap.getclient (wifi_ap_listclient):
- returns table(mac,ip) of all connected clients

wifi.ap.dhcp:
- new submodule
- config (wifi_ap_dhcp_config), returns start/end ips
  - params:
    - start (e.g., "192.168.1.100")
  - end ip calculated from wifi.ap.config.max
- start (wifi_ap_dhcp_start), returns boolean
- stop (wifi_ap_dhcp_stop), returns boolean
2015-05-11 05:06:48 -07:00
dnc40085 c6c8bd84a0 minor change to wifi.sta.config() 2015-05-11 00:05:28 -07:00
dnc40085 7533a6afba Fix for inability to use standard formatted MAC address with
wifi.setmac() also changed wifi.getmac() to use macro
2015-05-09 04:29:18 -07:00
dnc40085 f9e0e0cc61 Added examples to description of wifi.sta.config() 2015-05-09 04:17:35 -07:00
dnc40085 e667b2029d Added function wifi.sta.getconfig()
Added more parameters to wifi.sta.config()
2015-05-09 01:50:35 -07:00
trilader bc7b9f86c4 Allow connecting to unsecured WiFi networks 2015-05-07 15:12:57 +02:00
dnc40085 700ba55d26 Fix for memory leak in function wifi.sta.getap() 2015-05-07 05:02:59 -07:00
Vowstar 749e71d9cb Fixed strange SPI flash API error. Added word_of_aligned_array. 2015-05-05 23:59:30 +08:00
vowstar 32e9ac204a Fix PWM init bug, set all initial duty to 0. 2015-05-01 18:35:30 +08:00
Vowstar 1923280572 Merge pull request #365 from nodemcu/master
Add ICMP ping to net module
2015-05-01 14:57:50 +08:00
dnc40085 f4a9de4886 Added comments for setphymode and getphymode functions in wifi module
Added constants PHYMODE_B, PHYMODE_G, PHYMODE_N to wifi module
2015-04-29 00:06:06 -07:00
dnc40085 900c43d520 Add setphymode and getphymode to wifi module 2015-04-26 20:03:44 -07:00
Kevin Uhlir f68d41608e Add multicastJoin and multicastLeave to net module
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.
2015-04-15 03:41:13 -05:00
zeroday 81d9f8893a fix #353 2015-04-12 23:34:11 +08:00
Kirill f19e24c7ac Update tmr.c
According to NodeMCU team recommendations.
2015-04-10 14:56:17 +05:00
Vowstar e61ad9d7ba Merge pull request #339 from wladurner/issue_321
fixes issue #321 "ws2812.writergb scrambles buffer" reported by makefu.
2015-04-06 21:26:04 +08:00
zeroday 68607e3d2e Merge pull request #334 from model101/buf1kdev
LUAL_BUFFERSIZE back to 1K and warning notice added
2015-04-06 00:01:12 +08:00
zeroday a333d6a9b9 Merge pull request #333 from wbartnick/dev
wifi submodule enhancements, thanks to @wbartnick
2015-04-05 23:09:33 +08:00
cal 06193090e6 LUAL_BUFFERSIZE back to 1K and warning notice added 2015-04-05 16:14:52 +02:00
Wolfram Ladurner ff85cf4371 fixes issue #321 "ws2812.writergb scrambles buffer" reported by makefu.
Don't modify Lua-internal lstring - use a copy instead.
2015-04-05 15:49:32 +02:00
Wayne Bartnick f13c5c61e6 wifi.sta.config (wifi_station_config):
- range checking password length (8~64)

wifi.ap.config (wifi_ap_config):
- range checking ssid length (1~32)
- range checking pwd length (8~64)
- new params:
  - auth: wifi.OPEN, wifi.WPA_PSK, wifi.WPA2_PSK, wifi.WPA_WPA2_PSK
    - default WITH pwd: wifi.WPA_WPA2_PSK
    - default WITHOUT pwd: wifi.OPEN
  - channel: 1~13 (default: 6)
  - hidden: 0/1 (default: 0)
  - max: 1~4 (default: 4)
  - beacon: 100~60000ms (default: 100)

wifi.ap.getclient (wifi_ap_listclient):
- returns table(mac,ip) of all connected clients

wifi.ap.dhcp:
- new submodule
- config (wifi_ap_dhcp_config), returns start/end ips
  - params:
    - start (e.g., "192.168.1.100")
  - end ip calculated from wifi.ap.config.max
- start (wifi_ap_dhcp_start), returns boolean
- stop (wifi_ap_dhcp_stop), returns boolean
2015-04-05 09:21:16 -04:00
funshine bcbde08bf7 fix mqtt keepalive ping, add a example for mqtt in lua_examples. 2015-04-05 02:22:51 +08:00
funshine 8558641190 add gpio.serout() api to help serialize bit out 2015-04-03 16:05:14 +08:00
funshine 1c2ee75a00 fix mqtt, do a format when wrong flash size is detected 2015-04-03 00:51:02 +08:00
funshine 32e062f523 polish mqtt module 2015-03-31 23:38:28 +08:00
funshine dcb6e53af7 add auto-reconnect option to mqtt:connect api 2015-03-31 00:36:44 +08:00
funshine 09750b5653 add queue to mqtt module 2015-03-30 00:24:09 +08:00
HuangRui 3dd1ac3739 Move node.readvdd33 to adc.readvdd33, fix #162. 2015-03-27 00:52:55 +08:00
funshine e1f8b604a0 fix init_data detect flash api 2015-03-24 23:21:40 +08:00
funshine 52ca40b8ea add init.lua examples 2015-03-22 21:09:37 +08:00
funshine d5731dd9bd merge from dev 2015-03-20 20:15:38 +08:00
funshine 4332b21ef3 minor fix 2015-03-20 19:42:10 +08:00
Vowstar 1562215905 Merge pull request #301 from devsaurus/dev
Use correct function for stop in U8G_COM_MSG_WRITE_BYTE
2015-03-19 12:17:11 +08:00
devsaurus 2d254bd47c use correct function for stop in U8G_COM_MSG_WRITE_BYTE 2015-03-18 22:33:16 +01:00
funshine 3d14530b80 fix cjson.encode() when in integer version 2015-03-18 19:37:47 +08:00
funshine 3aead6d230 try to fix cjson.encode in integer only version 2015-03-18 17:01:01 +08:00
funshine a70709268b merge cjson and dev to master, make a stable release 2015-03-18 14:22:17 +08:00
zeroday a01bda03dd Merge pull request #294 from nodemcu/json
Json branch merged to master
2015-03-18 13:11:11 +08:00
devsaurus 09b650be41 disable untested pcd8544 driver for the moment 2015-03-17 20:52:47 +01:00
devsaurus 87598c5dfe Merge remote-tracking branch 'upstream/dev' into dev 2015-03-17 20:35:39 +01:00
funshine 808a359eb8 quick fix when wide charactor issue 2015-03-17 22:42:22 +08:00
Markus Gritsch b648e9a8db Added node.setcpufreq(mhz) function.
This function allows setting the CPU frequency to node.CPU80MHZ or
node.CPU160MHZ.
2015-03-17 10:23:45 +01:00
funshine 45e7f270cc Merge branch 'dev' into json 2015-03-17 00:13:15 +08:00
funshine 4d3c1a930f code clean up for cjson 2015-03-17 00:12:25 +08:00
funshine 54004a4beb fix cjson bugs and reduce mem usage 2015-03-16 23:59:57 +08:00
funshine c0d690ce7e under development 2015-03-16 17:11:48 +08:00
funshine d425dd7127 under develop 2015-03-16 17:09:43 +08:00
funshine 83f53c23c1 json port from cjson. not work yet, add cjson folder 2015-03-16 09:19:06 +08:00
funshine c9912f1d82 json port from cjson. not work yet, delete folder 2015-03-16 09:17:21 +08:00
funshine 9c0c960e84 json port from cjson. not work yet 2015-03-16 09:00:33 +08:00
Vowstar 4d5242e1b7 Merge pull request #284 from nodemcu/dev
Sync from dev to dev096.
2015-03-16 05:44:51 +08:00
HuangRui 5c84359b5c ROM flash size can changed with detected size, fixed #283. 2015-03-16 05:40:43 +08:00
devsaurus 3124bcf357 Merge remote-tracking branch 'upstream/dev' into dev 2015-03-15 22:06:30 +01:00
HuangRui f7eed2b53b Changed e9 to magic_e9. 2015-03-16 01:44:54 +08:00
HuangRui 0b01f28c62 Merge branch 'dev' of https://github.com/nodemcu/nodemcu-firmware
Conflicts:
	app/include/user_modules.h
	app/include/user_version.h
2015-03-16 01:13:03 +08:00
HuangRui 4e7473bc00 Fixed flash automatic detection bug. Support 128MBit flash. 2015-03-16 01:05:06 +08:00
HuangRui dfce182622 Paste new version, make it can get correct flash size. 2015-03-16 00:51:47 +08:00
HuangRui ed87cbd96f Try to fix flash auto detection bug. 2015-03-16 00:48:28 +08:00
funshine 0b95ae08a2 default build with coap, reduce coap module mem usage 2015-03-15 20:12:29 +08:00
Vowstar e3c31d0629 Merge pull request #280 from nodemcu/master
Merge master to dev096.
2015-03-15 20:04:55 +08:00
funshine 394cced84b fix #273 2015-03-15 16:06:35 +08:00
funshine f510e658d5 merge master solve conflicts 2015-03-15 15:01:07 +08:00
funshine c46000069d reduce coap module memory usage 2015-03-15 13:44:50 +08:00
Erant 0a4049767a Fix getFSF to abide by the function contract 2015-03-14 09:00:25 -07:00
devsaurus 3b37f0920c res optional 2015-03-13 22:22:57 +01:00
devsaurus 429bf57d67 add pcd8544 2015-03-12 23:09:41 +01:00
devsaurus b387ba93ec introduce u8g_config.h 2015-03-12 21:50:57 +01:00
devsaurus 7b160da1a3 Merge remote-tracking branch 'upstream/dev' into dev 2015-03-12 21:16:39 +01:00