Commit Graph

845 Commits

Author SHA1 Message Date
Johny Mattsson 45ae795739 Extend node.dsleep() to support instant sleep. (#1859) 2017-03-14 10:49:41 +01:00
FrankX b4319bdb4b Add driver for XPT2046 touch controller (#1848) 2017-03-09 07:20:01 +01:00
Yury Popov 466c03d90f Deprecation messages for convenient net.create(Server/Connection) calls (#1844) 2017-03-07 20:50:32 +01:00
Arnim Läuger f5652187a6 use flash size byte to determine the location of the init data for byte 107 (#1827) 2017-03-02 14:48:44 +11:00
Marcel Stör a26969b388 Add generic function to print deprecation notes (#1538) 2017-03-01 12:42:20 +01:00
Arnim Läuger f577c2c080 Sync uart configuration to Tx FIFO level (#1806)
* sync uart configuration to tx fifo level

* poll tx fifo empty before disabling interrupts

* echo parameter is optional for uart.setup()
2017-03-01 12:41:56 +01:00
Arnim Läuger 2168e5185e Apply power selection at the end of the write slot while IRQs are masked (#1808) 2017-03-01 12:41:17 +01:00
Arnim Läuger 8931f09ce4 Fix missing return code for ws2812_init() (#1816) 2017-02-24 21:20:09 +01:00
dnc40085 b382a42057 Fix debug message for wifi.sta.getrssi() (#1814) 2017-02-22 20:59:04 +01:00
FrankX 4dfa5cd7d6 Correct BME280 IIR filter setting (#1787) 2017-02-11 22:53:06 +01:00
Philip Gladstone 00bc9403fe Fix the adjusting of the time when there is a rollover (#1788) 2017-02-09 21:53:12 +01:00
Jason Follas 2ab28df92a Support clearing WiFi config (#1761)
* Add wifi.sta.clearconfig(). Adjust password validation to match 2.0.0 SDK rules (no min length enforced, i.e. for WEP)
* Updat comments about WEP key not having a minimum
* Documentation: add note about node.restore() to wifi.sta.clearconfig() docs, and add SDK verbiage to describe what node.restore() impacts.
* Normaliz if statements
* Convert leading tabs to leading spaces for consistency
2017-02-08 21:42:29 +01:00
Arnim Läuger 416d53eb39 Add string support for spi.set_mosi() and spi.get_miso() (#1753)
clean-up endianess handling in spi driver
2017-02-06 13:55:26 +01:00
Yury Popov 2c8961d153 Add TTL support to net module (#1756) 2017-02-06 13:54:20 +01:00
Arnim Läuger 87e1abfb0f rtctime: change to lua_setfieldfor populating the table (#1746)
Looks good.
2017-01-22 14:17:46 -05:00
ffedoroff a271ce4d34 Invert signal on rfswitch pin (#1738)
Since that code was migrated from Arduino, I should invert pin
2017-01-19 12:46:45 +01:00
FrankX a18826ec54 Accept 64 byte length WiFi passwords (#1730) 2017-01-17 21:55:30 +01:00
Arnim Läuger 305d7c4672 Add file.stat() to query file/directory attributes. (#1724)
* add file.stat()

* set default time/date to 1970-01-01
use lua_setfield
2017-01-17 21:54:23 +01:00
Marcel Stör 0a503587ee Fix typo (#1714) 2017-01-10 21:09:54 +01:00
ffedoroff 52aa1f7e3d Fix typo (#1715) 2017-01-10 21:05:48 +01:00
FrankX 378e5eb0ad Add WPS module (#1694)
* WPS functionality added

* WPS module switched off by default

* Update mkdocs.yml
2017-01-09 08:43:47 +01:00
Yury Popov a592af7ab1 Depend http client secure part on CLIENT_SSL_ENABLE (#1702) 2017-01-04 18:31:32 +01:00
Verne Roberts cad1632e40 Add 31250 baud rate for MIDI support (#1690)
* add 31250 baud rate for MIDI support
* add bitrate to uart_bitrates array for the get operation
2017-01-04 12:31:47 +01:00
Philip Gladstone 9b86937d45 Fix crash in sntp and add more reliable defaults servers (#1682)
* Fix bug in sntp where callback was run at interrupt level. Also add
the nodemcu pool servers as the default.

* Add comments on where the mysterious numbers came from

* Fix a crash with auto repeat mode and errors on repeat
2017-01-01 22:26:17 +01:00
Yury Popov 3adba91b15 Net functionality rewrite on top of LWIP (#1379)
* 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
2016-12-31 13:14:03 +01:00
Yury Popov 2b897e56c7 Cron module (#1674) 2016-12-26 14:19:12 +01:00
Arnim Läuger c57af8972f Rework support for >4MB modules: place SPIFFS after SDK data (#1646) 2016-12-26 14:17:57 +01:00
Philip Gladstone 543f438b6b Added node.random implementation (#1665) 2016-12-26 14:14:49 +01:00
Philip Gladstone feab8b2208 Various minor bits of cleanup (#1647)
* Check the return code of the read function when doing crypto.fhash so that we don't pass negative lengths to the hashing functions
*  Fix various assert failures in the LVM arising from rotables. No functional change
* Add the gpio interrupt time to the callback (and pass it from the interrupt handler)
* Get the PC right in the perf module
* Make the headers static in the websocket module
* Fix the documentation
2016-12-25 10:45:34 +11:00
kicer 118acb808e Fix crypto.mask() to encode with correct mask (#1677) (#1678)
Thank you.
2016-12-23 12:03:02 -05:00
Johny Mattsson c5c0143b2f rtctime.dsleep() current draw improvements (#1659)
* Switch off interrupts before rtctime dsleep.

* Deal with the fact that MCU keeps running after being told to enter deep sleep
(It can keep running for quite a few instructions at times (and none at
all at others), and it appears that trying to cache additional code from
SPI flash while trying to go to sleep fails miserably at both....)

* Ensure flash is not active when going into deep sleep.
2016-12-14 12:39:31 +01:00
vsky d56b4ef2e6 BME280: improved reliability and efficiency (#1662)
* BME280: improved reliability and efficiency

* BME280: new parameter to bme280.init() and new bme280.read() method documented
2016-12-11 22:31:39 +01:00
Yury Popov bdd54648f4 Upgrade to SDK 2.0.0 (#1435)
* Update LWIP from SDK
* mbedTLS integration
* Fix argument type in dbg_printf (#1624)
* Migrate to espressif’s download center (#1604)
* Fixed BBS links to firmware
* Adjust net module docs with mbedTLS info
* Remove unrelevant axTLS notice
2016-12-11 21:03:00 +01:00
Philip Gladstone 017b4637c2 Adds uart.getconfig(0) to get the current uart parameters (#1658) 2016-12-11 20:35:04 +01:00
vsky 12a7b1c239 BME280: fixing humidity trimming parameter readout bug (#1652) 2016-12-09 21:19:58 -05:00
Philip Gladstone 79013ae79a Improve SNTP module: Add list of servers and auto-sync [SNTP module only] (#1596) 2016-12-04 21:03:49 +01:00
Arnim Läuger ea7ad21318 move init_data from .text to .rodata.dram section (#1643) 2016-12-04 20:19:51 +01:00
ffedoroff 9f9fee9008 add new rfswitch module to handle 433MHZ devices (#1565) 2016-12-01 22:19:01 +01:00
Yury Popov 83eec61874 Fix iram/irom section contents (#1566) 2016-12-01 22:14:20 +01:00
Philip Gladstone 00b356be84 HTTP module can now chain requests (#1629)
* Fix up the HTTP module to use less memory
2016-12-01 22:13:33 +01:00
Jason Follas a48e88d4a3 EUS bug fixes (#1605)
- Bug fixes and improvements
- FIX: Ensure that station is enabled before doing network scan (this seems to be the cause of #1578)
- FIX: Check if state == NULL on enduser_setup.stop()
- IMPROVEMENT: Look for both enduser_setup.html.gz and enduser_setup.html as valid filenames, for semantic reasons
- IMPROVEMENT: Show a generic status message on HTML page if failure occurred before user even submitted data (i.e., would have come from previously stored config when the STA was started by EUS)
2016-12-01 22:12:47 +01:00
Marcel Stör c54bc05ba6 Fix macro as suggested in #1548 2016-11-19 21:17:50 +01:00
Arnim Läuger c70dc7497e Handle error condition in file.read() (#1599)
* handle error condition in file.read()

* simplify loop initialization
2016-11-19 10:36:00 -05:00
Mariusz Kryński 59b9b3e26f support for custom websocket headers (#1573)
Looks good to me. Thank you.

Also:
 - allow for '\0's in received messages

* add client:config for setting websocket headers

Also:
 - headers are case-insensitive now

* fix docs

* fix typo

* remove unnecessary luaL_argcheck calls

* replace os_sprintf with simple string copy
2016-11-19 10:35:20 -05:00
Marcel Stör 1d0cf5e8d0 Virtual u8g display driver for RFB/VNC support (#1514)
* add u8g.fb_rle display
* move comm drivers to u8g_glue.c
* disable fb_rle per default
2016-11-14 13:40:45 +01:00
zelll 798759950f i2c - allow slave stretching SCL (just loop and check) (#1589) 2016-11-13 10:16:07 -05:00
Arnim Läuger fdc766be9f fix vfs_lseek() result checking in enduser_setup and clarify SPIFFS_lseek() return value (#1570) 2016-11-08 22:27:12 +01:00
Jason Follas 058777ea60 Eus channelfix (#1583)
Squashed commits included:

Bug fixes and final implementation
- Added Content-Length: 0 to all headers
- Endpoint name checks not using trailing space so cache-busting techniques can be used (i.e., append a nonce to the URL)
- Track when connecting so APList scan doesn't take place during (which changes the channel)
- More debugging output added to assist in tracking down some issues

Added /status.json endpoint for phone apps/XHR to get JSON response

Station Status caching for wifi channel workaround + AJAX/CORS
- During checkstation poll, cache the last station status
- Shut down the station if status = 2,3,4 and channel is different than SoftAP
- Add Access-Control-Allow-Origin: * to endpoint responses used by a service
- Add a /setwifi GET endpoint for phone apps/XHR to use (same parameters as /update endpoint). Returns a JSON response containing chip id and status code.
- Add handler for OPTIONS verb (needed for CORS support)

Wi-Fi Channel Issue Workaround
- Do a site survey upon startup, set SoftAP channel to the strongest rssi's channel
- Compare successful station connect channel to SoftAP's. If different, then defer the Lua success callback to the end. Shut down Station and start the SoftAP back up with original channel.
- After the 10 second shutdown timer fires, check to see if success callback was already called. If not, then call it while starting the Station back up.

HTTP Response and DNS enhancements
- If DNS's UDP buffer fills up, keep going as non-fatal. It's UDP and not guaranteed anyways. I've seen this occur when connecting a PC to the SoftAP and every open program tries to phone home at the same time, overwhelming the EUS DNS server.
- Support for detecting/handling pre-gzipped `enduser_setup.html` (and `http_html_backup`) payload. Nice for keeping the size of the `state->http_payload_data` as small as possible (also makes minimization not as critical)
- Corrected misuse of HTTP 401 response status (changed one occurrence to 400/Bad Request, and changed another to 405/Method Not Allowed)

* Normalized formatting (tabs-to-spaces)
* Added documentation
* Corrected misuse of strlen for binary (gzip) data.
* Added NULL check after malloc
2016-11-08 21:58:33 +01:00
Arnim Läuger a0e2e0ca37 Implement object model for files (#1532) 2016-11-08 21:02:51 +01:00
Philip Gladstone b74a9dbdf7 Make the MQTT PING functionality work better. (#1557)
Deal with flow control stopped case
2016-11-08 21:00:17 +01:00