User`s guide
RN-WIFLYCR-UG
www.rovingnetworks.com Version 1.2r 4/30/13 page 64
To configure the module to connect using GPIO5 and GPIO6, use the following com-
mands:
set ip host <address> // Set the IP address of the remote host
set ip remote <value> // Set the IP port of the remote host
set sys iofunc 0x70 // Set alternate function for GPIO4 - 6
save // Store configuration
reboot // Reboot the module
After executing these commands, run your application or other software on the remote
host that opens and listens on the specified port. Then, connect GPIO5 to your embed-
ded processor or other control signal. When GPIO5 is driven high, the module attempts
to connect. When GPI05 is driven low, the connection is closed.
If the connection to the remote host is successful, GPIO6 goes high. If you have set the
COMM OPEN and REMOTE strings, the UART displays *OPEN* and the remote host
displays *HELLO*. Figure 3-9 shows the process of controlling connection with the
GPIO pins.
FIGURE 3-9: CONTROLLING CONNECTIONS WITH THE GPIO PINS
3.7 SETTING DEBUG PRINT LEVELS
You can enable print functions to assist with debugging the operation and status of the
module. The set sys printlvl <value> command controls these additional print func-
tions, where <value> is a bit-mapped register that controls which printout messages
are sent to the UART. See “set sys printlvl <value>” on page 25 for more information.
3.7.1 Scan Output Format
You enable the scan output using the set sys printlvl 0x4000 command. The scan out-
put format differs, depending on the firmware you are running.
Note: Do not to drive the GPIO pin with more than 3.3-V DC or permanent dam-
age to the module will occur.
Embedded
Microprocessor
WiFly
Module
GPIO4 = High by WiFly Module
GPIO5 = High by Microprocessor
GPIO6 = High by WiFly Module
Event: The WiFly module is associated with
an access point and has a valid IP address.
The WiFly module is instructed to open a TCP/IP
connection to the stored remote host.
Event: The WiFly module successfully opens the
TCP connection to the stored remote host.
This signal instructs the microprocessor that
it is OK to open a TCP connection.
Event: the microprocessor wants to open a
TCP connection to the stored remote host.
This signal instructs the microprocessor that
the TCP connection is open andit can begin
sending/receiving data over the TCP link. To
close the conenction, the microprocessor
drives GPIO5 low.