Commit Graph

273 Commits

Author SHA1 Message Date
Marcel Stör 1e955caf26 Fix link 2016-11-10 21:31:49 +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
dnc40085 73773fd8a5 Update to the wifi module (#1497)
* Removed inline documentation for several functions and update comments
Since documentation is now part of the repository, the inline
documentation just adds to the already huge wifi.c

* Wifi module: add new functionality, update documentation

Functions Added:
wifi.getdefaultmode(): returns default wifi opmode
wifi.sta.apchange(): select alternate cached AP
wifi.sta.apinfo(): get cached AP list 
wifi.sta.aplimit(): set cached AP limit
wifi.sta.getapindex(): get index of currently configured AP
wifi.sta.getdefaultconfig(): get default station configuration
wifi.ap.getdefaultconfig(): get default AP configuration

functions modified:
wifi.setmode: saving mode to flash is now optional
wifi.sta.config: now accepts table as an argument and save config to
flash is now optional
wifi.sta.getconfig: added option to return table
wifi.ap.config: save config to flash is now optional
wifi.ap.getconfig: added option to return table

Documentation changes:
- Modified documentation to reflect above changes
- Removed unnecessary inline documentation from `wifi.c` 
- Updated documentation for `wifi.sta.disconnect`to address issue #1480 
- Fixed inaccurate documentation for function `wifi.sleeptype`
- Added more details to `wifi.nullmodesleep()`

* Move function `wifi.sleeptype()` to `wifi.sta.sleeptype()`

* Fixed problem where wifi.x.getconfig() returned invalid strings when
ssid or password were set to maximum length.

* fix error in documentation for `wifi.sta.getapindex`

* Renamed some wifi functions
wifi.sta.apinfo -> getapinfo
wifi.sta.aplimit -> setaplimit 
wifi.sta.apchange -> changeap

also organized the wifi_station_map array
2016-11-06 20:51:01 +01:00
Philip Gladstone 77b2e85d09 Add support to mix ws2812.buffer objects. (#1575)
* Add load/dump/mix/power operations on the buffer object
* Calculate the pixel value in mix and then clip to the range.
* Fixed the two wrong userdata types
* Added a couple more useful methods
* Add support for shifting a piece of the buffer.
* Fix a minor bug with offset shifts
2016-11-05 13:53:42 +01:00
Arnim Läuger f0780e399e Add ssd1306_128x32 for U8G (#1571) 2016-10-30 00:19:04 +03:00
Arnim Läuger 9db07783f4 Remove luaL_buffer from file_g_read() (#1541)
* remove luaL_buffer from file_g_read()
- avoid memory leak when function gets terminated by lua_error
- skip scanning for end_char when reading until EOF
* attempt to free memory in any case
2016-10-28 17:32:12 +03:00
Philip Gladstone f9533ed85a Reduced LUAL_BUFFERSIZE to 256. Should free up some stack (#1530) 2016-10-16 21:18:03 +09:00
vsky 880bd9850b Somfy/TELIS driver (#1521) 2016-10-14 07:49:58 +09:00
Philip Gladstone 025805b0e8 Fixes the gpio.serout problem from #1534 (#1535)
* Fix some issues in gpio.serout
* Minor cleanup
2016-10-11 21:51:00 +09:00
Marcel Stör d9b10a7bdb Fix typo 2016-10-11 08:05:42 +09:00
Jim Paris 948661d862 Rework flashing instructions
Clarifies issues around SDK init data and hopefully clears up some
confusion, when paired with the esp_init_data_default changes in
NodeMCU.
2016-10-05 13:09:25 -04:00
Marcel Stör d96d7f237f Document node.flashsize(), fixes #1510 (#1511) 2016-10-01 13:44:24 +02:00
Marcel Stör 3007b33a0b Fix typo 2016-09-26 21:53:28 +02:00
Marcel Stör 90839f8956 Fix typo 2016-09-21 20:27:53 +02:00
Philip Gladstone 5ba1a6e934 Fixes the spiffsimg issues (#1502) (#1503)
* Always build spiffsimg (and make it build)

* Make sure that we have the offset before allowing the user to put it
into the output filename

* Fix the documentation and align the makefile with the docs

* Clean up the docs a bit more

* Revert to include building the 8mb size (for ESP8285)

* Added a spiffsimg target that does what you would expect

* Added support for HOSTCC (defaults to gcc)
2016-09-21 11:45:53 +10:00
Philip Gladstone 04e93b2433 Add the esp-gdbstub to enable debugging (#1506)
* Initial version of gdbstub support

* Add DEBUG argument to Makefile to add more debug data and turn off -Os

* Add the output redirection handling

* Added documentation

* Cleaned up the english a bit

* Make gdboutput actually trap all the output

* Review comments
2016-09-21 11:38:12 +10:00
Marcel Stör 11436d8dad Fix typo 2016-09-18 21:31:54 +02:00
Johny Mattsson a112296850 Added crypto.new_hmac() feature. (#1499)
Docs for crypto module refactored for easier maintenance.
2016-09-16 17:46:39 +02:00
Marcel Stör 92a6e594e4 Fix SD card docs 2016-09-05 20:45:19 +02:00
Arnim Läuger ecf8bd98d6 Add FatFs and SD card support (#1397)
* Add FatFs
* enable BUILD_FATFS for all-module build
* push vfs into rest of firmware
* align maximum filename length
* increase timeout for acmd41 during card initialization
* switch from DOS to Unix path semantics chdrive() is substituted by chdir()
* update to fatfs R.012a incl. patches 1-6
* add callback for rtc provisioning in file
* update docs
2016-09-05 20:17:13 +02:00
dnc40085 3328c66f2c Add function `wifi.nullmodesleep()` (#1475)
Enable auto sleep in NULL_MODE by default.
2016-08-27 11:46:24 +02:00
Marcel Stör cd6862f738 Fix list format in rtctime docs 2016-08-25 22:06:54 +02:00
Antoine 369a107041 Fix apa102 docs (#1470)
apa102.write expects a string with channel parameters in the ABGR order.
2016-08-25 09:28:37 +02:00
Luís Fonseca 16051d51d6 Implement initial version for websocket module (#1433) 2016-08-18 13:59:44 +02:00
Luís Fonseca 67750c4a72 Make HTTP module follow redirects (#1450)
Fixes #1366
2016-08-14 00:48:13 +02:00
Marcel Stör f2fa23c512 Fix wrong words 2016-08-11 20:41:33 +02:00
Marcel Stör 567b0a5553 Allow to override User-Agent and Host HTTP headers (#1426)
* Allow to override User-Agent and Host HTTP headers

Fixes #1410

Idea borrowed from (unmerged) #1157

* Do not send port for host header for default ports
2016-08-11 13:22:31 +10:00
Marcel Stör f1b479d825 Update memory address for init data 2016-08-10 09:11:24 +02:00
TonyLianLong 480d922ca5 Update bme280.md (#1) (#1444)
The name should be bme280.c, not bit.c .
2016-08-08 13:37:01 +02:00
Marcel Stör 07aa210c50 Remove DEVKIT_VERSION_0_9 and deprecated functions (#1439) 2016-08-04 23:03:37 +02:00
Yury Popov f1afe7b6ab Add support for dynamic timers, deprecating the static ones (#1424) 2016-08-02 22:35:53 +02:00
Arnim Läuger 7f8a2b2c19 Update u8glib to v1.19.1 and add setContrast() (#1385) 2016-08-02 22:29:34 +02:00
Marcel Stör 8a7007efc9 Fix typo 2016-07-31 23:16:47 +02:00
snosrap 8cd5e02634 Fixed `STA_DISCONNECT` typo (#1430) 2016-07-31 23:09:16 +02:00
Marcel Stör f9875f6e38 Skip connect() in init.lua 2016-07-28 07:07:39 +02:00
Marcel Stör 3eccf506d1 Add note about calling sntp.sync periodically 2016-07-25 14:28:27 +02:00
Marcel Stör 2cfdc6a805 Re-write the 'upgrading firmware' section in the flash docs (#1414) 2016-07-23 16:04:36 +02:00
Arnim Läuger 84c005e85c Update to SDK 1.5.4.1 (#1390) 2016-07-22 23:18:47 +02:00
Thomas Soëte 8866297c6d Remove buffer:write() as ws2812.write() handles buffers (#1408) 2016-07-20 23:04:33 +02:00
Thomas Soëte 854ad7c80f Handle two WS2812 strips in parallel using the two UARTs through GPIO2 and TXD0 (#1310) 2016-07-20 22:28:47 +02:00
Arnim Läuger 56839fb20b Add rtctime.epoch2cal() (#1386) 2016-07-19 22:01:26 +02:00
Marcel Stör 0bbce6f845 Set admonition types correctly (subjective) 2016-07-14 22:52:30 +02:00
Marcel Stör 76c3c7d486 Fix admonition in CoAP documentation 2016-07-14 21:32:33 +02:00
Arnim Läuger a6248500b9 update init data reference to sdk 1.5.4 (#1388) 2016-07-11 23:04:47 +02:00
Marcel Stör 8394810057 Add meta info to Switec doc page 2016-07-10 00:38:42 +02:00
Harald Kubota b366bf4988 Update sntp.md (#1378)
Extra character in the doc
2016-07-02 21:54:22 +02:00
Marcel Stör 3a7f01bb66 Fix documented MAC address format of wifi.sta.getmac() 2016-06-29 22:46:34 +02:00
Marcel Stör b702b3a403 Fix a few typos 2016-06-29 22:12:24 +02:00
Marcel Stör b31b2f8de0 Add note about outdated Lua files to flash upgrade note 2016-06-29 09:38:43 +02:00