User`s guide

RN-WIFLYCR-UG
www.rovingnetworks.com Version 1.2r 4/30/13 page 49
3.1.2.6 GPIO4, 5 & 6 ALTERNATIVE FUNCTIONS
GPIO4, 5, and 6 have alternative functions in soft AP mode as described in the
advanced sections later in this document. You enable the alternative functions using
the following commands:
set sys iofunc 0x70 // Enables alternative functions
The link monitor feature must be enabled to turn on the alternative functions in soft AP
mode only. Table 3 - 2 shows the GPIO alternative functions.
3.2 CONFIGURATION WEB SERVER
This section describes how to use the module’s configuration web server (supported in
firmware version 4.0 and higher).
3.2.1 Introduction
Roving Networks WiFly modules can operate in one of three modes:
Infrastructure mode—The module can join a network created by an access point
(AP).
Ad hoc mode—The module creates a network to which other devices can join.
Soft AP mode—The module behaves as an AP with limited functionality.
A key challenge when using any embedded device in infrastructure mode is to provi-
sion it so that it can associate with an AP. This process requires storing the AP’s set-
tings, such as the SSID and passphrase, in the embedded device.
You can configure or provision Roving Networks embedded Wi-Fi modules to join an
infrastructure networks in several ways:
Sending ASCII commands to the module over a UART.
Sending ASCII commands remotely while the module is in ad hoc or soft AP
mode.
Using Wi-Fi protected setup (WPS).
Sending commands to the module remotely using a web interface.
TABLE 3-2: GPIO ALTERNATIVE FUNCTIONS
GPIO Description
GPIO4 High when the first client associates, Low when all clients leave the network
GPIO5 WiFly module can drive it high to open a TCP connection to a stored host. When
the module drives GPIO5 low, it closes the TCP connection
GPIO6 WiFly module drives it high when a TCP connection is open, low when TCP con-
nection is closed