docs/wipy: Add warning about losing wlan connection when changing mode.

Also provide workarounds, link to other revelant sections,
and fix some typos.
This commit is contained in:
Jason Hildebrand 2015-11-11 23:00:31 -06:00 committed by danicampora
parent 7080e9632c
commit 9142179f81
4 changed files with 17 additions and 3 deletions

View File

@ -43,6 +43,8 @@ For instance, on a linux shell (when connected to the WiPy in AP mode)::
$ telnet 192.168.1.1
.. _wipy_filesystem:
Local file system and FTP access
--------------------------------

View File

@ -4,7 +4,7 @@ WiPy tutorials and examples
===========================
Before starting, make sure that you are running the latest firmware,
for instrucctions see :ref:`OTA How-To <wipy_firmware_upgrade>`.
for instructions see :ref:`OTA How-To <wipy_firmware_upgrade>`.
.. toctree::
:maxdepth: 1

View File

@ -6,9 +6,11 @@ interactive MicroPython prompt that you can access on the WiPy. Using
the REPL is by far the easiest way to test out your code and run commands.
You can use the REPL in addition to writing scripts in ``main.py``.
.. _wipy_uart:
To use the REPL, you must connect to the WiPy either via :ref:`telnet <wipy_telnet>`,
or with a USB to serial converter wired to the one the two UARTs on the
WiPy. To enable REPL duplication on UART0 (the one accesible via the expansion board)
or with a USB to serial converter wired to one of the two UARTs on the
WiPy. To enable REPL duplication on UART0 (the one accessible via the expansion board)
do::
>>> from machine import UART

View File

@ -13,6 +13,15 @@ You can check the current mode (which is always ``WLAN.AP`` after power up)::
>>> wlan.mode()
.. warning::
When you change the WLAN mode following the instructions below, your WLAN
connection to the WiPy will be broken. This means you will not be able
to run these commands interactively over the WLAN.
There are two ways around this::
1. put this setup code into your :ref:`boot.py file<wipy_filesystem>` so that it gets executed automatically after reset.
2. :ref:`duplicate the REPL on UART <wipy_uart>`, so that you can run commands via USB.
Connecting to your home router
------------------------------
@ -22,6 +31,7 @@ it as a station::
from network import WLAN
wlan = WLAN(mode=WLAN.STA)
Now you can proceed to scan for networks::
nets = wlan.scan()