WiFly GSX
WiFlyGSX-um.pdf 11/11/2009
www.rovingnetworks.com
Phone 408-395-6539
-
24 -
<2.09>
show i
will return
Port=30
You can also use the
set sys output <value> <mask>
to drive GPIO output pins to HIGH or
LOW. (mask is optional, default sets all the pins ).
10.5.3 Controlling connections with GPIO.
In embedded applications it is useful to monitor and control the status of the TCP/IP connection.
This can be done by using the alternate function for GPIO-5 and GPIO-6.
With the alternate function for these GPIO set, the module will connect to the stored remote host IP
address and port when GPIO-5 is driven high and disconnect when driven low.
The TCP/IP connection status can be monitored by reading GPIO-6, high = connected, low = not
connected.
Here is how to set the WiFly module to connect using GPIO-5 and GPIO-6
<2.09> set ip host <addr> // set the IP address of the remote host
<2.09> set ip remote <port> // set the IP port of the remote host
<2.09> set sys iofunc 0x60 // set alternate function for GPIO-5 and GPIO-6
<2.09> save
<2.09> reboot // the module must be rebooted for the alternate settings to take effect
On the remote host run your application or other software that opens and listens on the <port>.
Connect GPIO-5 to your embedded processor or other control signal. When GPIO-5 is driven high a
connection will be attempted. When drive low the connection will be closed.
Be sure to not to
drive the GPIO with more that 3.3 VDC or permanent damage to the module will occur.
If the connection to the remote host is successful GPIO-6 will go high. If the COMM OPEN and
REMOTE strings are set you should see the *OPEN* messages on the UART and the *HELLO* at the
remote host.
10.6
Setting Debug Print levels
There are a number of print functions that can be enabled to assist in debugging the operation and
status of the module. The following command is used to control these printouts.
set sys printlvl <value>
sets additional print functions. Bit-mapped value.
Bit
Function
1
Print start-up messages showing progress of association, dhcp, etc.
Once the configuration has been checked, this can then be turned off so that these messages do not
interfere with the data.