A Primer: Association With a Secure Wi-Fi Access Point
Built into every Wi-Fi access point and device is a security feature called authentication; it is designed to prevent
Wi-Fi eavesdropping from unauthorized devices. Different Wi-Fi authentication based algorithms used by the industry
include WEP- 64, WEP-128, WPA2-PSK, WPA1-PSK, and WPA-PSK. The RN-XV supports all of them. You just need to
select which of these is appropriate for your target access point, and determine if they require a password or key.
You need to know what is required and the actual contents of either the key or pass phrase to successfully associate.
Authentication is performed as part of a larger Wi-Fi device initialization process coined “association.” This is a four
step process that is analogous to the creation of a virtual wire between the device and an access point. The end result of
association is that your device receives an IP (Internet protocol) address to enable communications to any part of the
network. This address is four bytes, depicted as a dotted-quad such as 192.168.1.100. Dynamic Host Configuration
Protocol (DHCP) is the network protocol used during association to configure a network device with an IP address. The
Wireless Access Point has a DHCP server function built in. The RN-XV has a built-in DHCP client to automatically work
with the access point server. The overall association process is shown in Figure 3. The IP address can also be assigned
manually, if needed.
Experiment 1: Associating
RN-XV with a Secure
The RN-XV module has two modes of operation: data
and command. In data mode (the default on power-up),
the module performs like a data pipe. In other words,
when data is received over Wi-Fi, the module removes the
headers before transferring the data to the host
microcontroller. Command mode is a special configuration
which is entered with the host transmitting ASCII “$$$”
(no CR). It is used by the host to configure the RN-XV
operation and monitor its status (using API ASCII
Figure 4. The module command and response
Command entry does require a CR, and the module
will respond typically with an ‘AOK’ if everything is
accepted or ‘ERR’ if it is not. If you type CR in command
mode without a command, the module will respond with
its version number like < 2.23D>.
The RN-XV API command set falls into four general
categories: SET, GET, STATUS, and ACTION (refer back to
the Wifly manual for details). All configuration settings can
be directed by the host to be stored in the module’s Flash
memory, where it can persist and be reloaded after power
cycling. To keep changes, the host uses the “save”
You should now be in Evaluation Configuration mode
with Tera Term communicating with the RN-XV over USB.
As you recall, we typed “$$$” to enter the RN-XV
command mode, then the module replies with “cmd.”
Let’s now direct the module to search for access points by
typing the command “scan” with (CR). The RN-XV will
now automatically list all wireless access points it finds. In
this example, only one access point was found.
You select an access point by identifying its SSID
(name of access point) and security authentication (either
key or pass phrase). The commands to do this are as
1. Type “Set wlan ssid <string>” (CR).
2. Type “Set wlan pass <string>” (CR) or optionally
“set wlan key <string>” (CR), depending on the
specific access point authentication requirement.
3. Type “set ip dhcp 1” (CR) to activate the RN-VX
4. Type ”ip protocol 3” (CR) to activate TCP and IP
5. Type “join 4USL2” (CR) to attempt to associate
with the designated access point.
The results should look like Figure 4.