WIFLY GSX WIFLY EZX
WiFly GSX/EZX
WiFly GSX/EZX
- No tags were found...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
WiFly <strong>GSX</strong>/<strong>EZX</strong><br />
www.rovingnetworks.com WiFly-RN-UM 4/8/2011<br />
10.5.1. Setting the alternate GPIO functions<br />
The default functions of GPIO 4 5, 6 is to control the LED functionality. This default functionality can be<br />
overridden to allow user programmable IO or alternate IO functionality by using the set sys iofunc<br />
command. Value is entered as a hex number.<br />
The hex value represents a bit mask that controls each bit in the represents a particular GPIO pin.<br />
If a bit is 0, then that GPIO is driven/read by the firmware per the default function.<br />
The IO function is encoded as such:<br />
Bit IO DIRECTION Function<br />
0 GPIO-4 output Disable LED function so IO can be used as GPIO<br />
1 GPIO-5 output Disable LED function so IO can be used as GPIO<br />
2 GPIO-6 output Disable LED function so IO can be used as GPIO<br />
3 Not Used<br />
4 GPIO-4 output HIGH once associated/authenticated and have IP address.<br />
5 GPIO-5 input Set HIGH to trigger TCP connection, LOW to disconnect.<br />
6 GPIO-6 output HIGH when connected over TCP, LOW when disconnected.<br />
NOTE. Bits 0-3 are mutually exclusive with the bits 4-6. i.e. 0x77 is an illegal value.<br />
If the LEDs are disabled using bits 0, 1, 2 above, you can then use the show i command to read these GPIO.<br />
show i will return<br />
Port=30<br />
For example, to use the alternate functions of the LEDs, the sequence of commands would be:<br />
set sys iofunc 0x70 // enable alternate function for GPIO 6, 5 and 4<br />
save<br />
// store configuration<br />
reboot<br />
// reboot the module<br />
NOTE: Currently, the alternative GPIO functions are not available in adhoc mode.<br />
10.5.2. Controlling connections with GPIO<br />
In embedded applications it is useful to monitor and control the status of the TCP/IP connection. This can<br />
be done by enabling the alternate function of GPIO 4, 5 and 6.<br />
With the alternate function for these GPIO set, the module will connect to the stored remote host IP address<br />
and port when GPIO-5 is driven high and disconnect when driven low.<br />
809 University Avenue • Los Gatos, CA 95032 • Tel (408) 395-6539 • info@RovingNetworks.com<br />
~ 40 ~