AT+CWMODE=?
, the module will answer with the possible parameters for the command, in this
case 1-3. CWMODE is a command that you can use to specify the WLAN-mode,
by the way.
There are therefore three operating modes that I will explain below.
1
AT+CWMODE=2 – the module as Access Point (AP-mode)
In the delivery condition, the module is an Access Point. This means that you can
directly connect to the module with a WLAN-capable device, such as a smartphone
or a PC. For this, simply find the open WLAN with the name NanoESP and connect
to it. In the default condition, no password is assigned, so that connection is not a
problem. If you are connected to the module, you have no connection to the internet,
since the module is not a router with a dedicated connection to the phone network.
This WLAN-mode is still sensible, however, for example if you need a closed, safe
network. Speaking of safety: There is also the option of assigning a password to the
network, using the command:
AT+CWSAP
You need to enter parameters in the following order and separated with a comma:
U
the name of the network in quotation marks,
U
the password in quotation marks,
U
the channel ID (any value between 1 and 13),
U
and the encryption mode (value from 0-4).
One possible setting would be:
AT+CWSAP="MyNanoESP", "MyPassword", 5,3
After a short period, OK appears as confirmation. If an ERROR appears, check
your input again, and in particular check the quotation marks. If an ERROR ap-
pears anyway, check that the CWMODE is actually set to 2.
If everything works, you can connect to the board with a WLAN-capable device. All
devices connected to the module can be displayed with IP and MAC addresses
with the command
AT+CWLIF
.