User manual

WiFly GSX/EZX
www.rovingnetworks.com WiFly-RN-UM 11/9/2011
809 University Avenue Los Gatos, CA 95032 Tel (408) 395-6539 info@RovingNetworks.com
~ 42 ~
NOTE: The Blue LED is connected to GPIO7 on the Wi-Fi Serial Adapter (RN-370) and the RN-174
development board. The blue LED is not connected to GPIO7 on the RN-134 board. It is not possible
to power off the blue LED on the RN-134 board as it is directly connected to power.
10.5.1. Setting the alternate GPIO functions
The default functions of GPIO 4 5, 6 is to control the LED functionality. This default functionality can be
overridden to allow user programmable IO or alternate IO functionality by using the set sys iofunc
<mask> command. Value is entered as a hex number.
The hex value represents a bit mask that controls each bit in the <mask> represents a particular GPIO pin.
If a bit is 0, then that GPIO is driven/read by the firmware per the default function.
The IO function <mask> is encoded as such:
Bit
IO
DIRECTION
Function
0
GPIO-4
output
Disable LED function so IO can be used as GPIO
1
GPIO-5
output
Disable LED function so IO can be used as GPIO
2
GPIO-6
output
Disable LED function so IO can be used as GPIO
3
Not Used
4
GPIO-4
output
HIGH once associated/authenticated and have IP address.
5
GPIO-5
input
Set HIGH to trigger TCP connection, LOW to disconnect.
6
GPIO-6
output
HIGH when connected over TCP, LOW when disconnected.
NOTE. Bits 0-3 are mutually exclusive with the bits 4-6. i.e. 0x77 is an illegal value.
If the LEDs are disabled using bits 0, 1, 2 above, you can then use the show i command to read these GPIO.
<2.21> show i will return
Port=30
For example, to use the alternate functions of the LEDs, the sequence of commands would be:
set sys iofunc 0x70 // enable alternate function for GPIO 6, 5 and 4
save // store configuration
reboot // reboot the module
NOTE: Currently, the alternative GPIO functions are not available in adhoc mode.