diff options
author | Bill Owens <owens.bill@gmail.com> | 2015-06-16 12:28:05 -0700 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-06-17 23:16:28 +0300 |
commit | 7c61249ae630674cbde1e678be314c1508c3c160 (patch) | |
tree | b66512ef041adc2f8ed32bd96ac66837a556a69d | |
parent | 686516f90a34ac80cfaa76da10b849832f593176 (diff) | |
download | micropython-7c61249ae630674cbde1e678be314c1508c3c160.tar.gz micropython-7c61249ae630674cbde1e678be314c1508c3c160.zip |
esp8266: Updated documentation for scan() and moved to network
-rw-r--r-- | docs/library/esp.rst | 8 | ||||
-rw-r--r-- | docs/library/network.rst | 25 |
2 files changed, 25 insertions, 8 deletions
diff --git a/docs/library/esp.rst b/docs/library/esp.rst index 2c4846d864..54f06b02d0 100644 --- a/docs/library/esp.rst +++ b/docs/library/esp.rst @@ -10,14 +10,6 @@ The ``esp`` module contains specific functions related to the ESP8266 module. Functions --------- -.. function:: scan(cb) - - Initiate scanning for the available wireless networks. - - Once the scanning is complete, the provided callback function ``cb`` will - be called once for each network found, and passed a tuple with information - about that network. - .. function:: status() Return the current status of the wireless connection. diff --git a/docs/library/network.rst b/docs/library/network.rst index 157fdad032..6c6fdc3a90 100644 --- a/docs/library/network.rst +++ b/docs/library/network.rst @@ -210,6 +210,31 @@ For example:: Disconnect from the currently connected wireless network. + .. method:: wlan.scan(cb) + + Initiate scanning for the available wireless networks. + + Scanning is only possible if the radio is in station or station+AP mode; if + called while in AP only mode, an OSError exception will be raised. + + Once the scanning is complete, the provided callback function ``cb`` will + be called once for each network found, and passed a tuple with information + about that network: + + (ssid, bssid, channel, RSSI, authmode, hidden) + + There are five values for authmode: + + * 0 -- open + * 1 -- WEP + * 2 -- WPA-PSK + * 3 -- WPA2-PSK + * 4 -- WPA/WPA2-PSK + + and two for hidden: + + * 0 -- visible + * 1 -- hidden .. only:: port_wipy |