Commit Graph

54 Commits

Author SHA1 Message Date
Jim Mussared
44818d1a35 docs/library/network.rst: Simplify socket import.
Replace `import socket as socket` with `import socket`.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-08-17 11:26:24 +10:00
Jim Mussared
c737cde947 docs: Replace ufoo with foo in all docs.
Anywhere a module is mentioned, use its "non-u" name for consistency.

The "import module" vs "import umodule" is something of a FAQ, and this
commit intends to help clear that up.  As a first approximation MicroPython
is Python, and so imports should work the same as Python and use the same
name, to a first approximation.  The u-version of a module is a detail that
can be learned later on, when the user wants to understand more and have
finer control over importing.

Existing Python code should just work, as much as it is possible to do that
within the constraints of embedded systems, and the MicroPython
documentation should match the idiomatic way to write Python code.

With universal weak links for modules (via MICROPY_MODULE_WEAK_LINKS) users
can consistently use "import foo" across all ports (with the exception of
the minimal ports).  And the ability to override/extend via "foo.py"
continues to work well.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-08-13 22:53:29 +10:00
Mike Causer
31ac410a4f docs: Fix some spelling mistakes. 2021-05-04 22:58:00 +10:00
Zenix27
e76c7466b6 docs: Change \* to * in argument lists.
Latest versions of Sphinx (at least 3.1.0) do not need the `*` escaped and
will render the `\` in the output if it is there, so remove it.

Fixes issue #6209.
2020-08-21 12:24:13 +10:00
David Lechner
1e6d18c915 docs: Fix Sphinx 3.x warnings, and enable warnings-as-errors on build.
This enables warnings as errors and fixes all current errors, namely:

- reference to terms in the glossary must now be explicit (:term:)
- method overloads must not be declared as a separate method or must
  use :noindex:
- 2 cases where `` should have been used instead of `
2020-06-05 21:42:17 +10:00
Mike Causer
a2c4cb484d docs: Fix spelling in various parts of the docs. 2019-10-16 14:08:28 +11:00
Damien George
8a84e08dc8 docs/library/network: Make AbstractNIC methods layout correctly. 2018-09-27 17:24:41 +10:00
Damien George
217566b764 docs/library/network: Move specific network classes to their own file.
All concrete network classes are now moved to their own file (eg
network.WLAN.rst) and deconditionalised (remove ..only:: directives).  This
makes the network documentation the same for all ports.  After this change
there are no more "..only::" directives for different ports, and the only
difference among ports is the very front page of the docs.
2018-09-27 17:23:42 +10:00
Damien George
c5fe610ba1 esp8266/modnetwork: Implement WLAN.status('rssi') for STA interface.
This will return the RSSI of the AP that the STA is connected to.
2018-02-26 16:41:13 +11:00
Damien George
31550a52e4 docs/library/network: Enhance AbstractNIC.status to take an argument.
The argument is optional and if given should be a string naming the
status variable to query.
2017-11-16 14:48:04 +11:00
Joar Wandborg
b9923262db docs/library/network: Add dhcp_hostname parameter
I have not actually tested this, going by information available in https://forum.micropython.org/viewtopic.php?t=2584
2017-10-27 11:04:52 +03:00
Damien George
d90ade5e3e docs/library/network: Update docs to state that W5500 is supported. 2017-10-16 15:51:56 +11:00
Damien George
65ba481cb0 stm32/modnwwiznet5k: Implement WIZNET5K.isconnected() method. 2017-10-16 13:16:00 +11:00
Damien George
add933feaf docs/library/network: Clarify usage of "bssid" arg in connect() method. 2017-10-09 23:11:25 +11:00
Paul Sokolovsky
c5c095690f docs/library/network: Fix ref to "socket" module (should be "usocket"). 2017-08-28 14:00:16 +03:00
Paul Sokolovsky
358a7ba014 docs: More xrefs to "MicroPython port" in glossary. 2017-08-28 13:51:05 +03:00
Paul Sokolovsky
dd16e21562 docs/network: Use markup adhering to the latest docs conventions. 2017-06-26 00:37:30 +03:00
Paul Sokolovsky
cd64b3082e docs/network: First step to describe standard network class interface.
This adds description of implied AbstractNIC base class, which should be
"subclasses" and implemented by a particular network device class.

