Commit 9142179f authored by Jason Hildebrand's avatar Jason Hildebrand Committed by danicampora

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

Also provide workarounds, link to other revelant sections,
and fix some typos.
parent 7080e963
...@@ -43,6 +43,8 @@ For instance, on a linux shell (when connected to the WiPy in AP mode):: ...@@ -43,6 +43,8 @@ For instance, on a linux shell (when connected to the WiPy in AP mode)::
$ telnet 192.168.1.1 $ telnet 192.168.1.1
.. _wipy_filesystem:
Local file system and FTP access Local file system and FTP access
-------------------------------- --------------------------------
......
...@@ -4,7 +4,7 @@ WiPy tutorials and examples ...@@ -4,7 +4,7 @@ WiPy tutorials and examples
=========================== ===========================
Before starting, make sure that you are running the latest firmware, 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:: .. toctree::
:maxdepth: 1 :maxdepth: 1
......
...@@ -6,9 +6,11 @@ interactive MicroPython prompt that you can access on the WiPy. Using ...@@ -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. 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``. 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>`, 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 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 accesible via the expansion board) WiPy. To enable REPL duplication on UART0 (the one accessible via the expansion board)
do:: do::
>>> from machine import UART >>> from machine import UART
......
...@@ -13,6 +13,15 @@ You can check the current mode (which is always ``WLAN.AP`` after power up):: ...@@ -13,6 +13,15 @@ You can check the current mode (which is always ``WLAN.AP`` after power up)::
>>> wlan.mode() >>> 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 Connecting to your home router
------------------------------ ------------------------------
...@@ -22,6 +31,7 @@ it as a station:: ...@@ -22,6 +31,7 @@ it as a station::
from network import WLAN from network import WLAN
wlan = WLAN(mode=WLAN.STA) wlan = WLAN(mode=WLAN.STA)
Now you can proceed to scan for networks:: Now you can proceed to scan for networks::
nets = wlan.scan() nets = wlan.scan()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment