* 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
* 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
* 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
The esp_init_data_default.bin is now extracted from the SDK (and its
patch file, if present), and the contents are automatically embedded
into user_main.o.
To work around the pesky "rf_cal[0] !=0x05" hang when booting on a chip
which doesn't have esp_init_data written to it.
It is no longer possible to do the writing of the esp_init_data_default
from within nodemcu_init(), as the SDK now hangs long before it gets
there. As such, I've had to reimplement this in our user_start_trampoline
and get it all done before the SDK has a chance to look for the init data.
It's unfortunate that we have to spend IRAM on this, but I see no better
alternative at this point.
Input during startup (especially while doing initial filesystem format)
ran the risk of filling up the task queue, preventing the start_lua task
from being queued, and hence NodeMCU would not start up that time.
* 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
* 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
The original code did not deal with UDP binding failures, this new code
does one random port attempt and then sets port to 0 to get 'OS
default' behaviour, and ASSERTs that that has to work.
Patch also moves the local UDP port range definition to udp.h from
udp.c.
* 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
* added fadeIn, faceOut and shift to ws2812 module
* improvements to rotate, unified fade method
shift renamed to rotate and usage of more efficient memory operations.
fadeIn and fadeOut unified into fade method with optional parameter for direction.
* rename method to "shift" with optional mode parameter
Fixes#1164 and thus also #1150, #1149, #1147 and #898.
* Move to latest version of SPIFFS
* Add SPIFFS porting layer for NodeMCU
* Add option to delete output if it doesn't fit
* Change FLASHSIZE to be in bits by default: default 4mb 32mb
* Add SPIFFS_MAX_FILESYSTEM_SIZE override
* Add notes on SPIFFS_FIXED_LOCATION
* Add 1M boundary
* Include the current version of the LICENSE
- Stop fighting against the SDK in terms of owning/writing the init_data block.
NodeMCU included a default init_data block because originally the SDK did
not, but by now it's not needed.
- Expose a way to reconfigure the ADC mode from Lua land. With most people
using the cloud builder and not able to change the #define for byte 107
this has been a pain point.
- Less confusion about which init_data has been used. Lua code can now simply
state what mode it wants the ADC to be in, and not worry about the rest of
the init_data complexities such as the init_data changing location due to
flashing with wrong flash_size setting, or doing/not doing a chip-erase
before loading new NodeMCU firmware.
* Change upper limit for timer in `tmr_register` and `tmr_interval` to reflect new limit in SDK 1.5.3.
* Change documentation for `tmr.alarm()`, `tmr.interval()` and `tmr.register()` to match source.
* Improve error reporting to be more descriptive.
* Send a multicast response if it is a QM query
* Use the NSEC record in the style which mDNS demands
* Shuffle the code a bit and allow sending of A response...
* Made the A record work
* Now gets TTLs right and (I think) handles multiple questions
* Fix bug on first write
Pin is 'HIGH' at reset, so we need to pull it down and generate a
reset.
* Move init code to flash section, not needed to be in iram.
* Remove pin choice in API
* Remove lock in ws2812_buffer_write
* Remove naked malloc
* Drop ws2812_writergb
* Drop support of ws2812.buffers to ws2812_writegrb should use ws2812.buffers:write
* Add support for <>3 colors per leds strips (RGBW)
* Remove ICACHE_FLASH_ATTR
* Add static const on _uartData to avoid initialization penalty
* Provide an error code to SNTP error callback.
* Switch SNTP to use ephemeral port.
In case we're being hit by ISP-level thou-shall-not-run-NTP silliness.
Merging as suggested by @TerryE (and squashing at the same time. Turns out that this feature is enabled for this repo).
* Squashed commit of the following:
commit f985f10d9d2ee035f5a6ee6245c60d9904d98cc1
Author: philip <philip@gladstonefamily.net>
Date: Sun Mar 27 21:52:46 2016 -0400
Better mdns code
commit 6ee49ee106
Author: philip <philip@gladstonefamily.net>
Date: Fri Mar 25 23:25:11 2016 -0400
Update the docs
commit 7e455541c6
Author: philip <philip@gladstonefamily.net>
Date: Thu Mar 24 21:58:16 2016 -0400
Add retries and buffer checking to mdns
Get the length right
Now it seems to work
* Might work for combined mode
* Fix crash
* Simplified various bits of code. Changed the LUA interface
Added checking (to some degree) incoming quyery types
Move the defaults to the right place
Added reference to the RFC`
* Corrected CPOL/CPHA relationships
* Simplified to remove duplicated code
* Removed comments about when MISO is sampled. ESP seems to sample MISO on same clock edge as when MOSI is set.
Implement SDK event monitor
Move wifi status event monitor code into seperate file
(app/modules/wifi_eventmon.c)
Modify wifi lua callback registration code.
Add Functions wifi.ap.deauth and wifi.sta.getrssi
Rework wifi event monitor to use tasking interface
fix for Lua coroutine compatibility issue
Made changes Suggested by TerryE
Also, moved code that sets the default host name out of
luaopen_wifi_init and into a separate function and added a post_task_low
entry in it's place.
Replaced some if test then return error lines with
luaL_argcheck
Add check for malloc null return in wifi.eventmon
to catch out of memory errors
Due to the hard-close, the status message did not get sent out reliably.
Connection closing logic now reworked to be nicer, while still avoiding
the problem of lots of connections lingering in fin_wait.
Shutting down an espconn server safely is impossible, and currently would
include at least one use-after-free. Even with that patched, at best this
would change things from impossible to "very tricky".
The native LWIP API does not have those issues, and is still quite easy
to work with.
A single bug is fixed, a few features are added and overall the codebase has been worked through.
- Added support for calls to /generate_204 that let's android know that the internet is accessible.
- Added 10 second delay to the shutdown call to allow a final status update to be fetched by the client.
- Added iframe to html to avoid having a form submission change the page.
- Added support for dynamic /status responses.
- Improved HTML appearance by removing AP-list button.
- Improved CSS to center form, even when list of access points have loaded.
- Improved debug prints to contain line numbers and not require lua_State*.
- Fixed broken failure check when calling wifi_station_connect().
- Fixed unguarded malloc().