mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-13 13:01:55 +03:00
Update to the last version of nonos-sdk V2, WiFi addons (#5210)
* fwupdate * fw update to latest version: WPA working, WEP+Open disabled by default. Need API change. * helpers to follow sdk updates * remove compare scripts - made a separate PR for them * add wep api, restore original espressif comment (wep enabled does not prevent wpa) * libmain was not up to date * experimental: DTIM setting in WiFi.setSleepMode(WIFI_LIGHT/MODEM_SLEEP, DTIM-value) with new getter: .getListenInterval() / .isSleepLevelMax() * fixes * fix debug message * when not using listenInterval, set wifi sleep level to min * update documentation * update doc
This commit is contained in:
@ -55,13 +55,46 @@ mode
|
||||
- ``WiFi.getMode()``: return current Wi-Fi mode (one out of four modes
|
||||
above)
|
||||
|
||||
WiFi power management, DTIM
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. code:: cpp
|
||||
|
||||
bool setSleepMode (WiFiSleepType_t type, int listenInterval=0)
|
||||
|
||||
Sleep mode type is ``WIFI_NONE_SLEEP``, ``WIFI_LIGHT_SLEEP`` or ``WIFI_MODEM_SLEEP``.
|
||||
|
||||
(``listenInterval`` appeared in esp8266-arduino core v2.5.0 using the last
|
||||
V2 revision of nonos-sdk before V3)
|
||||
|
||||
Quoting nonos-sdk datasheet:
|
||||
|
||||
* ``NONE``: disable power saving
|
||||
|
||||
* ``LIGHT`` or ``MODEM``: TCP timer rate raised from 250ms to 3s
|
||||
|
||||
When ``listenInterval`` is set to 1..10, in ``LIGHT`` or ``MODEM`` mode,
|
||||
station wakes up every (DTIM-interval * ``listenInterval``). This saves
|
||||
power but station interface may miss broadcast data.
|
||||
|
||||
Otherwise (default value 0), station wakes up at every DTIM-interval
|
||||
(configured in the access-point).
|
||||
|
||||
Quoting wikipedia:
|
||||
|
||||
A Delivery Traffic Indication Map (DTIM) is a kind of Traffic Indication Map
|
||||
(TIM) which informs the clients about the presence of buffered
|
||||
multicast/broadcast data on the access point. It is generated within the
|
||||
periodic beacon at a frequency specified by the DTIM Interval. Beacons are
|
||||
packets sent by an access point to synchronize a wireless network.
|
||||
|
||||
|
||||
Other Function Calls
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. code:: cpp
|
||||
|
||||
int32_t channel (void)
|
||||
bool setSleepMode (WiFiSleepType_t type)
|
||||
WiFiSleepType_t getSleepMode ()
|
||||
bool setPhyMode (WiFiPhyMode_t mode)
|
||||
WiFiPhyMode_t getPhyMode ()
|
||||
@ -73,6 +106,11 @@ Other Function Calls
|
||||
bool forceSleepWake ()
|
||||
int hostByName (const char *aHostname, IPAddress &aResult)
|
||||
|
||||
appeared with SDK pre-V3:
|
||||
uint8_t getListenInterval ();
|
||||
bool isSleepLevelMax ();
|
||||
|
||||
|
||||
Documentation for the above functions is not yet prepared.
|
||||
|
||||
For code samples please refer to separate section with `examples <generic-examples.rst>`__ dedicated specifically to the Generic Class.
|
||||
|
Reference in New Issue
Block a user