This is just an initial step in that direction, the API and description
will be elabotated further.
2017-06-04 21:25:23 +03:00
Paul Sokolovsky
92206a78ae docs/network: Move confusingly-named cc3200 Server class to its reference.
cc3200 port has network.Server class to control behavior of builtin
Telnet/FTP server of that port.
2017-06-03 13:34:28 +03:00
Paul Sokolovsky
c28f9df63a docs/library/network: Typo fixes, consistent acronym capitalization. 2016-10-28 12:03:35 +03:00
Paul Sokolovsky
b9a88683a4 docs/library/network: Reword intro paragraph. 2016-10-28 04:42:27 +03:00
Mike Causer
ce166e6b68 docs: Spelling mistakes 2016-08-02 11:17:46 +03:00
Paul Sokolovsky
9487b80666 docs/library/network: wipy: Fix literal block indentation. 2016-06-07 02:07:08 +03:00
Paul Sokolovsky
a6cf45864f docs/network: esp8266: MAC address is set via .config() method. 2016-05-03 01:04:40 +03:00
Paul Sokolovsky
6d8156ae28 docs/network: esp8266: Describe wlan.config() method. 2016-04-28 00:11:55 +03:00
Paul Sokolovsky
06deec9d35 docs/network: esp8266: Add wlan.ifconfig() method. 2016-04-28 00:10:29 +03:00
Paul Sokolovsky
650df97c06 docs/network: esp8266: scan(): Add note that bssid is bytes object. 2016-04-26 01:09:11 +03:00
Paul Sokolovsky
f50d9477c1 docs: network: esp8266: .scan() is now synchronous and returns result list. 2016-03-30 11:56:20 +03:00
Paul Sokolovsky
d7019d0628 docs: network: esp8266: status is WLAN object method. 2016-03-30 11:53:45 +03:00
Paul Sokolovsky
87c783b454 docs/esp8266: esp.mac() replaced with network.WLAN.mac(). 2016-03-27 06:59:39 +03:00
Paul Sokolovsky
679fe0abae docs/esp8266: esp.wifi_mode() replaced with network.WLAN.active(). 2016-03-27 06:59:00 +03:00
Paul Sokolovsky
eda8746324 docs/esp8266: phy_mode() moved to network module. 2016-03-27 06:58:06 +03:00
Paul Sokolovsky
4b5606bc09 docs/network: esp8266: Update docs on WLAN constructor. 2016-03-25 16:30:06 +02:00
danicampora
add930c4b5 cc3200: Rename 'server' class to 'Server' for consistency. 2016-02-22 22:54:34 +01:00
Peter Hinch
c13b2f2d00 docs: Several minor changes: network, pyb, ADCAll and inline asm. 2016-01-13 21:53:26 +00:00
danicampora
67a5bfc6d8 docs/library: Add network server example. 2015-12-16 22:35:14 +01:00
Noah
00960133c2 docs: Update docs for WiPy wlan.connect().
- The link establishment timeout is infinite by default
- Fix typo in notes about the auth kwarg
2015-11-18 19:47:40 +01:00
danicampora
4efed58df1 docs: Fix typos on wipy docs. 2015-10-22 16:35:04 +02:00
danicampora
ceb169008d docs: Several corrections to the classes in the machine module. 2015-10-21 15:30:56 +02:00
danicampora
04db848dc7 docs: Add usocket and ussl modules' documentation. 2015-10-21 15:30:56 +02:00
danicampora
9c72c71c05 cc3200: WLAN class can retrieve the existing instance. 2015-10-19 21:17:15 +02:00
danicampora
8faf2dc75b docs/wipy: Add wipy tutorials section. 2015-10-19 21:17:15 +02:00
danicampora
36ae417c9f docs: Add wipy and network.server documentation. 2015-10-19 21:17:15 +02:00
danicampora
4542643025 docs: Update all WiPy docs to reflect the new API. 2015-10-17 23:29:04 +02:00
Radomir Dopieralski
37ab061f4d docs: Update esp8266 documentation to match the code.
* Move the esp.status() to network module.
* Describe the wifi.isconnected() method.
* Describe esp.mac(), esp.wifi_mode(), esp.phy_mode(), esp.sleep_type(),
  esp.deepsleep(), and esp.flash_id() functions.
2015-10-06 23:25:35 +01:00
Daniel Campora
ea5061e409 cc3200: Improve callback API.
Rename "wakes" param to "wake_from" and make "value" an object
instead of an integer.
2015-08-16 20:17:52 +02:00
Daniel Campora
e54a4f1f48 cc3200: Improve support for WEP security.
Key is always entered as a string, but if security is WEP, the key
is converted automatically to hex before connecting or configuring
the device as an AP.
2015-08-09 19:22:16 +02:00
Daniel Campora
00c4d6562e cc3200: Add nic.iwconfig() to set/get WLAN configuration.
Changes are based on this post:
https://github.com/micropython/micropython/issues/876#issuecomment-115255551

The constructor can optionally take the same params of iwconfig in
order to configure WiFi when creating the object. Params are
keyworkd only. The WiPy accepts:

- mode (int -> WLAN.AP or WLAN.STA)
- ssdi (string)
- security (int -> WLAN.OPEN, WLAN.WEP, WLAN.WPA, WLAN.WPA2)
- key (string)
- channel (int (1-11))
- antenna (int -> WLAN.INTERNAL, WLAN.EXTERNAL)
2015-08-09 19:22:12 +02:00
Damien George
fa1cdb09fc docs: Fix duplicate label error for network.WLAN. 2015-06-27 13:42:00 +01:00
Bill Owens
7c61249ae6 esp8266: Updated documentation for scan() and moved to network 2015-06-17 23:16:28 +03:00